Skip to end of metadata
Go to start of metadata

To get the source from repository type "svn co"

I would suggest to use SVN, cause small fixes are applied immediatly.
e.g. VERSION = 1.4.3 or 1.4.4

Extracting the source

VER = n2rrd version

  • cd /tmp
  • tar zxvf n2rrd-VER.tar.gz
    • cd n2rrd-VER

Edit dist-n2rrd.conf file

  • and move dist-n2rrd.conf to n2rrd.conf (normally /etc/n2rrd/n2rrd.conf)
  • check demo-server n2rrd.conf n2rrd143

Edit /etc/n2rrd/templates/maps/dist-rra_plugin_maps file (OPTIONAL)

  • and move dist-rra_plugin_maps to rra_plugin_maps
  • define your DST (Data Source Type)

    #File format
    # plugin_name=variable_name2:DST,variable_name2:DST

Edit /etc/n2rrd/templates/maps/dist-rgb.txt

  • and move dist-rgb.txt to rgb.txt
  • format of lines in this file is

  • define rgb.txt file location in /etc/n2rrd/n2rrd.conf

    DYN_RGB_COLORS_MAPS          = "templates/maps/rgb.txt"


  • change variable to suit your environment
  • run ./

move distribution example files under /etc/n2rrd/templates

  • the following command will help move files to its original name.

    for fdist in dist-*; do fnew=`echo $fdist \| sed 's/dist-//'`; mv $fdist $fnew; done
  • modify it if ncessary?

NOTE: Above steps are required, only if its your first installation

Edit /etc/nagios/checkcommands.cfg

NOTE: location of status.* file is defined in nagios.cfg as variable status_file=/var/log/nagios/status.dat

  • add/update following, depending on the changes you made to variables in
    Host Performance processing command

    define command
       command_name    process-host-perfdata
       command_line   /usr/bin/ -d -D "HOST" -N "/var/log/nagios/status.dat" -C '$HOSTCHECKCOMMAND$' -c /etc/n2rrd/n2rrd.conf -T $LASTHOSTCHECK$ -H $HOSTNAME$ -s "check_icmp" -o "$HOSTPERFDATA$"

    Service Performance processing command

    define command{
       command_name    process-service-perfdata
       command_line    /usr/bin/ -d -N "/var/log/nagios/status.dat" -C '$SERVICECHECKCOMMAND$' -c /etc/n2rrd/n2rrd.conf -T $LASTSERVICECHECK$ -H $HOSTNAME$ -s "$SERVICEDESC$" -o "$SERVICEPERFDATA$"

    you can disable debug mode "option -d", once everything works to avoid huge log file being created.

  • Incase you like also to collect Plugins Execution Time and Latency Time, then enable options -e and -l

    define command{
       command_name    process-service-perfdata
       command_line    /usr/bin/ -d -N "/var/log/nagios/status.dat" -C '$SERVICECHECKCOMMAND$' -c /etc/n2rrd/n2rrd.conf -e $SERVICEEXECUTIONTIME$ -l $SERVICELATENCY$ -T $LASTSERVICECHECK$ -H $HOSTNAME$ -s "$SERVICEDESC$" -o "$SERVICEPERFDATA$"
  • check demo-server /etc/nagios/n2rrd.cfg n2rrd143

Edit /etc/nagios/nagios.cfg to reflect the following variables

  • process_performance_data=1
  • host_perfdata_command=process-host-perfdata
  • service_perfdata_command=process-service-perfdata
  • No labels