Icinga2
Transcript of Icinga2
Icinga2
Jakub Novotný
▷ Server monitoring
▷ Complex tool
▷ Written in C++
▷ IcingaWeb2
What is Icinga2
▷ Nagios
▷ Icinga
▷ Icinga2
History
▷ 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?
▷ every specific functionality
▷ apt-get install nagios-plugins
▷ /usr/lib/nagios/plugins
Plugins
▷ 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
▷ ./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
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
▷ Host
▷ CheckCommand
▷ Service
▷ ServiceGroup
▷ User
▷ Notification
▷ ...
Configuration Objects
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 }
Service Template
template Service "bluenomics-http-check" { import "generic-service" check_command = "http-check-string" host_name = "bluenomics" vars.base_url = "www.bluenomics.com"}
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"}
Apply object
apply Service "ping4" { import "generic-service" check_command = "ping4" assign where host.address}
Service Status
▷ statuso OK, o WARNINGo CRITICALo UNKNOWN
▷ status stateo Softo Hard
Service Status Settings
conf.d/templates.conf
template Service "generic-service" { max_check_attempts = 3 check_interval = 1m retry_interval = 30s}
Notifications
▷ email▷ SMS▷ user groups▷ host groups▷ service groups▷ notification escalation
Icinga2 Web
▷ PHP frontend▷ agavi framework▷ bind with Icinga IDO
Icinga2 Web
▷ no settings▷ dashboards and overviews▷ accepting alerts▷ http://icinga.keyup.eu/
icingaweb2/
Díky za pozornost!Otázky?
Jakub Novotný[email protected]