An Overview of The Icinga Network Monitoring System Architecture
An Overview of The Icinga Network Monitoring System Architecture
org
ICINGA2
OPEN SOURCE MONITORING
backspace
08.12.2015
• Blerim Sheqa
• Systems Engineer
• Open Source
• @bobapple
ICINGA2
INTRODUCTION
• Icinga
•
Nagios fork
• Icinga2
•
rewrite
•
rethink
Server
Network
Windows
• Everything is a feature
Perfdata Graphite Livestatus
• Multithreaded
• Modular Features
Notify Compat
• Zone support
• Secure Agent
Checker Gelf IDO
• Run CheckCommands
•
basically scripts
• Retreive result
• React
Server
Notify
Checker
Checker
IDO
Network
Graphite
Windows
ICINGA2
INSTALLATION
• packages.icinga.org
• Repositories
•
SUSE / openSUSE
•
Debian
•
Ubuntu
•
Raspbian
•
Fedora
•
Epel
• Windows
•
Chocolatey
•
icinga2.exe
ICINGA2
OBJECTS
• Everything is an object
•
Objects reference other objects
• CheckCommands
•
Tell Icinga how to use your plugin
•
Icinga Template Library (ITL)
object CheckCommand "check_http" {
import "plugin-check-command"
arguments = {
"-H" = "$http_vhost$"
"-S" = {
set_if = "$http_ssl$"
}
"-a" = {
value = "$http_auth_pair$"
description = "Basic auth username and password"
}
}
}
• Hosts
•
No further explanation
object Host “webserver-1 {
display_name = "Webserver 1"
address = "127.12.3.87"
address6 = "2001:db8:0:1"
groups = [ "all-hosts" ]
check_command = "hostalive"
vars.os = “Linux”
vars.oncall = true
}
• Services
•
Running your CheckCommands
object Service "http" {
host_name = "webserver-1"
display_name = "HTTP"
check_command = "check_http"
check_interval = 60s
vars.http_vhost = "hackerspace-bamberg.de"
}
check_http
webserver-1
ICINGA2
EXCHANGE
• Notifications
•
Run a notification script
object Notification "webserver-http-notification" {
host_name = "webserver-1"
service_name = "http"
command = "mail-notification"
}
ICINGA2
IDO
• Icinga Data Output
•
Export configuration and status
information
•
Used by webinterfaces
•
MySQL / PostgreSQL
ICINGA2
APPLY RULES
• Apply Rules
•
Assign objects based on rule expressions
assign where host.vars.os == “Linux”
import "generic-service"
check_command = "ssh"
}
apply Notification "oncall-sms" to Service {
import "sms-service-notification"
user_groups = [ "noc" ]
}
assign where match("*has gold support 24x7*", service.notes)
&& (host.vars.customer == "customer-xy" ||
host.vars.always_notify == true)
Server
Network
Windows
object Endpoint "icinga2a" {
host = "icinga2a.icinga.org"
}
Server
Network
Windows
Master Zone Frankfurt
Server
Server Server
Server Server
Server
Berlin
Server
Server Server
Server Server
Server
München
Server
Server Server
Server Server
Server
object Zone "satellite-frankfurt" {
endpoints = [ "icinga2c" ]
parent = "config-ha-master"
}
Zone
Server
Network
Windows
Master Zone Frankfurt
Server
Server Server
Server Server
Server
Berlin
Server
Server Server
Server Server
Server
München
Server
Server Server
Server Server
Server
Global Zone
Server
Server Server
Server Server
Server
Berlin
Server
Server Server
Server Server
Server
München
Server
Server Server
Server Server
Server
/etc/icinga2
|- icinga2.conf
|- pki/
|- zones.d/
|-- global/
|-- commands.conf
|–- master/
|-- services.conf
|-- hosts.conf
|-- frankfurt/
|-- services.conf
|-- hosts.conf
|-- berlin/
|-- services.conf
|-- hosts.conf
|-- muenchen/
|-- services.conf
|-- hosts.conf
ICINGA2
API
• HTTP with RESTful Url Schema
• ApiUser config object
• X.509 and/or Basic Auth
object ApiUser "root" {
password = "icinga”
permissions = [ "*" ]
}
permissions = [
{
permission = "objects/query/Host"
filter = {{ regex("^Linux", host.vars.os) }}
},
{
permission = "objects/query/Service"
filter = {{ regex("^Linux", service.vars.os) }}
}
]
• create, modify and delete objects
• retrieve information and run actions
• subscribe to events
• manage configuration packages
• Configuration management
• New standard config API
• Support for Packages and Stages
• Support for Zones
• Event Streams
• Based on Types and Filters
CheckResult, StateChange, Notification,
AcknowledgementSet, AcknowledgementCleared,
CommentAdded, CommentRemoved, DowntimeAdded,
DowntimeRemoved, DowntimeTriggered
• Example
/v1/events?queue=backspace&types=CheckResult
• Status, Objects, Actions and Events
• Simple filter
• services?service=localhost!ping6
• Advanced filter
• type=Service&filter=service.name==%22ping6%22
ICINGA WEB 2
• Developed in PHP 5.3
• Multiple authentication methods
• Active Directory, LDAP and DB
• Via Webserver, e.g. Kerberos
• May be chained
• Easy to extend and embed
• JSON and CSV export
• Support for MySQL and PostgreSQL
• Responsive layout
BP NagVis PNP
Monitoring Docs
Web 2
ICINGA ROADMAP – WHAT’S NEXT?
Improving the product based on your
feedback
We are thinking about a new historical
datastore for Icinga 2 (not in 2.5)
We plan to release more modules for
Icinga Web 2 in the next months
We’ll release a web based configuration
module for Icinga Web 2
• Icinga 2.5 is planned for Q1 2016
• Icinga Web 2.2 is planned for Q1 2016
OUR VISION
CONCLUSION
• Download Icinga 2 and Icinga Web 2
• Or play with the Vagrant boxes
• Rethink your configuration
• Give us feedback
THANK YOU!
www.icinga.org
@icinga
dev.icinga.org
/icinga
git.icinga.org
+icinga