SlideShare une entreprise Scribd logo
1  sur  36
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/puppetlab
s.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
• 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/icing
a2/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

Contenu connexe

Tendances

Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copy
NETWAYS
 
Cebit 2015 icinga
Cebit 2015 icingaCebit 2015 icinga
Cebit 2015 icinga
Icinga
 

Tendances (20)

Icinga 2 at Icinga Camp San Francisco
Icinga 2 at Icinga Camp San FranciscoIcinga 2 at Icinga Camp San Francisco
Icinga 2 at Icinga Camp San Francisco
 
State of Development - Icinga Meetup Linz August 2019
State of Development - Icinga Meetup Linz August 2019State of Development - Icinga Meetup Linz August 2019
State of Development - Icinga Meetup Linz August 2019
 
Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copy
 
Icinga Web 2 is more - Module magic at Icinga Camp San Francisco
Icinga Web 2 is more - Module magic at Icinga Camp San FranciscoIcinga Web 2 is more - Module magic at Icinga Camp San Francisco
Icinga Web 2 is more - Module magic at Icinga Camp San Francisco
 
Icinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate MonitoringIcinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate Monitoring
 
Why favour Icinga over Nagios - Rootconf 2015
Why favour Icinga over Nagios - Rootconf 2015Why favour Icinga over Nagios - Rootconf 2015
Why favour Icinga over Nagios - Rootconf 2015
 
Icinga @OSMC 2013
Icinga @OSMC 2013Icinga @OSMC 2013
Icinga @OSMC 2013
 
Icinga Camp Barcelona - Icinga
Icinga Camp Barcelona - IcingaIcinga Camp Barcelona - Icinga
Icinga Camp Barcelona - Icinga
 
Icinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them all
 
Monitoring Open Source Databases with Icinga
Monitoring Open Source Databases with IcingaMonitoring Open Source Databases with Icinga
Monitoring Open Source Databases with Icinga
 
Monitoring as code
Monitoring as codeMonitoring as code
Monitoring as code
 
Icinga 2010 at OSMC
Icinga 2010 at OSMCIcinga 2010 at OSMC
Icinga 2010 at OSMC
 
Icinga @GUUG 2013
Icinga @GUUG 2013Icinga @GUUG 2013
Icinga @GUUG 2013
 
Why favour Icinga over Nagios @ OSDC 2015
Why favour Icinga over Nagios @ OSDC 2015Why favour Icinga over Nagios @ OSDC 2015
Why favour Icinga over Nagios @ OSDC 2015
 
Icinga 2011 at Chemnitzer Linuxtage
Icinga 2011 at Chemnitzer LinuxtageIcinga 2011 at Chemnitzer Linuxtage
Icinga 2011 at Chemnitzer Linuxtage
 
Open Source Monitoring with Icinga at Fossasia 2015
Open Source Monitoring with Icinga at Fossasia 2015Open Source Monitoring with Icinga at Fossasia 2015
Open Source Monitoring with Icinga at Fossasia 2015
 
Cebit 2015 icinga
Cebit 2015 icingaCebit 2015 icinga
Cebit 2015 icinga
 
Icinga Web 2 is more
Icinga Web 2 is moreIcinga Web 2 is more
Icinga Web 2 is more
 
Icinga Camp Antwerp - Current State of Icinga
Icinga Camp Antwerp - Current State of IcingaIcinga Camp Antwerp - Current State of Icinga
Icinga Camp Antwerp - Current State of Icinga
 
Icinga Camp Barcelona - Current State of Icinga
Icinga Camp Barcelona - Current State of IcingaIcinga Camp Barcelona - Current State of Icinga
Icinga Camp Barcelona - Current State of Icinga
 

En vedette

En vedette (16)

Icinga 2 @ SIG-NOC Meeting
Icinga 2 @ SIG-NOC MeetingIcinga 2 @ SIG-NOC Meeting
Icinga 2 @ SIG-NOC Meeting
 
Icinga 2011 at FrOSCon 6
Icinga 2011 at FrOSCon 6Icinga 2011 at FrOSCon 6
Icinga 2011 at FrOSCon 6
 
IcingaCamp Portland 2015 - Welcome
IcingaCamp Portland 2015 - WelcomeIcingaCamp Portland 2015 - Welcome
IcingaCamp Portland 2015 - Welcome
 
Icinga 2010 at CeBIT
Icinga 2010 at CeBITIcinga 2010 at CeBIT
Icinga 2010 at CeBIT
 
Icinga 2011 at OSMC
Icinga 2011 at OSMCIcinga 2011 at OSMC
Icinga 2011 at OSMC
 
Icinga Camp Barcelona - Icinga Web 2
Icinga Camp Barcelona - Icinga Web 2Icinga Camp Barcelona - Icinga Web 2
Icinga Camp Barcelona - Icinga Web 2
 
Icinga at Flossuk 2015 in York
Icinga at Flossuk 2015 in YorkIcinga at Flossuk 2015 in York
Icinga at Flossuk 2015 in York
 
Icinga Web 2 at Icinga Camp San Francisco
Icinga Web 2 at Icinga Camp San FranciscoIcinga Web 2 at Icinga Camp San Francisco
Icinga Web 2 at Icinga Camp San Francisco
 
Icinga 2011 at Nagios Workshop
Icinga 2011 at Nagios WorkshopIcinga 2011 at Nagios Workshop
Icinga 2011 at Nagios Workshop
 
Icinga 1, Icinga 2 @ FrOSCon 2014
Icinga 1, Icinga 2 @ FrOSCon 2014Icinga 1, Icinga 2 @ FrOSCon 2014
Icinga 1, Icinga 2 @ FrOSCon 2014
 
Icinga Web 2 at Icinga Camp Antwerp
Icinga Web 2 at Icinga Camp AntwerpIcinga Web 2 at Icinga Camp Antwerp
Icinga Web 2 at Icinga Camp Antwerp
 
Welcome Icinga Camp San Francisco 2014
Welcome Icinga Camp San Francisco 2014Welcome Icinga Camp San Francisco 2014
Welcome Icinga Camp San Francisco 2014
 
Loadays 2015 - Enterprise Monitoring with Icinga
Loadays 2015 - Enterprise Monitoring with IcingaLoadays 2015 - Enterprise Monitoring with Icinga
Loadays 2015 - Enterprise Monitoring with Icinga
 
Icinga @ OSMC 2014
Icinga @ OSMC 2014Icinga @ OSMC 2014
Icinga @ OSMC 2014
 
Icinga Camp Antwerp - Icinga2 Cluster
Icinga Camp Antwerp - Icinga2 ClusterIcinga Camp Antwerp - Icinga2 Cluster
Icinga Camp Antwerp - Icinga2 Cluster
 
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrateToshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
 

Similaire à Icinga2 - Upcoming API for Icinga2

Similaire à Icinga2 - Upcoming API for Icinga2 (20)

Icinga Camp San Diego 2016 - Apify them all
Icinga Camp San Diego 2016 - Apify them allIcinga Camp San Diego 2016 - Apify them all
Icinga Camp San Diego 2016 - Apify them all
 
Icinga 2009 at OSMC
Icinga 2009 at OSMCIcinga 2009 at OSMC
Icinga 2009 at OSMC
 
OSMC 2009 | Icinga by Icinga Team
OSMC 2009 | Icinga by Icinga TeamOSMC 2009 | Icinga by Icinga Team
OSMC 2009 | Icinga by Icinga Team
 
State of Icinga - Linux Stammtisch München
State of Icinga - Linux Stammtisch MünchenState of Icinga - Linux Stammtisch München
State of Icinga - Linux Stammtisch München
 
Icinga2 - Apify them all
Icinga2 - Apify them allIcinga2 - Apify them all
Icinga2 - Apify them all
 
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
OSDC 2015: Bernd Erk | Why favour Icinga over NagiosOSDC 2015: Bernd Erk | Why favour Icinga over Nagios
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
 
OSMC 2014: Current state of Icinga | Icinga Team
OSMC 2014: Current state of Icinga | Icinga TeamOSMC 2014: Current state of Icinga | Icinga Team
OSMC 2014: Current state of Icinga | Icinga Team
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
 
Make BDD great again
Make BDD great againMake BDD great again
Make BDD great again
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015
 
Icinga Camp Belgrade - Icinga 2 Apify Them All
Icinga Camp Belgrade - Icinga 2 Apify Them AllIcinga Camp Belgrade - Icinga 2 Apify Them All
Icinga Camp Belgrade - Icinga 2 Apify Them All
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
 
OSMC 2014 | Curret State of Icinga by Icinga Team
OSMC 2014 | Curret State of Icinga by Icinga TeamOSMC 2014 | Curret State of Icinga by Icinga Team
OSMC 2014 | Curret State of Icinga by Icinga Team
 
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
 
Icinga2 in the middle of your toolstack
Icinga2 in the middle of your toolstackIcinga2 in the middle of your toolstack
Icinga2 in the middle of your toolstack
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 

Plus de Icinga

Plus de Icinga (20)

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

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Icinga2 - Upcoming API for Icinga2

  • 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/puppetlab s.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
  • 30.
  • 31.
  • 32.
  • 33.
  • 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/icing a2/chapter/icinga2-api#icinga2-api • Connect to https://localhost:5665/v1/status