+ All Categories
Home > Technology > The devops approach to monitoring, Open Source and Infrastructure as Code Style

The devops approach to monitoring, Open Source and Infrastructure as Code Style

Date post: 26-Jan-2015
Category:
Upload: julien-pivotto
View: 106 times
Download: 0 times
Share this document with a friend
Description:
Monitoring is critical for every decent application that runs on production. Many of the monitoring tools widely used show their limits at the age of Infrastructure as Code and Cloud computing. Let's investigate how monitoring can face the new challenges: scalability, reproducability and automation
Popular Tags:
42
; The devops approach to monitoring, The devops approach to monitoring, Open Source and IAC Style Open Source and IAC Style Julien Pivotto Julien Pivotto Open World Forum Open World Forum October 4, 2013 October 4, 2013
Transcript
Page 1: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

The devops approach to monitoring,The devops approach to monitoring,

Open Source and IAC StyleOpen Source and IAC Style

Julien PivottoJulien Pivotto

Open World ForumOpen World ForumOctober 4, 2013October 4, 2013

Page 2: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

whoamiwhoami• sysadmin @ inuitssysadmin @ inuits• open-source defender for 7+ yearsopen-source defender for 7+ years• devops believerdevops believer• @roidelapluie on twitter/github@roidelapluie on twitter/github

Julien Pivotto DevOps and monitoring

Page 3: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

DevOpsDevOps

• CultureCulture• AutomationAutomation• MeasurementMeasurement• SharingSharing

Damon Edwards and John WillisDamon Edwards and John Willis

Julien Pivotto DevOps and monitoring

Page 4: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Monitoring is usuallyMonitoring is usuallyan afterthoughtan afterthought

ENOTIME, ENOBUDGETENOTIME, ENOBUDGET

Julien Pivotto DevOps and monitoring

Page 5: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

#monitoringsucks#monitoringsucks

• A movement started in 2011A movement started in 2011• http://github.com/monitoringsuckshttp://github.com/monitoringsucks• A lot of tools and informationA lot of tools and information

Julien Pivotto DevOps and monitoring

Page 6: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

GoalsGoals• Find when a service is unavailableFind when a service is unavailable• Understand failure post-mortemUnderstand failure post-mortem

• Learn from your infrastructureLearn from your infrastructure• AnticipateAnticipate

Julien Pivotto DevOps and monitoring

Page 7: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

GoalsGoals• Find when a service is unavailableFind when a service is unavailable• Understand failure post-mortemUnderstand failure post-mortem• Learn from your infrastructureLearn from your infrastructure• AnticipateAnticipate

Julien Pivotto DevOps and monitoring

Page 8: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Monitor everythingMonitor everything

• ServersServers• ServicesServices• UsageUsage• HardwareHardware• SoftwareSoftware• PeoplePeople

Julien Pivotto DevOps and monitoring

Page 9: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Monitor every environmentMonitor every environment

• See performance changes in devSee performance changes in dev• Fix them before it hits productionFix them before it hits production

Julien Pivotto DevOps and monitoring

Page 10: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

MetricMetric

• Time + name + value = metricTime + name + value = metric• Can be anythingCan be anything

Julien Pivotto DevOps and monitoring

Page 11: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

EventEvent

• Time + fields = metricTime + fields = metric• Logs become usable dataLogs become usable data• Can be transformed into metricsCan be transformed into metrics

Julien Pivotto DevOps and monitoring

Page 12: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Metrics + eventsMetrics + events• Overview of your infrastructureOverview of your infrastructure• Usage and state of the servicesUsage and state of the services• Combine several metricsCombine several metrics• Extract business valuesExtract business values

Julien Pivotto DevOps and monitoring

Page 13: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

AutomationAutomation

• Infrastructure as CodeInfrastructure as Code• Automate everythingAutomate everything⇒ One source of truthOne source of truth

Julien Pivotto DevOps and monitoring

Page 14: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

DeploymentDeployment• Definitions of a service includes monitoringDefinitions of a service includes monitoring• Deployed ⇔ monitoredDeployed ⇔ monitored

Julien Pivotto DevOps and monitoring

Page 15: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

ToolsTools

• No all-in-one toolNo all-in-one tool• No autodiscovery toolNo autodiscovery tool• Text-based configurationText-based configuration• ScalableScalable⇒ The Unix philosphyThe Unix philosphy

Julien Pivotto DevOps and monitoring

Page 16: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

IcingaIcinga

• Fork of nagiosFork of nagios• Large and vibrant communityLarge and vibrant community• Configuration compatible with nagiosConfiguration compatible with nagios• User-friendly interfaceUser-friendly interface• Use Icinga Classic!Use Icinga Classic!

Julien Pivotto DevOps and monitoring

Page 17: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

IcingaIcingahttps://icinga.org

Julien Pivotto DevOps and monitoring

Page 18: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

SensuSensu• FlexibilityFlexibility• Compatible with nagios pluginsCompatible with nagios plugins• Connects to your source of trustConnects to your source of trust• Relies on RabbitMQRelies on RabbitMQ

Julien Pivotto DevOps and monitoring

Page 19: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

CollectdCollectd

• Statistics collection daemonStatistics collection daemon• A lot of plugins available. . .A lot of plugins available. . .• Can send data to graphiteCan send data to graphite• Simple configurationSimple configuration

Julien Pivotto DevOps and monitoring

Page 20: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Collectd pluginsCollectd pluginshttp://www.flickr.com/photos/juhansonin/3141561416/

Julien Pivotto DevOps and monitoring

Page 21: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Collectd pluginsCollectd pluginsAMQP Apache APC_UPS Apple_Sensors Ascent Battery BIND CarbonAMQP Apache APC_UPS Apple_Sensors Ascent Battery BIND CarbonConnTrack ContextSwitch CPU CPUFreq CSV cURL cURL-JSON cURL-XMLConnTrack ContextSwitch CPU CPUFreq CSV cURL cURL-JSON cURL-XMLDBI DF Disk DNS E-Mail Entropy Exec FileCount FSCache GenericJMXDBI DF Disk DNS E-Mail Entropy Exec FileCount FSCache GenericJMXgmond HDDTemp Interface IPMI IPTables IPVS IRQ Java libvirt Loadgmond HDDTemp Interface IPMI IPTables IPVS IRQ Java libvirt LoadLogFile LPAR MadWifi MBMon memcachec memcached Memory ModbusLogFile LPAR MadWifi MBMon memcachec memcached Memory Modbus

Monitorus Multimeter MySQL NetApp Netlink Network NFS nginxMonitorus Multimeter MySQL NetApp Netlink Network NFS nginxNotify_Desktop Notify_Email NTPd NUT olsrd OneWire OpenVPN OpenVZNotify_Desktop Notify_Email NTPd NUT olsrd OneWire OpenVPN OpenVZOracle Perl Pinba Ping PostgreSQL PowerDNS Processes Protocols PythonOracle Perl Pinba Ping PostgreSQL PowerDNS Processes Protocols PythonRedis RouterOS RRDCacheD RRDtool Sensors Serial SNMP Swap SysLogRedis RouterOS RRDCacheD RRDtool Sensors Serial SNMP Swap SysLogTable Tail Tape TCPConns TeamSpeak2 TED thermal TokyoTyrant UnixSockTable Tail Tape TCPConns TeamSpeak2 TED thermal TokyoTyrant UnixSock

Uptime Users UUID Varnish vmem VServer Wireless XMMSUptime Users UUID Varnish vmem VServer Wireless XMMSWrite_Graphite Write_HTTP Write_MongoDBWrite_Graphite Write_HTTP Write_MongoDB

Write_Redis Write_Riemann ZFS_ARCWrite_Redis Write_Riemann ZFS_ARC

Julien Pivotto DevOps and monitoring

Page 22: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

LogstashLogstash

• Ship logs from any sourceShip logs from any source• Filter themFilter them• Index themIndex them• Search themSearch them• Backed with elasticsearchBacked with elasticsearch

Julien Pivotto DevOps and monitoring

Page 23: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

LogstashLogstash

Julien Pivotto DevOps and monitoring

Page 24: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

GraphiteGraphite

• GraphingGraphing• Accept any metricAccept any metric• Store data in files (whisper)Store data in files (whisper)• A lot of helpers functionsA lot of helpers functions• Listen on UDP and TCPListen on UDP and TCP

Julien Pivotto DevOps and monitoring

Page 25: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Send data to graphiteSend data to graphiteecho "stats.sshd.login 1 $(date +%s)" | nc -u graphite.example.com 2003echo "stats.sshd.login 1 $(date +%s)" | nc -u graphite.example.com 2003

Julien Pivotto DevOps and monitoring

Page 26: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Graphite APIGraphite API

Julien Pivotto DevOps and monitoring

Page 27: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

StatsdStatsd

• Graphite friendGraphite friend• Stats aggregationStats aggregation• Simple countersSimple counters• Flushes every XX seconds to graphiteFlushes every XX seconds to graphite• UDPUDP

Julien Pivotto DevOps and monitoring

Page 28: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Feeding statsdFeeding statsdecho "stats.sshd.login:1|c" |nc -u statsd.example.com 8125

Julien Pivotto DevOps and monitoring

Page 29: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

gdashgdashhttps://github.com/ripienaar/gdash

Julien Pivotto DevOps and monitoring

Page 30: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

giraffegiraffe

Alternative to gdash

Julien Pivotto DevOps and monitoring

Page 31: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

KibanaKibana• Kibana is a web interface for Logstash/ESKibana is a web interface for Logstash/ES• Kibana 1 was written in PHPKibana 1 was written in PHP• Kibana 2 was written in RubyKibana 2 was written in Ruby• Kibana 3 is written in AngularJSKibana 3 is written in AngularJS

Julien Pivotto DevOps and monitoring

Page 32: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Kibana 3Kibana 3• Everything happens in the browserEverything happens in the browser• The browser is connected to ElasticsearchThe browser is connected to Elasticsearch• You can save dashboards into ESYou can save dashboards into ES• You can write/template dashboards to filesYou can write/template dashboards to files

Julien Pivotto DevOps and monitoring

Page 33: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Kibana queriesKibana queriesExample of a kibana [email protected]_program:"httpd" [email protected]_host:"test.example.com" [email protected]:"404"

• LLucene query syntax• SSimple and effective• PPoint & click web interface

Julien Pivotto DevOps and monitoring

Page 34: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;Julien Pivotto DevOps and monitoring

Page 35: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;Julien Pivotto DevOps and monitoring

Page 36: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;Julien Pivotto DevOps and monitoring

Page 37: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Toolchain exampleToolchain example• Apache ships logs to rsyslogApache ships logs to rsyslog• Rsyslog ships logs to logstashRsyslog ships logs to logstash• Logstash ships metrics to statsdLogstash ships metrics to statsd• Statsd ships metrics to GraphiteStatsd ships metrics to Graphite• Icinga query metric from graphiteIcinga query metric from graphite• https://github.com/etsy/nagios_toolshttps://github.com/etsy/nagios_tools

Julien Pivotto DevOps and monitoring

Page 38: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Reusing Icinga/Nagios perfdataReusing Icinga/Nagios perfdata• Icinga performs various checksIcinga performs various checks• Icinga sends perfdata to graphiteIcinga sends perfdata to graphite• Graphite stores the dataGraphite stores the data• Gdash serves them inside dashboardsGdash serves them inside dashboards• https://github.com/roidelapluie/icinga-to-graphitehttps://github.com/roidelapluie/icinga-to-graphite

Julien Pivotto DevOps and monitoring

Page 39: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

SharingSharing• Build dashboard: dashing, teamdashBuild dashboard: dashing, teamdash• Share with developersShare with developers• Share with managersShare with managers

Julien Pivotto DevOps and monitoring

Page 40: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Try them yourselfTry them yourselfhttps://github.com/KrisBuytaert/vagrant-graphitehttps://github.com/KrisBuytaert/vagrant-graphite

Julien Pivotto DevOps and monitoring

Page 41: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

Thank youThank youAny question?Any question?

Julien Pivotto DevOps and monitoring

Page 42: The devops approach to monitoring, Open Source and Infrastructure as Code Style

;

ContactContactJulien PivottoJulien [email protected]@inuits.eu@roidelapluie@roidelapluie

INUITS bvbaINUITS bvbaDuboisstraat 50Duboisstraat 502060 Antwerp2060 AntwerpBelgiumBelgium+32 473 441 636+32 473 441 636https://inuits.euhttps://inuits.eu

Julien Pivotto DevOps and monitoring


Recommended