txaj / icinga-to-graphite

A simple script to send icinga metrics to graphite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This script sends the Nagios/Icinga perfdatas into Graphite.

Nagios/Icinga configuration

Main config file:

service_perfdata_file=/tmp/service-perfdata
service_perfdata_file_processing_command=process-service-perfdata-file
service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
service_perfdata_file_processing_interval=330

Example command:

define command {
    command_line                   /usr/local/bin/transform_perfdata.sh /tmp/service-perfdata
    command_name                   process-service-perfdata-file
}
  • To view the datas in Graphite, I recommend to use the "Graph options -> Line mode -> Connected line" or the graphite function keepLastValue().
  • Keep in mind that some checks can use different unit: 5Mb, then 5Gb.

About

A simple script to send icinga metrics to graphite

License:GNU General Public License v2.0


Languages

Language:Awk 85.2%Language:Shell 14.8%