SlideShare a Scribd company logo
www.icinga.org
Icinga 2: Apify them all
Icinga Camp - Portland - 10/10/2015
•  Michael Friedrich
•  Core Developer
•  6+ years #icingalove
•  @dnsmichi
ICINGA 2: INTRODUCTION
•  Icinga 2 configuration DSL
•  Apply, conditions, functions, …
•  Features (Graphite, DB IDO, …)
•  Standalone or Cluster with Clients
•  Already there – what’s missing?
ICINGA 2: INTEGRATION
•  Many existing interfaces
•  Integration with other tools
•  Can they satisfy my requirements?
•  File based (status.dat, config files)
•  Database (IDO)
•  Unixsocket (Livestatus)
•  FIFO (External Command Pipe)
ICINGA 2 API – UNIFY THEM ALL
•  Snmp traps as check results
•  Metrics as event streams
•  External command actions
•  Status Queries
•  Inventory: Use $tool to create objects
at runtime
API – REQUIREMENTS
•  RESTful url schema
•  HTTP protocol, status codes
•  JSON for requests & responses
•  Version safety (/v1/…)
•  Url endpoints (/v1/status, /v1/
objects, …)
{
"results": [
{
"code": 500.0,
"errors": [
"Error: Validation failed for object 'google.com'
of type 'Host'; Attribute 'check_command': Attribute must not be
empty."
],
"status": "Object could not be created."
}
]
}
•  Authentication & Authorization
•  HTTPS only via port 5665
•  Basic Auth and/or
•  Client certificates
•  Permissions (query, modify, actions,
…)
API – USE CASES
•  Create, modify & delete objects
•  At runtime, no reload
•  Static Apply-Rules evaluated at
runtime
•  Dependency tracking of objects
•  Cluster zone sync
curl -u root:icinga -k –s 
'https://localhost:5665/v1/objects/hosts/
puppetlabs.com' 
-X PUT 
-d '{ "attrs": {
"address": "52.10.10.141”,
"check_command": "hostalive”,
"vars.os" : "Linux”
}
}'
•  Object Queries
•  Configuration & Status
•  Access e.g. command line from
checks
•  Filter by attributes (same filters as
in config DSL)
•  Implicit joins
$ curl -u root:icinga -k -s 'https://
localhost:5665
/v1/objects/hosts/puppetlabs.com'
•  Actions
•  Schedule downtimes
•  Reschedule checks
•  Acknowledge problems
•  Multiple objects w/ filters, e.g. all
services in a NOT-OK state
$ curl -u root:icinga -k -s –X POST 'https://
localhost:5665
/v1/actions/reschedule-check
?filter=service.state!=0
&type=Service'
•  Status
•  Global feature statistics
•  /v1/status
$ curl -k -s -u root:icinga 'https://
localhost:5665/v1/status'
•  Manage configuration packages
•  Stages & Validation
•  Active runtime stage
•  Direct file access over the API
•  Used by Icinga Web 2 Config Tool
$ curl -k -s -u root:icinga -X POST 
https://localhost:5665/v1/config/packages/puppet
$ curl -k -s -u root:icinga -X POST 
https://localhost:5665/v1/config/stages/puppet 
-d '{
"files": {
"conf.d/test.conf": "object Host "cfg-mgmt
" { check_command = "dummy" }”
}
}'
•  Event Streams
•  Subscribe to (filtered) core events
•  Forward data to external apps
•  Same filters as in config DSL
•  Work-in-progress
2 API
Query, Create, Modify,
Delete Objects
Config
Packages
Status Actions
Event
Streams
CALL TO ACTION
Demo
CONCLUSION
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
•  Open Tasks
•  Event Streams missing
•  History API in 2016 (?)
•  v2.4 Release date: 11.11.2015
•  More at OSMC:
https://www.netways.de/en/
events_trainings/osmc/program/
•  Install Icinga 2 snapshot packages
•  Docker, Vagrant
•  http://docs.icinga.org/icinga2/snapshot/doc/module/
icinga2/chapter/icinga2-api#icinga2-api
•  Connect to
https://localhost:5665/v1/status
THANK YOU!
www.icinga.org
dev.icinga.org
git.icinga.org
@icinga
/icinga
+icinga

More Related Content

PPTX
Icinga 2 at Icinga Camp San Francisco
PDF
State of Development - Icinga Meetup Linz August 2019
PDF
Why favour Icinga over Nagios @ FrOSCon 2015
PPTX
Icinga lsm 2015 copy
PDF
Icinga @OSMC 2013
PDF
Why favor Icinga over Nagios @ DebConf15
PDF
ChatOps with Icinga and StackStorm
PDF
Icinga 2010 at OSMC
Icinga 2 at Icinga Camp San Francisco
State of Development - Icinga Meetup Linz August 2019
Why favour Icinga over Nagios @ FrOSCon 2015
Icinga lsm 2015 copy
Icinga @OSMC 2013
Why favor Icinga over Nagios @ DebConf15
ChatOps with Icinga and StackStorm
Icinga 2010 at OSMC

What's hot (20)

PDF
Icinga @GUUG 2013
PPTX
Icinga2 - Upcoming API for Icinga2
PDF
Icinga 2010 at Nagios Workshop
PDF
Icinga 2 and puppet: automate monitoring
PDF
Icinga 2011 at Chemnitzer Linuxtage
PPTX
Icinga Camp Barcelona - Icinga
PPTX
Icinga Camp Antwerp - Current State of Icinga
PDF
Why favour Icinga over Nagios @ OSDC 2015
PDF
Icinga Web 2 is more
PDF
Icinga 2 @ SIG-NOC Meeting
PPTX
Why favour Icinga over Nagios - Rootconf 2015
PPTX
Open Source Monitoring with Icinga at Fossasia 2015
PDF
Icinga Web 2 is more - Module magic at Icinga Camp San Francisco
PPTX
Monitoring Open Source Databases with Icinga
PDF
Icinga 2011 at Nagios Workshop
PPTX
Icinga Camp Antwerp - Icinga2 Cluster
PDF
Icinga 2012 Development at 6th TF-NOC Meeting
PDF
Icinga @CLT 2013
PDF
What is new in icinga2
PPTX
Icinga2 - Apify them all
Icinga @GUUG 2013
Icinga2 - Upcoming API for Icinga2
Icinga 2010 at Nagios Workshop
Icinga 2 and puppet: automate monitoring
Icinga 2011 at Chemnitzer Linuxtage
Icinga Camp Barcelona - Icinga
Icinga Camp Antwerp - Current State of Icinga
Why favour Icinga over Nagios @ OSDC 2015
Icinga Web 2 is more
Icinga 2 @ SIG-NOC Meeting
Why favour Icinga over Nagios - Rootconf 2015
Open Source Monitoring with Icinga at Fossasia 2015
Icinga Web 2 is more - Module magic at Icinga Camp San Francisco
Monitoring Open Source Databases with Icinga
Icinga 2011 at Nagios Workshop
Icinga Camp Antwerp - Icinga2 Cluster
Icinga 2012 Development at 6th TF-NOC Meeting
Icinga @CLT 2013
What is new in icinga2
Icinga2 - Apify them all
Ad

Similar to Icinga 2 API @ Icinga Camp Portland at Puppetlabs (20)

PDF
Icinga Camp San Diego 2016 - Apify them all
PDF
Icinga Camp San Diego: Apify them all
PDF
Icinga Camp Belgrade - Icinga 2 Apify Them All
PDF
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
PPTX
Introduction into Icinga
PPTX
State of Icinga - Linux Stammtisch München
PPTX
Afpified Monitoring with Icinga2
PPTX
Icinga2 in the middle of your toolstack
PPT
Icinga, evolution from Nagios clone to Standing on it's own
PDF
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
PPTX
Icinga Camp Antwerp - Icinga2 Configuration
ODP
Integrating icinga2 and the HashiCorp suite
PPTX
Icinga at Flossuk 2015 in York
PDF
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
PPTX
Loadays 2015 - Enterprise Monitoring with Icinga
PPTX
Icinga Camp Bangalore - Icinga integrations
PDF
Integrating icinga2 and the HashiCorp suite
PPTX
ICINGA (Monitoring Basics & Reporting)
PPTX
Icinga Camp Kuala Lumpur 2015 Opening By Eric Lippmann
PDF
Icinga 1, Icinga 2 @ FrOSCon 2014
Icinga Camp San Diego 2016 - Apify them all
Icinga Camp San Diego: Apify them all
Icinga Camp Belgrade - Icinga 2 Apify Them All
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
Introduction into Icinga
State of Icinga - Linux Stammtisch München
Afpified Monitoring with Icinga2
Icinga2 in the middle of your toolstack
Icinga, evolution from Nagios clone to Standing on it's own
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
Icinga Camp Antwerp - Icinga2 Configuration
Integrating icinga2 and the HashiCorp suite
Icinga at Flossuk 2015 in York
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Loadays 2015 - Enterprise Monitoring with Icinga
Icinga Camp Bangalore - Icinga integrations
Integrating icinga2 and the HashiCorp suite
ICINGA (Monitoring Basics & Reporting)
Icinga Camp Kuala Lumpur 2015 Opening By Eric Lippmann
Icinga 1, Icinga 2 @ FrOSCon 2014
Ad

More from Icinga (20)

PDF
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023
PDF
Extending Icinga Web with Modules: powerful, smart and easily created - Icing...
PDF
Infrastructure Monitoring for Cloud Native Enterprises - Icinga Camp Milan 2023
PDF
Incident management: Best industry practices your team should know - Icinga C...
PDF
Monitoring Cooling Units in a pharmaceutical GxP regulated environment - Icin...
PDF
SNMP Monitoring at scale - Icinga Camp Milan 2023
PPTX
Monitoring Kubernetes with Icinga - Icinga Camp Milan 2023
PPTX
Current State of Icinga - Icinga Camp Milan 2023
PDF
Efficient IT operations using monitoring systems and standardized tools - Ici...
PPTX
Tornado Complex Event Processing Framework for Icinga - Icinga Camp Zurich 2019
PDF
Signalilo: Visualizing Prometheus alerts in Icinga2 - Icinga Camp Zurich 2019
PDF
Moving from Icinga 1 to Icinga 2 + Director - Icinga Camp Zurich 2019
PDF
Icinga Director and vSphereDB - how they play together - Icinga Camp Zurich 2019
PDF
Current State of Icinga - Icinga Camp Zurich 2019
PDF
NetEye 4 based on Icinga 2 - Icinga Camp Milan 2019
PDF
Integrating Icinga 2 and ntopng - Icinga Camp Milan 2019
PDF
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
PPTX
Current State of Icinga - Icinga Camp Milan 2019
PPTX
Best of Icinga Modules - Icinga Camp Milan 2019
PPTX
hallenges of Monitoring Big Infrastructure - Icinga Camp Milan 2019
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023
Extending Icinga Web with Modules: powerful, smart and easily created - Icing...
Infrastructure Monitoring for Cloud Native Enterprises - Icinga Camp Milan 2023
Incident management: Best industry practices your team should know - Icinga C...
Monitoring Cooling Units in a pharmaceutical GxP regulated environment - Icin...
SNMP Monitoring at scale - Icinga Camp Milan 2023
Monitoring Kubernetes with Icinga - Icinga Camp Milan 2023
Current State of Icinga - Icinga Camp Milan 2023
Efficient IT operations using monitoring systems and standardized tools - Ici...
Tornado Complex Event Processing Framework for Icinga - Icinga Camp Zurich 2019
Signalilo: Visualizing Prometheus alerts in Icinga2 - Icinga Camp Zurich 2019
Moving from Icinga 1 to Icinga 2 + Director - Icinga Camp Zurich 2019
Icinga Director and vSphereDB - how they play together - Icinga Camp Zurich 2019
Current State of Icinga - Icinga Camp Zurich 2019
NetEye 4 based on Icinga 2 - Icinga Camp Milan 2019
Integrating Icinga 2 and ntopng - Icinga Camp Milan 2019
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
Current State of Icinga - Icinga Camp Milan 2019
Best of Icinga Modules - Icinga Camp Milan 2019
hallenges of Monitoring Big Infrastructure - Icinga Camp Milan 2019

Recently uploaded (20)

PPTX
Digital Literacy And Online Safety on internet
PPTX
artificial intelligence overview of it and more
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
E -tech empowerment technologies PowerPoint
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
Testing WebRTC applications at scale.pdf
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
Internet___Basics___Styled_ presentation
Digital Literacy And Online Safety on internet
artificial intelligence overview of it and more
RPKI Status Update, presented by Makito Lay at IDNOG 10
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
Decoding a Decade: 10 Years of Applied CTI Discipline
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Introuction about ICD -10 and ICD-11 PPT.pptx
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
E -tech empowerment technologies PowerPoint
Slides PDF The World Game (s) Eco Economic Epochs.pdf
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Testing WebRTC applications at scale.pdf
SASE Traffic Flow - ZTNA Connector-1.pdf
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
Job_Card_System_Styled_lorem_ipsum_.pptx
The Internet -By the Numbers, Sri Lanka Edition
WebRTC in SignalWire - troubleshooting media negotiation
Paper PDF World Game (s) Great Redesign.pdf
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Internet___Basics___Styled_ presentation

Icinga 2 API @ Icinga Camp Portland at Puppetlabs

  • 1. www.icinga.org Icinga 2: Apify them all Icinga Camp - Portland - 10/10/2015
  • 2. •  Michael Friedrich •  Core Developer •  6+ years #icingalove •  @dnsmichi
  • 4. •  Icinga 2 configuration DSL •  Apply, conditions, functions, … •  Features (Graphite, DB IDO, …) •  Standalone or Cluster with Clients •  Already there – what’s missing?
  • 6. •  Many existing interfaces •  Integration with other tools •  Can they satisfy my requirements?
  • 7. •  File based (status.dat, config files) •  Database (IDO) •  Unixsocket (Livestatus) •  FIFO (External Command Pipe)
  • 8. ICINGA 2 API – UNIFY THEM ALL
  • 9. •  Snmp traps as check results •  Metrics as event streams •  External command actions •  Status Queries •  Inventory: Use $tool to create objects at runtime
  • 11. •  RESTful url schema •  HTTP protocol, status codes •  JSON for requests & responses •  Version safety (/v1/…) •  Url endpoints (/v1/status, /v1/ objects, …)
  • 12. { "results": [ { "code": 500.0, "errors": [ "Error: Validation failed for object 'google.com' of type 'Host'; Attribute 'check_command': Attribute must not be empty." ], "status": "Object could not be created." } ] }
  • 13. •  Authentication & Authorization •  HTTPS only via port 5665 •  Basic Auth and/or •  Client certificates •  Permissions (query, modify, actions, …)
  • 14. API – USE CASES
  • 15. •  Create, modify & delete objects •  At runtime, no reload •  Static Apply-Rules evaluated at runtime •  Dependency tracking of objects •  Cluster zone sync
  • 16. curl -u root:icinga -k –s 'https://localhost:5665/v1/objects/hosts/ puppetlabs.com' -X PUT -d '{ "attrs": { "address": "52.10.10.141”, "check_command": "hostalive”, "vars.os" : "Linux” } }'
  • 17. •  Object Queries •  Configuration & Status •  Access e.g. command line from checks •  Filter by attributes (same filters as in config DSL) •  Implicit joins
  • 18. $ curl -u root:icinga -k -s 'https:// localhost:5665 /v1/objects/hosts/puppetlabs.com'
  • 19. •  Actions •  Schedule downtimes •  Reschedule checks •  Acknowledge problems •  Multiple objects w/ filters, e.g. all services in a NOT-OK state
  • 20. $ curl -u root:icinga -k -s –X POST 'https:// localhost:5665 /v1/actions/reschedule-check ?filter=service.state!=0 &type=Service'
  • 21. •  Status •  Global feature statistics •  /v1/status
  • 22. $ curl -k -s -u root:icinga 'https:// localhost:5665/v1/status'
  • 23. •  Manage configuration packages •  Stages & Validation •  Active runtime stage •  Direct file access over the API •  Used by Icinga Web 2 Config Tool
  • 24. $ curl -k -s -u root:icinga -X POST https://localhost:5665/v1/config/packages/puppet $ curl -k -s -u root:icinga -X POST https://localhost:5665/v1/config/stages/puppet -d '{ "files": { "conf.d/test.conf": "object Host "cfg-mgmt " { check_command = "dummy" }” } }'
  • 25. •  Event Streams •  Subscribe to (filtered) core events •  Forward data to external apps •  Same filters as in config DSL •  Work-in-progress
  • 26. 2 API Query, Create, Modify, Delete Objects Config Packages Status Actions Event Streams
  • 28. Demo
  • 34. •  Open Tasks •  Event Streams missing •  History API in 2016 (?) •  v2.4 Release date: 11.11.2015 •  More at OSMC: https://www.netways.de/en/ events_trainings/osmc/program/
  • 35. •  Install Icinga 2 snapshot packages •  Docker, Vagrant •  http://docs.icinga.org/icinga2/snapshot/doc/module/ icinga2/chapter/icinga2-api#icinga2-api •  Connect to https://localhost:5665/v1/status