Icinga2

22
Icinga2 Jakub Novotný

Transcript of Icinga2

Page 1: Icinga2

Icinga2

Jakub Novotný

Page 2: Icinga2

▷ Server monitoring

▷ Complex tool

▷ Written in C++

▷ IcingaWeb2

What is Icinga2

Page 3: Icinga2

▷ Nagios

▷ Icinga

▷ Icinga2

History

Page 4: Icinga2

▷ Daemon

▷ Command icinga2 (as root)o icinga2 … --help

o icinga2 feature list

o icinga2 feature enable feature_name

o icinga2 node wizard

How does it run?

Page 5: Icinga2

▷ every specific functionality

▷ apt-get install nagios-plugins

▷ /usr/lib/nagios/plugins

Plugins

Page 6: Icinga2

▷ any program which returnso 0 - OK

o 1 - WARNING

o 2 - CRITICAL

▷ Message to STDOUT

▷ /usr/lib/nagios/plugins/plugin_name

--help

▷ pass settings via parameters

Plugins

Page 7: Icinga2

▷ ./check_http -H www.seznam.cz

(OK, 302)

▷ ./check_http -H www.seznam.cz -S

(OK, 200)

▷ ./check_http -H www.seznam.cz -S -s

'Najdu tam co neznám'

(CRITICAL)

check_http Plugin

Page 8: Icinga2

Configuration

▷ domain-specific language▷ http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest

/doc/module/icinga2/chapter/language-reference

▷ /etc/icinga2/icinga2.conf▷ loads other conf files with the

same structure

Page 9: Icinga2

▷ Host

▷ CheckCommand

▷ Service

▷ ServiceGroup

▷ User

▷ Notification

▷ ...

Configuration Objects

Page 10: Icinga2

CheckCommand

object CheckCommand "https-check-string" { import "plugin-check-command" command = [PluginDir + "/check_http"] arguments = {

"-H" = "$base_url$" // host"-p" = "$port$" // port"-u" = "$path$" // context path"-s" = "$string$" // expected string "-e" = "$status$" // exp. resp.

status "-S" = "" // SSL

} vars.status = "200" // default value }

Page 11: Icinga2

Service Template

template Service "bluenomics-http-check" { import "generic-service" check_command = "http-check-string" host_name = "bluenomics" vars.base_url = "www.bluenomics.com"}

Page 12: Icinga2

Services - each for one check

object Service "https-bluenomics-homepage" { import "bluenomics-https-check" vars.string = "Macroeconomic data in" //...}

object Service "http-bluenomics-api-8080" { import "bluenomics-http-check" vars.path = "/api/" vars.port = "8080" vars.string = "bluenomics" vars.status = "403"}

Page 13: Icinga2

Apply object

apply Service "ping4" { import "generic-service" check_command = "ping4" assign where host.address}

Page 14: Icinga2

Service Status

▷ statuso OK, o WARNINGo CRITICALo UNKNOWN

▷ status stateo Softo Hard

Page 15: Icinga2

Service Status Settings

conf.d/templates.conf

template Service "generic-service" { max_check_attempts = 3 check_interval = 1m retry_interval = 30s}

Page 16: Icinga2

Notifications

▷ email▷ SMS▷ user groups▷ host groups▷ service groups▷ notification escalation

Page 17: Icinga2

Icinga2 Web

▷ PHP frontend▷ agavi framework▷ bind with Icinga IDO

Page 18: Icinga2

Icinga2 Web

▷ no settings▷ dashboards and overviews▷ accepting alerts▷ http://icinga.keyup.eu/

icingaweb2/

Page 19: Icinga2
Page 20: Icinga2
Page 21: Icinga2
Page 22: Icinga2

Díky za pozornost!Otázky?

Jakub Novotný[email protected]