SlideShare a Scribd company logo
Cfgmgmt Camp | Gent | 07.02.2017
Monitoring as Code
Icinga 2
07.02.2017
• Blerim Sheqa
• Product Manager
Partners & Integration
• Working @netways
• @bobapple
Monitoring as code
Introduction to Icinga 2
Icinga is a scalable and extensible monitoring system
which checks the availability of your resources, notifies
users of outages and provides extensive metrics.
availability notifies
metrics
Checker
Notify
Gelf
Perfdata Graphite
IDO
InfluxDB
Livestatus
• Multithreaded
• Modular Features
• Zone support
• Secure Agent
• Availability and scaling zones
• Automatic redistribution of checks
• Zones for multitenancy environments
zones
redistribution
multitenancy
Automation
Monitoring as code
Configuration
• Objects
• Rule based
• Conditions
• Loops
• Custom Functions
Rule
object Host "demo.icinga.com" {
import "generic-host"
address = "127.0.0.1"
address6 = "::1"
vars.os = "Linux
}
vars.os = "Linux"
Rules
apply Service "ssh" {
import "generic-service"
check_command = "ssh"
assign where host.vars.os == "Linux"
ignore where host.vars.dev == true
}
assign
Monitoring as code
More Rules
object Host "demo.icinga.com" {
import "generic-host"
address = "127.0.0.1"
address6 = "::1"
vars.http_vhosts["Icinga Web 2"
http_uri = "/icingaweb2"
}
vars.http_vhosts["Grafana"] = {
http_port = 3000
}
}
vars.http_vhosts["Icinga Web 2"] = {
http_uri = "/icingaweb2"
}
apply Service for (
){
import "generic-service"
display_name = "http " + http_vhost
check_command = "http"
}
vars += config
http_vhost => config in host.vars_http_vhosts
Monitoring as code
object Host "demo.icinga.com" {
import "generic-host"
address = "127.0.0.1"
address6 = "::1"
vars.mysql_instance["instance-1"] = {
mysql_health_port = 3306
mysql_health_username = "user1”
mysql_health_password = "supersecret”
}
vars.mysql_instance["instance-2"] = {
mysql_health_port = 3307
mysql_health_username = "user2”
mysql_health_password = "verysecret"
}
}
Conditions
apply Service "dummy" {
import "generic-service"
check_command = "dummy"
if (host.vars.environment == "dev {
check_interval = 30m
} else {
check_interval = 5m
}
assign where match("srv-*", host.name)
}
if (host.vars.environment == "dev")
Functions
object Service ”Load" {
check_command = "load”
host_name = ”backup.abc.com”
vars.load_warning = {{
{
return 20
} else {
return 5
}
}}
}
if (get_time_period("backup").is_inside)
API
• HTTP with RESTful Url Schema
• X.509 and/or Basic Auth
• Create, Modify and Delete objects
• Event Stream based on Types and
Filters
RESTful
Director
• Config via Webinterface
• Config Import
• Versioning
• API
• Import Sources
• AWS
• SQL
• LDAP
• PuppetDB
• Files
object Host "demo.icinga.com" {
import "generic-host"
address = "127.0.0.1"
address6 = "::1"
vars.kernel = ”linux”
vars.osfamily = “debian”
vars.domain = “example.com”
vars.manufacturer = “Dill”
vars.is_virtual = false
}
Monitoring as code
• Periodic Imports
• Hands-Free Config Deployments
Monitoring as code
• Versioning
• Full Audit Log
• Fast Config Reverts
Monitoring as code
Conclusion
• Download Icinga 2 and Icinga Web 2
• Play with the Vagrant boxes
• Rethink your configuration
• Give us feedback
Vagrant boxes
www.icinga.org
dev.icinga.org
git.icinga.org
Thank You!
@icinga
/icinga
+icinga

More Related Content

What's hot (20)

PPTX
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
Icinga
 
PDF
IcingaCamp Stockholm - Graphing with Graphite und Grafana
Icinga
 
PPTX
Icinga Camp Berlin 2017 - Icinga Web 2 - How to Write Modules
Icinga
 
PPTX
Icinga lsm 2015 copy
NETWAYS
 
PDF
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga
 
PPTX
Monitoring Open Source Databases with Icinga
Icinga
 
PDF
State of Development - Icinga Meetup Linz August 2019
Icinga
 
PDF
Icinga 2 and puppet: automate monitoring
OlinData
 
PDF
What is new in icinga2
Icinga
 
PDF
Icinga Web 2 is more
Icinga
 
PDF
Why favor Icinga over Nagios @ DebConf15
Icinga
 
PPTX
Icinga Camp Barcelona - Icinga
Icinga
 
PDF
Monitoring with Icinga2 at Adobe
Icinga
 
PDF
Icinga 2010 at Nagios Workshop
Icinga
 
PPTX
Introduction into Icinga
Icinga
 
PPTX
Icinga 2 at Icinga Camp San Francisco
Icinga
 
PDF
Icinga @OSMC 2013
Icinga
 
PPTX
Monitor OpenStack Environments from the bottom up and front to back
Icinga
 
PPTX
Why favour Icinga over Nagios - Rootconf 2015
Icinga
 
PDF
Icinga 2012 at Monitoring Workshop
Icinga
 
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
Icinga
 
IcingaCamp Stockholm - Graphing with Graphite und Grafana
Icinga
 
Icinga Camp Berlin 2017 - Icinga Web 2 - How to Write Modules
Icinga
 
Icinga lsm 2015 copy
NETWAYS
 
Icinga 2 API @ Icinga Camp Portland at Puppetlabs
Icinga
 
Monitoring Open Source Databases with Icinga
Icinga
 
State of Development - Icinga Meetup Linz August 2019
Icinga
 
Icinga 2 and puppet: automate monitoring
OlinData
 
What is new in icinga2
Icinga
 
Icinga Web 2 is more
Icinga
 
Why favor Icinga over Nagios @ DebConf15
Icinga
 
Icinga Camp Barcelona - Icinga
Icinga
 
Monitoring with Icinga2 at Adobe
Icinga
 
Icinga 2010 at Nagios Workshop
Icinga
 
Introduction into Icinga
Icinga
 
Icinga 2 at Icinga Camp San Francisco
Icinga
 
Icinga @OSMC 2013
Icinga
 
Monitor OpenStack Environments from the bottom up and front to back
Icinga
 
Why favour Icinga over Nagios - Rootconf 2015
Icinga
 
Icinga 2012 at Monitoring Workshop
Icinga
 

Viewers also liked (20)

PPTX
Icinga2 in the middle of your toolstack
Icinga
 
PDF
Icinga Director
Icinga
 
PPTX
Icinga Camp Berlin 2017 - Integrations all the way
Icinga
 
PDF
Icinga Camp San Diego 2016 - Icinga Director
Icinga
 
PPTX
Icinga Camp San Diego 2016 - Opening
Icinga
 
PPTX
Icinga Camp San Diego 2016 - Icinga Web 2
Icinga
 
ODP
Icinga Camp Berlin 2017 - How to write check plugins, part 1
Icinga
 
PDF
MoniTutor
Icinga
 
PDF
Icinga Camp San Diego 2016 - Unrealized Role of Monitoring
Icinga
 
PPTX
Afpified Monitoring with Icinga2
Icinga
 
PDF
Icinga Camp San Diego 2016 - Apify them all
Icinga
 
PDF
IcingaCamp Stockholm - NSClient++
Icinga
 
PPTX
Icinga Camp Berlin 2017 - Welcome & State of Icinga
Icinga
 
PPTX
Icinga2 - Apify them all
Icinga
 
PDF
Saluki - do it like a user
Icinga
 
PPTX
Icinga Camp Berlin 2016 - Opening
Icinga
 
PDF
Icinga Camp Amsterdam - Icinga2 and Puppet
Icinga
 
PDF
Collaborative communication
Icinga
 
PPTX
Presentation about Icinga at Kiratech DevOps Day in Verona
Icinga
 
PDF
Icinga Camp Amsterdam - Icinga Director
Icinga
 
Icinga2 in the middle of your toolstack
Icinga
 
Icinga Director
Icinga
 
Icinga Camp Berlin 2017 - Integrations all the way
Icinga
 
Icinga Camp San Diego 2016 - Icinga Director
Icinga
 
Icinga Camp San Diego 2016 - Opening
Icinga
 
Icinga Camp San Diego 2016 - Icinga Web 2
Icinga
 
Icinga Camp Berlin 2017 - How to write check plugins, part 1
Icinga
 
MoniTutor
Icinga
 
Icinga Camp San Diego 2016 - Unrealized Role of Monitoring
Icinga
 
Afpified Monitoring with Icinga2
Icinga
 
Icinga Camp San Diego 2016 - Apify them all
Icinga
 
IcingaCamp Stockholm - NSClient++
Icinga
 
Icinga Camp Berlin 2017 - Welcome & State of Icinga
Icinga
 
Icinga2 - Apify them all
Icinga
 
Saluki - do it like a user
Icinga
 
Icinga Camp Berlin 2016 - Opening
Icinga
 
Icinga Camp Amsterdam - Icinga2 and Puppet
Icinga
 
Collaborative communication
Icinga
 
Presentation about Icinga at Kiratech DevOps Day in Verona
Icinga
 
Icinga Camp Amsterdam - Icinga Director
Icinga
 
Ad

Similar to Monitoring as code (20)

PDF
Why favour Icinga over Nagios @ OSDC 2015
Icinga
 
PDF
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
NETWAYS
 
PPTX
Icinga Camp Kuala Lumpur 2015 Opening By Eric Lippmann
Icinga
 
PDF
Why favour Icinga over Nagios @ FrOSCon 2015
Icinga
 
PPTX
ICINGA (Monitoring Basics & Reporting)
Mohammad Awais Javaid
 
PDF
Icinga 2 @ SIG-NOC Meeting
Icinga
 
PDF
Icinga2 Hacking Session 2014-10-10
Icinga
 
PDF
Icinga2 api use cases
roy peter
 
PPTX
Icinga Camp Antwerp - Icinga2 Configuration
Icinga
 
PPTX
Icinga at Flossuk 2015 in York
Icinga
 
PPTX
Loadays 2015 - Enterprise Monitoring with Icinga
Icinga
 
PDF
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
NETWAYS
 
PDF
OSMC 2015 | Current State of Icinga by Icinga Team
NETWAYS
 
PPTX
State of Icinga - Linux Stammtisch München
Icinga
 
PPT
Icinga, evolution from Nagios clone to Standing on it's own
Assaf Flatto
 
PDF
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebula Project
 
PPTX
Open Source Monitoring with Icinga at Fossasia 2015
Icinga
 
PPTX
Cebit 2015 icinga
Icinga
 
PPTX
Osbizconference 2015 Icinga 2 by Eric Lippmann
Icinga
 
PDF
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
Marco Amado
 
Why favour Icinga over Nagios @ OSDC 2015
Icinga
 
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
NETWAYS
 
Icinga Camp Kuala Lumpur 2015 Opening By Eric Lippmann
Icinga
 
Why favour Icinga over Nagios @ FrOSCon 2015
Icinga
 
ICINGA (Monitoring Basics & Reporting)
Mohammad Awais Javaid
 
Icinga 2 @ SIG-NOC Meeting
Icinga
 
Icinga2 Hacking Session 2014-10-10
Icinga
 
Icinga2 api use cases
roy peter
 
Icinga Camp Antwerp - Icinga2 Configuration
Icinga
 
Icinga at Flossuk 2015 in York
Icinga
 
Loadays 2015 - Enterprise Monitoring with Icinga
Icinga
 
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
NETWAYS
 
OSMC 2015 | Current State of Icinga by Icinga Team
NETWAYS
 
State of Icinga - Linux Stammtisch München
Icinga
 
Icinga, evolution from Nagios clone to Standing on it's own
Assaf Flatto
 
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebula Project
 
Open Source Monitoring with Icinga at Fossasia 2015
Icinga
 
Cebit 2015 icinga
Icinga
 
Osbizconference 2015 Icinga 2 by Eric Lippmann
Icinga
 
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
Marco Amado
 
Ad

More from Icinga (20)

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

Recently uploaded (15)

PPTX
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
PPTX
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
PPTX
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
PPTX
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
PPTX
some leadership theories MBA management.pptx
rkseo19
 
PPTX
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
PPTX
2025-07-13 Abraham 07 (shared slides).pptx
Dale Wells
 
PDF
The Impact of Game Live Streaming on In-Game Purchases of Chinese Young Game ...
Shibaura Institute of Technology
 
PPTX
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
PDF
The Family Secret (essence of loveliness)
Favour Biodun
 
PDF
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
PPTX
presentation on legal and regulatory action
raoharsh4122001
 
PPTX
AI presentation for everyone in every fields
dodinhkhai1
 
PDF
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
PDF
Cloud Computing Service Availability.pdf
chakrirocky1
 
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
some leadership theories MBA management.pptx
rkseo19
 
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
2025-07-13 Abraham 07 (shared slides).pptx
Dale Wells
 
The Impact of Game Live Streaming on In-Game Purchases of Chinese Young Game ...
Shibaura Institute of Technology
 
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
The Family Secret (essence of loveliness)
Favour Biodun
 
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
presentation on legal and regulatory action
raoharsh4122001
 
AI presentation for everyone in every fields
dodinhkhai1
 
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
Cloud Computing Service Availability.pdf
chakrirocky1
 

Monitoring as code

Editor's Notes

  • #10: Automate Installation Automate Configuration
  • #12: Alles ist ein Objekt
  • #13: A simple object Inherits from a template Custom Variable
  • #15: Rule instead of many services Works also for notifications
  • #18: Multiple vHosts on one host Could also be a Database
  • #19: Iterate over a hash / dictoinary
  • #21: Multiple vHosts on one host Could also be a Database
  • #27: Status API Permissions Debug
  • #29: Alle Objekte per Webinterface
  • #30: Import Objects For instance from CMDB Create custom vars
  • #31: A simple object Inherits from a template Custom Variable