SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
www.icinga.org
#icingacamp – San Diego – 10/18/2016
ICINGA 2 – APIFY THEM ALL
• Michael Friedrich
• Icinga 2 Developer & Community Lead
• Senior Developer @NETWAYS
• 7+ years #icingalove
• @dnsmichi
ICINGA 2 - API
• HTTP with RESTful Url Schema
• ApiUser config object
• X.509 and/or Basic Auth
ApiUser Object
object ApiUser "root" {
password = "icinga”
permissions = [ "*" ]
}
ApiUser Permissions
permissions = [
{
permission = "objects/query/Host"
filter = {{ regex("^Linux", host.vars.os) }}
},
{
permission = "objects/query/Service"
filter = {{ regex("^Linux", host.vars.os) }}
}
]
• create, modify and delete objects
• query objects and status
• run actions
• subscribe to events
• manage configuration packages
• Status, Objects, Actions and Events
• Simple filter
services?service=localhost!ping6
• Advanced filter
type=Service&filter=service.name==%22ping6%22
(Hint: assign where expressions)
• Configuration management
• New standard config API
• Support for Packages and Stages
• No more SSH transport, all HTTP
• Used by the Icinga Director
• Event Streams
• Based on types
CheckResult, StateChange, Notification, Acknowledgement*, Comment*,
Downtime*
• Use filters
Example: Receive all check results where the state is not OK.
$ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 
'https://192.168.33.5:5665/v1/events' 
-d '{ "queue": "mine", "types": [ "CheckResult" ], "filter":
"event.check_result.state != 0" }'
Demo
API CLIENTS
Icinga Studio
Icinga 2 console
# ICINGA2_API_PASSWORD=icinga icinga2 console --connect
'https://root@localhost:5665/' --eval
'get_host(NodeName).last_check_result.command' | python -m
json.tool
[
"/usr/lib64/nagios/plugins/check_ping",
"-H",
"127.0.0.1",
"-c",
"5000,100%",
"-w",
"3000,80%"
]
Icinga 2 Dashing
Icinga Director
Bitbar for OSX
aNag for Android
Programmatic examples: Event Streams
Paw for MacOS
ICINGA 2 API – COMMUNITY
• Libraries
• python-icinga2api: https://pypi.python.org/pypi/python-
icinga2api
• go-icinga2: https://github.com/xert/go-icinga2
• Management
• Foreman Smart Proxy:
https://github.com/theforeman/smart_proxy_monitoring
• Terraform Provider: https://github.com/lrsmith/terraform-
provider-icinga2
• Status
• Grafana Plugin: https://github.com/tegud/grafana-icinga2api
• aNag on Android:
https://damien.degois.info/android/aNag/summary
• BitBar OSX:
https://getbitbar.com/plugins/Dev/Icinga2/icinga2.24m.py
• Event Streams
• Logstash input: https://github.com/bobapple/logstash-input-
icinga_eventstream
• Flapjack events: https://github.com/sol1/flapjack-icinga2
• Actions
• Lita handler: https://github.com/tuxmea/lita-icinga2
• Sakuli Forwarder:
http://sakuli.readthedocs.io/en/dev/forwarder-icinga2api/
• mqttwarn: https://github.com/jpmens/mqttwarn#icinga2
• OpsGenie actions:
https://www.opsgenie.com/docs/integrations/icinga2-
integration
ICINGA 2 API – WHAT’S NEXT?
• More libraries
• Elastic Beats integration
• Puppet/Ansible/Chef/Salt Hook
• Nagstamon, NagVis, …
• Send a PR:
https://github.com/Icinga/icinga2-api-
examples
CONCLUSION
• Download Icinga 2
• Play with the Vagrant boxes
• Check the API docs
• Share your ideas & API clients
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
 

Tendances (20)

Icinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrationsIcinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrations
 
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
 
Icinga Camp Berlin 2017 - Icinga Director
Icinga Camp Berlin 2017 - Icinga DirectorIcinga Camp Berlin 2017 - Icinga Director
Icinga Camp Berlin 2017 - Icinga Director
 
Icinga Camp Amsterdam - How to monitor Windows
Icinga Camp Amsterdam - How to monitor WindowsIcinga Camp Amsterdam - How to monitor Windows
Icinga Camp Amsterdam - How to monitor Windows
 
Icinga Camp Amsterdam - Introduction into Icinga Web 2
Icinga Camp Amsterdam - Introduction into Icinga Web 2Icinga Camp Amsterdam - Introduction into Icinga Web 2
Icinga Camp Amsterdam - Introduction into Icinga Web 2
 
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
 
MoniTutor
MoniTutorMoniTutor
MoniTutor
 
Icinga 2012 at Monitoring Workshop
Icinga 2012 at Monitoring WorkshopIcinga 2012 at Monitoring Workshop
Icinga 2012 at Monitoring Workshop
 
Loadays 2015 - Enterprise Monitoring with Icinga
Loadays 2015 - Enterprise Monitoring with IcingaLoadays 2015 - Enterprise Monitoring with Icinga
Loadays 2015 - Enterprise Monitoring with Icinga
 
Icinga at Flossuk 2015 in York
Icinga at Flossuk 2015 in YorkIcinga at Flossuk 2015 in York
Icinga at Flossuk 2015 in York
 
Icinga Camp Berlin 2017 - Welcome & State of Icinga
Icinga Camp Berlin 2017 - Welcome & State of IcingaIcinga Camp Berlin 2017 - Welcome & State of Icinga
Icinga Camp Berlin 2017 - Welcome & State of Icinga
 
Icinga2 - Apify them all
Icinga2 - Apify them allIcinga2 - Apify them all
Icinga2 - Apify them all
 
Afpified Monitoring with Icinga2
Afpified Monitoring with Icinga2Afpified Monitoring with Icinga2
Afpified Monitoring with Icinga2
 
Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copy
 
Icinga Camp Bangalore - Icinga2 and Salt Stack at SnapDeal
Icinga Camp Bangalore - Icinga2 and Salt Stack at SnapDealIcinga Camp Bangalore - Icinga2 and Salt Stack at SnapDeal
Icinga Camp Bangalore - Icinga2 and Salt Stack at SnapDeal
 
Icinga Camp San Diego 2016 - Icinga Director
Icinga Camp San Diego 2016 - Icinga DirectorIcinga Camp San Diego 2016 - Icinga Director
Icinga Camp San Diego 2016 - Icinga Director
 
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
 
Icinga Web 2 is more
Icinga Web 2 is moreIcinga Web 2 is more
Icinga Web 2 is more
 
Icinga @OSMC 2013
Icinga @OSMC 2013Icinga @OSMC 2013
Icinga @OSMC 2013
 
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
 

En vedette

En vedette (20)

IcingaCamp Stockholm - How to make your monitoring shut up
IcingaCamp Stockholm - How to make your monitoring shut upIcingaCamp Stockholm - How to make your monitoring shut up
IcingaCamp Stockholm - How to make your monitoring shut up
 
Icinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga DirectorIcinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga Director
 
Icinga Camp Belgrade - ITAF Introduction
Icinga Camp Belgrade - ITAF IntroductionIcinga Camp Belgrade - ITAF Introduction
Icinga Camp Belgrade - ITAF Introduction
 
Icinga Camp Amsterdam - Infrastructure as Code
Icinga Camp Amsterdam - Infrastructure as CodeIcinga Camp Amsterdam - Infrastructure as Code
Icinga Camp Amsterdam - Infrastructure as Code
 
Icinga Camp Amsterdam - Monitoring – When to start
Icinga Camp Amsterdam - Monitoring – When to startIcinga Camp Amsterdam - Monitoring – When to start
Icinga Camp Amsterdam - Monitoring – When to start
 
IcingaCamp Stockholm - Icinga Web2
IcingaCamp Stockholm - Icinga Web2IcingaCamp Stockholm - Icinga Web2
IcingaCamp Stockholm - Icinga Web2
 
Icinga Camp Amsterdam - Icinga2 and Ansible
Icinga Camp Amsterdam - Icinga2 and AnsibleIcinga Camp Amsterdam - Icinga2 and Ansible
Icinga Camp Amsterdam - Icinga2 and Ansible
 
IcingaCamp Stockholm - Opening
IcingaCamp Stockholm - OpeningIcingaCamp Stockholm - Opening
IcingaCamp Stockholm - Opening
 
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
 
Icinga Camp Amsterdam - Icinga2 and Puppet
Icinga Camp Amsterdam - Icinga2 and PuppetIcinga Camp Amsterdam - Icinga2 and Puppet
Icinga Camp Amsterdam - Icinga2 and Puppet
 
Icinga Camp Belgrade - ITAF Monitoring best practices & demo
Icinga Camp Belgrade - ITAF Monitoring best practices & demoIcinga Camp Belgrade - ITAF Monitoring best practices & demo
Icinga Camp Belgrade - ITAF Monitoring best practices & demo
 
Icinga Camp Belgrade - State of Icinga
Icinga Camp Belgrade - State of IcingaIcinga Camp Belgrade - State of Icinga
Icinga Camp Belgrade - State of Icinga
 
Icinga Camp Belgrade - Icinga Web 2
Icinga Camp Belgrade - Icinga Web 2Icinga Camp Belgrade - Icinga Web 2
Icinga Camp Belgrade - Icinga Web 2
 
Monitoring Open Source Databases with Icinga
Monitoring Open Source Databases with IcingaMonitoring Open Source Databases with Icinga
Monitoring Open Source Databases with Icinga
 
IcingaCamp Stockholm - NSClient++
IcingaCamp Stockholm - NSClient++IcingaCamp Stockholm - NSClient++
IcingaCamp Stockholm - NSClient++
 
Icinga Camp Amsterdam - Icinga, Graphite, Grafana
Icinga Camp Amsterdam - Icinga, Graphite, GrafanaIcinga Camp Amsterdam - Icinga, Graphite, Grafana
Icinga Camp Amsterdam - Icinga, Graphite, Grafana
 
Icinga Camp San Diego 2016 - Opening
Icinga Camp San Diego 2016 - OpeningIcinga Camp San Diego 2016 - Opening
Icinga Camp San Diego 2016 - Opening
 
Icinga Camp San Diego 2016 - Enter the Metrics
Icinga Camp San Diego 2016 - Enter the MetricsIcinga Camp San Diego 2016 - Enter the Metrics
Icinga Camp San Diego 2016 - Enter the Metrics
 
Saluki - do it like a user
Saluki - do it like a userSaluki - do it like a user
Saluki - do it like a user
 
IcingaCamp Stockholm - Graphing with Graphite und Grafana
IcingaCamp Stockholm - Graphing with Graphite und GrafanaIcingaCamp Stockholm - Graphing with Graphite und Grafana
IcingaCamp Stockholm - Graphing with Graphite und Grafana
 

Similaire à Icinga Camp San Diego: Apify them all

Similaire à Icinga Camp San Diego: Apify them all (20)

Icinga2 - Upcoming API for Icinga2
Icinga2 - Upcoming API for Icinga2Icinga2 - Upcoming API for Icinga2
Icinga2 - Upcoming API for Icinga2
 
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga 2 API @ Icinga Camp Portland at PuppetlabsIcinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey LensenOSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Auto Scaling Groups
Auto Scaling GroupsAuto Scaling Groups
Auto Scaling Groups
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails example
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
 
Icinga 2010 at Nagios Workshop
Icinga 2010 at Nagios WorkshopIcinga 2010 at Nagios Workshop
Icinga 2010 at Nagios Workshop
 
Journey to the Cloud
Journey to the CloudJourney to the Cloud
Journey to the Cloud
 
how to use openstack api
how to use openstack apihow to use openstack api
how to use openstack api
 
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NYPuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
 
ELK: a log management framework
ELK: a log management frameworkELK: a log management framework
ELK: a log management framework
 
Running High-Speed Serverless with nuclio
Running High-Speed Serverless with nuclioRunning High-Speed Serverless with nuclio
Running High-Speed Serverless with nuclio
 
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
 
api-platform: the ultimate API platform
api-platform: the ultimate API platformapi-platform: the ultimate API platform
api-platform: the ultimate API platform
 
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
 
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
 
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
 

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

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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)
 

Icinga Camp San Diego: Apify them all

  • 1. www.icinga.org #icingacamp – San Diego – 10/18/2016 ICINGA 2 – APIFY THEM ALL
  • 2. • Michael Friedrich • Icinga 2 Developer & Community Lead • Senior Developer @NETWAYS • 7+ years #icingalove • @dnsmichi
  • 4. • HTTP with RESTful Url Schema • ApiUser config object • X.509 and/or Basic Auth
  • 5. ApiUser Object object ApiUser "root" { password = "icinga” permissions = [ "*" ] }
  • 6. ApiUser Permissions permissions = [ { permission = "objects/query/Host" filter = {{ regex("^Linux", host.vars.os) }} }, { permission = "objects/query/Service" filter = {{ regex("^Linux", host.vars.os) }} } ]
  • 7. • create, modify and delete objects • query objects and status • run actions • subscribe to events • manage configuration packages
  • 8. • Status, Objects, Actions and Events • Simple filter services?service=localhost!ping6 • Advanced filter type=Service&filter=service.name==%22ping6%22 (Hint: assign where expressions)
  • 9. • Configuration management • New standard config API • Support for Packages and Stages • No more SSH transport, all HTTP • Used by the Icinga Director
  • 10. • Event Streams • Based on types CheckResult, StateChange, Notification, Acknowledgement*, Comment*, Downtime* • Use filters Example: Receive all check results where the state is not OK. $ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://192.168.33.5:5665/v1/events' -d '{ "queue": "mine", "types": [ "CheckResult" ], "filter": "event.check_result.state != 0" }'
  • 11. Demo
  • 14. Icinga 2 console # ICINGA2_API_PASSWORD=icinga icinga2 console --connect 'https://root@localhost:5665/' --eval 'get_host(NodeName).last_check_result.command' | python -m json.tool [ "/usr/lib64/nagios/plugins/check_ping", "-H", "127.0.0.1", "-c", "5000,100%", "-w", "3000,80%" ]
  • 21. ICINGA 2 API – COMMUNITY
  • 22. • Libraries • python-icinga2api: https://pypi.python.org/pypi/python- icinga2api • go-icinga2: https://github.com/xert/go-icinga2 • Management • Foreman Smart Proxy: https://github.com/theforeman/smart_proxy_monitoring • Terraform Provider: https://github.com/lrsmith/terraform- provider-icinga2
  • 23. • Status • Grafana Plugin: https://github.com/tegud/grafana-icinga2api • aNag on Android: https://damien.degois.info/android/aNag/summary • BitBar OSX: https://getbitbar.com/plugins/Dev/Icinga2/icinga2.24m.py • Event Streams • Logstash input: https://github.com/bobapple/logstash-input- icinga_eventstream • Flapjack events: https://github.com/sol1/flapjack-icinga2
  • 24. • Actions • Lita handler: https://github.com/tuxmea/lita-icinga2 • Sakuli Forwarder: http://sakuli.readthedocs.io/en/dev/forwarder-icinga2api/ • mqttwarn: https://github.com/jpmens/mqttwarn#icinga2 • OpsGenie actions: https://www.opsgenie.com/docs/integrations/icinga2- integration
  • 25. ICINGA 2 API – WHAT’S NEXT?
  • 26. • More libraries • Elastic Beats integration • Puppet/Ansible/Chef/Salt Hook • Nagstamon, NagVis, … • Send a PR: https://github.com/Icinga/icinga2-api- examples
  • 28. • Download Icinga 2 • Play with the Vagrant boxes • Check the API docs • Share your ideas & API clients