61
aca-it.be - 2014 Monitor your Atlassian stack like the NSA http://www.flickr.com/photos/zigazou76/7670889680 Tom Moors January 16th 2014 Atlassian User Group Belgium

Monitor your Atlassian stack like the NSA

Embed Size (px)

DESCRIPTION

Monitor your Atlassian stack like the NSA by Tom Moors, Atlassian Expert at ACA IT-Solutions.

Citation preview

Page 1: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

Monitor your Atlassian stack like the NSA

http://www.flickr.com/photos/zigazou76/7670889680

Tom Moors January 16th 2014 Atlassian User Group Belgium

Page 2: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Who is Tom Moors?✓ Atlassian Expert @ ACA IT-Solutions

✓ Poor drawer

✓ @tommoors

[email protected]

Page 3: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

@tommoors

Why monitoring?

Page 4: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

@tommoors

Why monitoring?Costs money

Needs extra time

Page 5: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

@tommoors

Why monitoring?Reduce costs

Save timeOffer insights

Opportunities

Improve service

Detect fraud

Page 6: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

–Lord Kelvin

“If you can not measure it, you can not improve it.”

Page 7: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

@tommoors

…but #monitoringsucks!

Great movement!

Page 8: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Agenda

• Introduction

• Building blocks

• Monitoring levels

• Conclusion

Page 9: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

What is monitoring?

Observe and check the progress or quality of (something) over a period of time; keep under systematic review

http://www.oxforddictionaries.com/definition/english/monitor

Page 10: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

What is monitoring?

Super Monitoring

Page 11: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Approach to monitoring?• Ride on the DevOps/Infrastructure as Code wave

• Build a toolchain

Page 12: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

GoalAlerts

...when things go wrong

...before disaster strikes

...no spamming / false metrics

User Interface

• Context for post-mortem

• Trends

• Current state

Page 13: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring basics• Gather data

• Transport data

• Process and store data

• Present data

• Alerts

• Trends

• History / Future

Page 14: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring basics

http://www.slideshare.net/roidelapluie/devops-andmonitoringowf13

Metric✓ Time ✓ Name ✓ Value

Event✓ Time ✓ Fields

can be converted to

Page 15: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring levels

• Availability

• Infrastructure

• Process

• Application

• Business

BONUS: Logs

Page 16: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Availability• Built-in checks: ping

• Service Delivery?

Page 17: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring levels

• Availability

• Infrastructure

• Process

• Application

• Business

BONUS: Logs

Page 18: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

InfrastructureSystem

• CPU usage/min/max/average

• Memory usage/min/max/average

• Disk space

• IO Wait

• Process load

Services

• Network

• Database

• Query timing

• LDAP / Active Directory

Other

• SSL/TLS Certificates

Page 19: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Infrastructure• Do-It-Yourself (Not Invented Here Syndrome)

• CollectD

• StatsD

• Cacti

• Ganglia

• Hyperic

• Nagios, Icinga

• Zabbix

Page 20: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Infrastructuregoogle.com results

Cacti 1,740,000

Nagios 1,690,000

StatsD 1,470,000

Ganglia 1,150,000

Zabbix 922,000

Icinga 730,000

Hyperic 524,000

CollectD 225,000

Page 21: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Infrastructure: Icinga

Page 22: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Infrastructure: Icinga

Page 23: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Icinga: AlertsExtensible with plugins

• Mail

• JIRA issue

• Jabber/XMPP

• HipChat

• SMS

• PagerDuty

• …

Page 24: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

StatsD• UDP Network daemon

• Aggregates data

• Buckets with values

• Type

• Counter

• Timer

• Gauge

• Backend: eg Graphite

Page 25: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Graphite• Stores numeric time-series

• Render graph of this data on demand

!

Architecture

• carbon: daemon

• whisper: data storage

• graphite webapp: frontend

Page 26: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Graphite

Page 27: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring levels

• Availability

• Infrastructure

• Process

• Application

• Business

BONUS: Logs

Page 28: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Process

• Is the service/process still running?

• Watchdog to (repair and) restart

eg upstart, Monit, jsvc

!

Potential problem ➞ send event

Page 29: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring levels

• Availability

• Infrastructure

• Process

• Application

• Business

BONUS: Logs

Page 30: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

JavaMelody• Plugin for JIRA, Confluence, Bamboo

• Lightweight

• Statistics and charts

Page 31: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Java Applications: JMX

Java Management eXtensions

• MBeans representing device, application, resource

• Set of readable (writable) attributes

• Set of operations

Page 32: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Java Applications: JMX

Page 33: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Java Applications: JMX

Page 34: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Working with JMX

• Well-supported in tools (plugins)

• Jolokia

• jmxtrans

Page 35: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Commercial solutions• New Relic

• Keynote

Page 36: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring levels

• Availability

• Infrastructure

• Process

• Application

• Business

BONUS: Logs

Page 37: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Business ValueHow many…

• new spaces?

• issues created?

• users active?

• popular pages?

• …

Very specific metrics

Page 38: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Business Value

• Google Analytics

• Piwik

• (Hummingbird)

• JIRA: reporting

• Custom development

Page 39: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Monitoring levels

• Availability

• Infrastructure

• Process

• Application

• Business

BONUS: Logs

Page 40: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Logs

• Most up-to-date information

• Best insights, eg why a HTTP 500?

• Unstructured data

• Massive amount from multiple sources

Page 41: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Working with Logs

Logstash

Scribe

free and open sourcecommercial

Page 42: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

@tommoors

Logstashhttp://logstash.net

Page 43: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: design

Input Filter Output

Page 44: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: design

Input Filter Output

2013-10-29 12:48:43,663 Thread-67 ERROR

[jira.issue.managers.DefaultCustomFieldManager] Could not load custom field type

plugin with key 'com.pyxis.greenhopper.jira:gh-epic-label'. Is the plugin present and

enabled?

Page 45: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: design

Input Filter Output

2013-10-29 12:48:43,663 Thread-67 ERROR

[jira.issue.managers.DefaultCustomFieldManager] Could not load custom field type

plugin with key 'com.pyxis.greenhopper.jira:gh-epic-label'. Is the plugin present and

enabled?

Page 46: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: design

Input

• file

• imap

• stdin

• log4j

• syslog

• tcp

• udp

• rabbitmq

• collectd

• redis

• …

Input Filter Output

Page 47: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: design

Filter

• grep

• grok

• geo ip

• anonymize

• drop

• split

• dns

• extractnumbers

• mutate

• …

Input Filter Output

Page 48: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: design

Output

• elasticsearch

• email

• graphite

• HipChat

• JIRA

• http

• StatsD

• Nagios

• PagerDuty

• Cloudwatch

• …

Input Filter Output

Page 49: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: architecture

Shipper

Broker IndexerShipper

Shipper

Search & Storage

Web Interface

Page 50: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

LogStash: Kibana

Page 51: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

@tommoors

One more thing…

Page 52: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Dashboards• Buy a big TV for the office

• Combine the most important metrics

• SLA

• Builds

• Work done

• Deployments

• …

Page 53: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Dashboards

JIRA Wallboard Plugin

Page 54: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Dashboards

AtlasBoard

Page 55: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Dashboards

GDash

Page 56: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Dashboards

Graphene

Page 57: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Dashboards

Giraffe

Page 58: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Conclusion

LogStash StatsD Graphite

Icinga

System

Possible toolchain

Page 59: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Conclusion

• Monitoring is a must

• Great tools support great responsibility

• There is no one-fits-all

• Iterate over your configuration

• Get close(r) with logs

• Dashboards are a great reason to buy a big TV

Page 60: Monitor your Atlassian stack like the NSA

aca-it.be - 2014

@tommoors

Questions?

Tom Moors

[email protected]

@tommoors

Page 61: Monitor your Atlassian stack like the NSA

@tommoors

aca-it.be - 2014

Further Reading• https://github.com/monitoringsucks

• http://jedi.be/blog/2012/01/03/monitoring-wonderland-survey-introduction

• http://jedi.be/blog/2012/01/03/monitoring-wonderland-metrics-api-gateways

• http://jedi.be/blog/2012/01/04/monitoring-wonderland-moving-up-the-stack-application-user-metrics

• http://jedi.be/blog/2012/01/03/monitoring-wonderland-nagios-the-mighty-beast

• http://www.paperplanes.de/2011/1/5/the_virtues_of_monitoring.html

• http://assets.en.oreilly.com/1/event/65/Metrics-driven%20Engineering%20at%20Etsy%20Presentation.pdf

• http://www.devco.net/archives/2011/03/19/thinking_about_monitoring_frameworks.php

• http://www.slideshare.net/roidelapluie/devops-andmonitoringowf13

• http://serialized.net/2011/02/getting-more-signal-from-your-noise

• http://obfuscurity.com/static/TrendingWithPurpose_20110318.pdf