Monitoring Asterisk with Icinga Main .What is Icinga? .How it works? .Monitoring agents check_by_ssh, check_by_nrpe. .Host and Services. .Existing Plugins. .Create custom plugins. .Preference Data from plugins. Icinga is… .Icinga 2 is an open source monitoring system which checks the availability of your network resources.(From Icinga site) .Icinga 1 is a fork and it is compatible with Nagios Plugins. .Icinga 2 is rewritten from scratch and is compatible Nagios Plugins to. .Icinga is very flexible and extensible. .Multithreaded and scalable for small embedded systems as well as large scale environments .A lot of plugins already exists and it is very simple to create your custom plugin. Icinga 2 Packages

Debian Upstream, DebMon, Icinga Repository Ubuntu Upstream, Icinga PPA, Icinga Repository RHEL/CentOS Icinga Repository OpenSUSE Icinga Repository, Server Monitoring Repository SLES Icinga Repository Gentoo Upstream FreeBSD Upstream ArchLinux Upstream Icinga UI. .Three kind of UI exist today. .Classic UI. .Icinga Web. .Icinga Web 2. How it works? .Icinga server and Modules. .Icinga check agents. Check by SSH check by NRPE. .Plugins. Nagios plugins and custom plugins. Icinga Server .Multithreaded and scalable for small embedded systems as well as large scale environments. .Real-time monitoring capabilities. Can run checks every second. .Modularity just enable or disable module and run reload. .Live Status protocol. You can query Icinga to get info. .DB IDO (Database Icinga Data Output) Icinga Checks .Agent less checks. Http, Ping, SSH. .Agent Based Checks. Agents use plugins check_by_ssh, check_by_nrpe Icinga Agents .Check By SSH. .Check By NRPE (Nagios Remote Plugin Executor). .NSClient++ (For Windows and Linux). .SNMP (Cisco routers not only). Check by ssh

Asterisk inbound Icinga server Asterisk outbound

ssh server CheckCommand “by_ssh” ssh server

check_by_ssh plugin

ssh automatic connection

ssh server

Asterisk ss7 Check by nrpe

CheckCommand “nrpe”

Asterisk inbound Asterisk outbound Icinga 2 server

Nagios plugins CheckCommand Nagios plugins “by_nrpe” Nrpe Nrpe xinetd Nrpe check xinetd server Nrpe check server check_nrpe plugin Icinga Plugins

.Nagios Plugins http://exchange.nagios.org/ https://www.monitoringexchange.org/ .Icinga Plugins https://exchange.icinga.org/ .Custom Plugins. Custom Plugins. .Plugin Directory. .Plugin. .Command inside nrpe.conf. Custom Plugin If (CRITICAL STATE){ echo "CRITICAL: Current calls 60 and critical alert is 55 | 'critlimit‘=55 'curcalls‘ = 60” ; exit(2); } else If (WARNING STATE){ echo “WARNING: Current calls 45 and warning alert is 40 | ‘warnlimit‘=40 'curcalls‘ = 45” ; exit(1);

}else { echo "OK - Current calls 15 | 'calls'= 15”; exit(0); } Performance Data .Icinga2-enable-future prefdata. .Spool Dir /var/spool/icinga2/perfdata/ .File name for host data: host-perfdata. .File name for Service data : service- perfdata. Graphing Add-ons .PNP4nagius (PrefdataWriter ) .InGraph (PrefdataWriter ) .Graphite (GraphiteWriter) The End