Personal tools
You are here: Home Bugs All Pnp4nagios ignores COUNTER datatype

Pnp4nagios ignores COUNTER datatype

by Herbert Straub last modified 2009-05-03 07:41
— filed under:

Version 4.7 ignores the datatype specification in check_commands.

Status

  • Package pnp4nagios-0.4.7-7.3 from OpenSuSE Build service contains this error
  • Version 0.4.8 no tested

Descripition

The check_iftraffic plugin needs a COUNTER datatype. The configuration file /etc/nagios/pnp/check_commands/check_iftraffic.cfg containing:

    DATATYPE = COUNTER

but the RDD ds is GAUGE. The debug logoutput:

    Found Performance Data for localhost / Net Lan (inUsage=0.0%;85;98;; outUsage=0.0%;85;98;; inAbsolut=0B;10625000;12250000;; outAbsolut=0B;10625000;12250000;;)
    adjust_template() => /etc/nagios/pnp//check_commands/check_iftraffic.cfg
    Adapting RRD Datatype to COUNTER as defined in /etc/nagios/pnp//check_commands/check_iftraffic.cfg
    Template is check_iftraffic.php
    data2rrd called
    Reading /etc/nagios/pnp/rra.cfg
    RRDs::create /var/lib/nagios/pnp/localhost/Net_Lan.rrd RRA:AVERAGE:0.5:1:2880 RRA:AVERAGE:0.5:5:2880 RRA:AVERAGE:0.5:30:4320 RRA:AVERAGE:0.5:360:5840 RRA:MAX:0.5:1:2880 RRA:MAX:0.5:5:2880 RRA:MAX:0.5:30:4320 RRA:MAX:0.5:360:5840 RRA:MIN:0.5:1:2880 RRA:MIN:0.5:5:2880 RRA:MIN:0.5:30:4320 RRA:MIN:0.5:360:5840 DS:1:GAUGE:8640:U:U DS:2:GAUGE:8640:U:U DS:3:GAUGE:8640:U:U DS:4:GAUGE:8640:U:U --step=60
    /var/lib/nagios/pnp/localhost/Net_Lan.rrd created
    PNP exiting (runtime 0.020244s) ...

Workaround

My patch pnp4nagios-4.7-COUNTER.patch fix this problem. Debug Log:

    Found Performance Data for localhost / Net Lan (inUs
    age=0.0%;85;98;; outUsage=0.0%;85;98;; inAbsolut=0B;10625000;12250000;; outAbsol
    ut=0B;10625000;12250000;;)
    adjust_template() => /etc/nagios/pnp//check_commands
    /check_iftraffic.cfg
    2008-05-01 17:29:04 [18897] Adapting RRD Datatype to COUNTER as defined in /etc/
    nagios/pnp//check_commands/check_iftraffic.cfg
    Template is check_iftraffic.php
    data2rrd called
    Reading /etc/nagios/pnp/rra.cfg
    RRDs::create /var/lib/nagios/pnp/localhost/Net_Lan.r
    rd RRA:AVERAGE:0.5:1:2880 RRA:AVERAGE:0.5:5:2880 RRA:AVERAGE:0.5:30:4320 RRA:AVE
    RAGE:0.5:360:5840 RRA:MAX:0.5:1:2880 RRA:MAX:0.5:5:2880 RRA:MAX:0.5:30:4320 RRA:
    MAX:0.5:360:5840 RRA:MIN:0.5:1:2880 RRA:MIN:0.5:5:2880 RRA:MIN:0.5:30:4320 RRA:M
    IN:0.5:360:5840 DS:1:COUNTER:8640:U:U DS:2:GAUGE:8640:U:U DS:3:GAUGE:8640:U:U DS
    :4:GAUGE:8640:U:U --step=60
    /var/lib/nagios/pnp/localhost/Net_Lan.rrd created
    PNP exiting (runtime 0.020208s) ...

Document Actions