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

PDF
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
PPTX
Monitoring as Code - Ignite
PDF
Icinga Camp San Diego 2016 - Enter the Metrics
PDF
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
PDF
Icinga Camp Belgrade - Icinga 2 Apify Them All
PDF
Icinga Camp San Diego: Apify them all
PDF
Icinga 2 and Puppet - Automate Monitoring
PPTX
Icinga2 - Upcoming API for Icinga2
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
Monitoring as Code - Ignite
Icinga Camp San Diego 2016 - Enter the Metrics
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
Icinga Camp Belgrade - Icinga 2 Apify Them All
Icinga Camp San Diego: Apify them all
Icinga 2 and Puppet - Automate Monitoring
Icinga2 - Upcoming API for Icinga2

What's hot (20)

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

Viewers also liked (20)

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

Similar to Monitoring as code (20)

PDF
Icinga2 Hacking Session 2014-10-10
PDF
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
PPTX
Journey to the Cloud
PDF
Icinga Workshop 2014 Icinga 2 Hacking Session
PDF
Why favour Icinga over Nagios @ OSDC 2015
PDF
Icinga2 api use cases
PDF
Why favour Icinga over Nagios @ FrOSCon 2015
PPTX
[NDC 2019] Enterprise-Grade Serverless
PPTX
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
PDF
Securing your Pulsar Cluster with Vault_Chris Kellogg
PPTX
What's new in the July 2017 Update for Dynamics 365 - Developer features
PPTX
Building and Scaling Node.js Applications
PDF
20151010 my sq-landjavav2a
PDF
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
PDF
Burn down the silos! Helping dev and ops gel on high availability websites
PDF
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PDF
Infrastructure as code terraformujeme cloud
PPTX
Dive into DevOps | March, Building with Terraform, Volodymyr Tsap
PPTX
Simple blog wall creation on Java
PPTX
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
Icinga2 Hacking Session 2014-10-10
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
Journey to the Cloud
Icinga Workshop 2014 Icinga 2 Hacking Session
Why favour Icinga over Nagios @ OSDC 2015
Icinga2 api use cases
Why favour Icinga over Nagios @ FrOSCon 2015
[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
Securing your Pulsar Cluster with Vault_Chris Kellogg
What's new in the July 2017 Update for Dynamics 365 - Developer features
Building and Scaling Node.js Applications
20151010 my sq-landjavav2a
OSMC 2011 | Case Study - Icinga at Hyves.nl by Jeffrey Lensen
Burn down the silos! Helping dev and ops gel on high availability websites
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
Infrastructure as code terraformujeme cloud
Dive into DevOps | March, Building with Terraform, Volodymyr Tsap
Simple blog wall creation on Java
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort

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
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
PPTX
Learning-Plan-5-Policies-and-Practices.pptx
PPTX
_ISO_Presentation_ISO 9001 and 45001.pptx
PPTX
Emphasizing It's Not The End 08 06 2025.pptx
PPTX
worship songs, in any order, compilation
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
PPTX
fundraisepro pitch deck elegant and modern
PPTX
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
PDF
Why Top Brands Trust Enuncia Global for Language Solutions.pdf
PPTX
Tablets And Capsule Preformulation Of Paracetamol
PPTX
Self management and self evaluation presentation
PPTX
The spiral of silence is a theory in communication and political science that...
PPTX
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
PPTX
Primary and secondary sources, and history
PPTX
The Effect of Human Resource Management Practice on Organizational Performanc...
DOCX
ENGLISH PROJECT FOR BINOD BIHARI MAHTO KOYLANCHAL UNIVERSITY
PPTX
Impressionism_PostImpressionism_Presentation.pptx
PDF
Swiggy’s Playbook: UX, Logistics & Monetization
PPTX
Intro to ISO 9001 2015.pptx wareness raising
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
Learning-Plan-5-Policies-and-Practices.pptx
_ISO_Presentation_ISO 9001 and 45001.pptx
Emphasizing It's Not The End 08 06 2025.pptx
worship songs, in any order, compilation
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
fundraisepro pitch deck elegant and modern
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
Why Top Brands Trust Enuncia Global for Language Solutions.pdf
Tablets And Capsule Preformulation Of Paracetamol
Self management and self evaluation presentation
The spiral of silence is a theory in communication and political science that...
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
Primary and secondary sources, and history
The Effect of Human Resource Management Practice on Organizational Performanc...
ENGLISH PROJECT FOR BINOD BIHARI MAHTO KOYLANCHAL UNIVERSITY
Impressionism_PostImpressionism_Presentation.pptx
Swiggy’s Playbook: UX, Logistics & Monetization
Intro to ISO 9001 2015.pptx wareness raising

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