Monitoring as Code - Ignite

20
Monitoring as Code with Icinga Bernd Erk - @gethash

Transcript of Monitoring as Code - Ignite

Page 1: Monitoring as Code - Ignite

Monitoring as Codewith Icinga

Bernd Erk - @gethash

Page 2: Monitoring as Code - Ignite

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

Page 3: Monitoring as Code - Ignite

“Verschlimmbesserung“

Icinga != Nagios!=

Page 4: Monitoring as Code - Ignite

Checker

Notify

Gelf

Perfdata Graphite

IDO

InfluxDB

Elastic• Multithreaded

• Modular Features

• Zone support

• Secure Agent

https://www.icinga.com/products/integrations/

Page 5: Monitoring as Code - Ignite

Support for AutomationAutomation

Page 6: Monitoring as Code - Ignite

• Objects

• Rule based

• Conditions

• Loops

• Custom Functions

Object based configuration languageObject

Page 7: Monitoring as Code - Ignite

object Host "demo.icinga.com" { import "generic-host"

address = "127.0.0.1" address6 = "::1"

vars.os = "Linux }

vars.os = "Linux"

Page 8: Monitoring as Code - Ignite

apply Service "ssh" {

import "generic-service"

check_command = "ssh"

assign where host.vars.os == "Linux"

ignore where host.vars.dev == true

}

Assign RulesRules

Page 9: Monitoring as Code - Ignite

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

}

}

More RulesRules

Page 10: Monitoring as Code - Ignite

apply Service for ( ){

import "generic-service"

display_name = "http " + http_vhostcheck_command = "http"

} vars += config

http_vhost => config in host.vars_http_vhosts

Page 11: Monitoring as Code - Ignite

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)

}

Flexible ConditionsConditions

Page 12: Monitoring as Code - Ignite

object Service ”Load" {

check_command = "load”

host_name = ”backup.abc.com”

vars.load_warning = {{

if (get_time_period("backup").is_inside) {

return 20

} else {

return 5

} } }

}

Custom FunctionsFunctions

Page 13: Monitoring as Code - Ignite

• HTTP with RESTful Url Schema

• X.509 and/or Basic Auth

• Create, Modify and Delete objects

• Event Stream based on Types and

Filters

RESTful APIRESTful

Page 14: Monitoring as Code - Ignite

• Config via Webinterface

• Config Import

• Versioning

• API

Icinga DirectorDirector

Page 15: Monitoring as Code - Ignite

• Import Sources

• AWS

• SQL

• LDAP

• PuppetDB

• Files

Page 16: Monitoring as Code - Ignite

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 = “Dell”vars.is_virtual = false

}

Page 17: Monitoring as Code - Ignite

• Periodic Imports

• Hands-Free Config Deployments

• Versioning

• Full Audit Log

• Fast Config Reverts

Page 18: Monitoring as Code - Ignite
Page 19: Monitoring as Code - Ignite
Page 20: Monitoring as Code - Ignite

www.icinga.com

github.com/icinga

Thank You!

@icinga

/icinga

+icinga