Missing RRD Files

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Missing RRD Files

Post by 00_kl250 »

Hi All,

I'm using Nagios core 3.4.1 and pnp4nagios 0.6 and having some issues getting some custom checks to graph.

For example, here is my services definition file:

Code: Select all

define service {
        hostgroup_name                  ofdc_cisco
        service_description             Uptime
        check_command                   check_snmp!-C nocmrtg -o .1.3.6.1.2.1.1.3.0
        use                             generic-service
        notification_interval           0;              
        }

define service {
        hostgroup_name                  ofdc_cisco
        service_description             Port 4 Status
        check_command                   check_snmp!-C nocmrtg -o .1.3.6.1.2.1.31.1.1.1.1.10104
        use                             generic-service
        notification_interval           0;
        }




define service {
        hostgroup_name                  ofdc_cisco
        service_description             Port 5 Status
        check_command                   check_snmp!-C nocmrtg -o .1.3.6.1.2.1.31.1.1.1.1.10105
        use                             generic-service
        notification_interval           0;
        }

define service {
        hostgroup_name                  ofdc_cisco
        service_description             VLAN 1
        check_command                   check_snmp!-C nocmrtg -o .1.3.6.1.2.1.47.1.2.1.1.2.2
        use                             generic-service
        notification_interval           0;
        }

define service {
        hostgroup_name                  ofdc_cisco
        service_description             port traffic Gi0/2
        check_command                   check_snmp_int.pl!-C nocmrtg -2 -r -n GigabitEthernet0/2 -k -y -w 0,0 -c 0,0
        use                             generic-service
        notification_interval           0;
        }
I'm applying all these services to my hostgroup "ofdc_cisco" and want to graph them with pnp4nagios.

When I go to the location of an individual host that inherits these checks from the host_group, i only see _HOST_.rrd and _HOST.xml. There is no .rrd file for any of the services.
#:/var/lib/pnp4nagios/perfdata/sw01.xxxxxxx.xxxxxxxx.xxx
_HOST_.rrd _HOST_.xml


Where is the rrd data files for my checks being stored at?

Here is my commands.cfg:

Code: Select all

# 'notify-host-by-email' command definition
define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
        }

# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }

################### added by AK for pnp4nagios#######################

define command{
        command_name    process-host-perfdata
        command_line    /usr/lib/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA
        }



define command {
       command_name    process-service-perfdata
       command_line    /usr/lib/pnp4nagios/libexec/process_perfdata.pl
        }

###################################################################################

define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
        }

define command{
        command_name    check_snmp_int.pl
        command_line    $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ $ARG1$
        }
Evertything is green in nagios and I can pull up the default nagios graph and it's showing the data but I'm having issues with trying to get it into pnp4nagios.

Any help would be appreciated.

Thanks!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: Missing RRD Files

Post by 00_kl250 »

update:

i ran the pnp4naigos check script again:

perl verify_pnp_config --mode sync --config=/etc/nagios3/nagios.cfg --pnpcfg=/etc/pnp4nagios

Code: Select all

[INFO]  ========== Starting Environment Checks ============
[INFO]  My version is: verify_pnp_config-0.6.25-R.40
[INFO]  Start Options: verify_pnp_config --mode sync --config=/etc/nagios3/nagios.cfg --pnpcfg=/etc/pnp4nagios
[INFO]  Reading /etc/nagios3/nagios.cfg
[OK  ]  Running product is 'nagios'
[OK  ]  object_cache_file is defined
[OK  ]  object_cache_file=/var/cache/nagios3/objects.cache
[INFO]  Reading /var/cache/nagios3/objects.cache
[OK  ]  resource_file is defined
[OK  ]  resource_file=/etc/nagios3/resource.cfg
[INFO]  Reading /etc/nagios3/resource.cfg
[INFO]  Reading /etc/pnp4nagios/process_perfdata.cfg
[INFO]  Reading /etc/pnp4nagios/pnp4nagios_release
[OK  ]  Found PNP4Nagios version "0.6.16"
[OK  ]  Effective User is 'nagios'
[OK  ]  User nagios exists with ID '104'
[OK  ]  Effective group is 'nagios'
[OK  ]  Group nagios exists with ID '106'
[INFO]  ========== Checking Sync Mode Config  ============
[OK  ]  process_performance_data is 1 compared with '/1/'
[OK  ]  enable_environment_macros is 1 compared with '/1/'
[OK  ]  service_perfdata_command is defined
[OK  ]  service_perfdata_command=process-service-perfdata
[OK  ]  host_perfdata_command is defined
[OK  ]  host_perfdata_command=process-host-perfdata
[INFO]  Nagios config looks good so far
[INFO]  ========== Checking config values ============
service_perfdata_command at verify_pnp_config line 462.
[OK  ]  Command process-service-perfdata is defined
[OK  ]  '/usr/lib/pnp4nagios/libexec/process_perfdata.pl'
[OK  ]  Command looks good
[OK  ]  Script /usr/lib/pnp4nagios/libexec/process_perfdata.pl is executable
host_perfdata_command at verify_pnp_config line 462.
[OK  ]  Command process-host-perfdata is defined
[OK  ]  '/usr/lib/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA'
[OK  ]  Command looks good
[OK  ]  Script /usr/lib/pnp4nagios/libexec/process_perfdata.pl is executable
[INFO]  ========== Starting global checks ============
[OK  ]  status_file is defined
[OK  ]  status_file=/var/cache/nagios3/status.dat
[INFO]  host_query = 
[INFO]  service_query = 
[INFO]  Reading /var/cache/nagios3/status.dat
[INFO]  ==== Starting rrdtool checks ====
[OK  ]  RRDTOOL is defined
[OK  ]  RRDTOOL=/usr/bin/rrdtool
[OK  ]  /usr/bin/rrdtool is executable
[OK  ]  RRDtool 1.4.7  Copyright 1997-2012 by Tobias Oetiker <[email protected]>
[OK  ]  USE_RRDs is defined
[OK  ]  USE_RRDs=1
[OK  ]  Perl RRDs modules are loadable
[INFO]  ==== Starting directory checks ====
[OK  ]  RRDPATH is defined
[OK  ]  RRDPATH=/var/lib/pnp4nagios/perfdata
[OK  ]  Perfdata directory '/var/lib/pnp4nagios/perfdata' exists
[WARN]  12 hosts/services are not providing performance data
[WARN]  'process_perf_data 1' is set for 13 hosts/services which are not providing performance data!
[OK  ]  'process_perf_data 1' is set for 29 of your hosts/services
[INFO]  ==== System sizing ====
[OK  ]  28 hosts/service objects defined
[INFO]  ==== Check statistics ====
[WARN]  Warning: 2, Critical: 0
[WARN]  Checks finished...
It appears my services aren't providing performance data. looking into that now.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Missing RRD Files

Post by tgriep »

Try running those service checks from a shell and see if they return performance data.
Be sure to check out our Knowledgebase for helpful articles and solutions!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: Missing RRD Files

Post by 00_kl250 »

Yes they do:

./check_snmp_int.pl!-C nocmrtg -2 -r -n GigabitEthernet0/2 -k -y -w 0,0 -c 0,0

GigabitEthernet0/2:UP (2.5KBps/8.5KBps):1 UP: OK
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Missing RRD Files

Post by tgriep »

When I ran the following
check_snmp_int.pl -H 192.168.1.1 -C public -2 -r -n gigabitethernet24 -k -y -w 0,0 -c 0,0 -f
This is the output.
gigabitethernet24:UP (2536.4KBps/92.3KBps):1 UP: OK | 'gigabitethernet24_in_prct'=2%;;;0;100 'gigabitethernet24_out_prct'=0%;;;0;100
Performance data is everything to the right of the | character so the -f needs to be added to your check command to get performance data.
-f, --perfparse
Perfparse compatible output (no output when interface is down).
Be sure to check out our Knowledgebase for helpful articles and solutions!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: Missing RRD Files

Post by 00_kl250 »

Ok so I blasted all my configurations because I was going crazy.

Check commands:

define command {
command_name check_snmp_int.pl
command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG1$ -2 -r -n $ARG2$ -k -y -w $ARG3$ -c $ARG4$ -f
}

define service{
use generic-service ; Name of service template to use
host_name sw01.xxx.xxxxxx
service_description Port2Traffic
check_command check_snmp_int.pl!nocmrtg!GigabitEthernet0/2!0,0!0,0
notification_interval 0;
}

My nagios shows this and the graphs are blank:

Status Information: GigabitEthernet0/2:UP (1.5KBps/3.9KBps):1 UP: OK
Performance Data: 'GigabitEthernet0/2_in_prct'=0%;;;0;100 'GigabitEthernet0/2_out_prct'=0%;;;0;100

Not sure why It shows my data in the status but no performance data. Any ideas? Thanks so much!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Missing RRD Files

Post by tgriep »

It usually takes 20 to 30 minutes for the graphs to populate but if they are still not working, you may need to delete the rrd files and let them recreate themselves.
Be sure to check out our Knowledgebase for helpful articles and solutions!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: Missing RRD Files

Post by 00_kl250 »

I deleted the rrd file and have been waiting but no dice on the charts, they are still blank.

I tailed the _tmp file and there is data:

/tmp# tail tmp_Nagios_int.XXX.XXX.XXX.X.GigabitEthernet0_2
1434659283:614277121:1009388098
1434659343:614484388:1010190894
1434659403:614631135:1011039361
1434659463:614718192:1011139718
1434659590:614892854:1011592777
1434659763:615078327:1011971774
1434659890:615264931:1015917029
1434660063:615535772:1016275151
1434660190:615697960:1016685989
1434660363:615909774:1018020274




<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NAGIOS>
<DATASOURCE>
<TEMPLATE>check_snmp_int.pl</TEMPLATE>
<RRDFILE>/var/lib/pnp4nagios/perfdata/sw01.XXX.XXX.XXX.Xest/Port2Traffic.rrd</RRDFILE>
<RRD_STORAGE_TYPE>SINGLE</RRD_STORAGE_TYPE>
<RRD_HEARTBEAT>8460</RRD_HEARTBEAT>
<IS_MULTI>0</IS_MULTI>
<DS>1</DS>
<NAME>GigabitEthernet0_2_in_prct</NAME>
<LABEL>GigabitEthernet0/2_in_prct</LABEL>
<UNIT>%%</UNIT>
<ACT>0</ACT>
<WARN></WARN>
<WARN_MIN></WARN_MIN>
<WARN_MAX></WARN_MAX>
<WARN_RANGE_TYPE></WARN_RANGE_TYPE>
<CRIT></CRIT>
<CRIT_MIN></CRIT_MIN>
<CRIT_MAX></CRIT_MAX>
<CRIT_RANGE_TYPE></CRIT_RANGE_TYPE>
<MIN>0</MIN>
<MAX>100</MAX>
</DATASOURCE>
<DATASOURCE>
<TEMPLATE>check_snmp_int.pl</TEMPLATE>
<RRDFILE>/var/lib/pnp4nagios/perfdata/sw01.XXX.XXX.XXX.X/Port2Traffic.rrd</RRDFILE>
<RRD_STORAGE_TYPE>SINGLE</RRD_STORAGE_TYPE>
<RRD_HEARTBEAT>8460</RRD_HEARTBEAT>
<IS_MULTI>0</IS_MULTI>
<DS>2</DS>
<NAME>GigabitEthernet0_2_out_prct</NAME>
<LABEL>GigabitEthernet0/2_out_prct</LABEL>
<UNIT>%%</UNIT>
<ACT>0</ACT>
<WARN>0</WARN>
<WARN_MIN></WARN_MIN>
<WARN_MAX></WARN_MAX>
<WARN_RANGE_TYPE></WARN_RANGE_TYPE>
<CRIT>0</CRIT>
<CRIT_MIN></CRIT_MIN>
<CRIT_MAX></CRIT_MAX>
<CRIT_RANGE_TYPE></CRIT_RANGE_TYPE>
<MIN>0</MIN>
<MAX>100</MAX>
</DATASOURCE>
<RRD>
<RC>0</RC>
<TXT>successful updated</TXT>
</RRD>
<NAGIOS_AUTH_HOSTNAME>sw01.nXXX.XXX.XXX.X</NAGIOS_AUTH_HOSTNAME>
<NAGIOS_AUTH_SERVICEDESC>Port2Traffic</NAGIOS_AUTH_SERVICEDESC>
<NAGIOS_CHECK_COMMAND>check_snmp_int.pl!GigabitEthernet0/2!0,100!0,200</NAGIOS_CHECK_COMMAND>
<NAGIOS_DATATYPE>SERVICEPERFDATA</NAGIOS_DATATYPE>
<NAGIOS_DISP_HOSTNAME>sw01.XXX.XXX.XXX.X</NAGIOS_DISP_HOSTNAME>
<NAGIOS_DISP_SERVICEDESC>Port2Traffic</NAGIOS_DISP_SERVICEDESC>
<NAGIOS_HOSTNAME>sw01.XXX.XXX.XXX.X</NAGIOS_HOSTNAME>
<NAGIOS_HOSTSTATE>UP</NAGIOS_HOSTSTATE>
<NAGIOS_HOSTSTATETYPE>HARD</NAGIOS_HOSTSTATETYPE>
<NAGIOS_MULTI_PARENT></NAGIOS_MULTI_PARENT>
<NAGIOS_PERFDATA>GigabitEthernet0/2_in_prct=0%;;;0;100 GigabitEthernet0/2_out_prct=0%;0;0;0;100 </NAGIOS_PERFDATA>
<NAGIOS_RRDFILE>/var/lib/pnp4nagios/perfdata/sw01.XXX.XXX.XXX.X/Port2Traffic.rrd</NAGIOS_RRDFILE>
<NAGIOS_SERVICECHECKCOMMAND>check_snmp_int.pl!GigabitEthernet0/2!0,100!0,200</NAGIOS_SERVICECHECKCOMMAND>
<NAGIOS_SERVICEDESC>Port2Traffic</NAGIOS_SERVICEDESC>
<NAGIOS_SERVICEPERFDATA>GigabitEthernet0/2_in_prct=0%;;;0;100 GigabitEthernet0/2_out_prct=0%;0;0;0;100</NAGIOS_SERVICEPERFDATA>
<NAGIOS_SERVICESTATE>OK</NAGIOS_SERVICESTATE>
<NAGIOS_SERVICESTATETYPE>HARD</NAGIOS_SERVICESTATETYPE>
<NAGIOS_TIMET>1434660195</NAGIOS_TIMET>
<NAGIOS_XMLFILE>/var/lib/pnp4nagios/perfdata/sw01.XXX.XXX.XXX.X/Port2Traffic.xml</NAGIOS_XMLFILE>
<XML>
<VERSION>4</VERSION>
</XML>
</NAGIOS>
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Missing RRD Files

Post by abrist »

Well, performance data is being reported now:
Performance Data: 'GigabitEthernet0/2_in_prct'=0%;;;0;100 'GigabitEthernet0/2_out_prct'=0%;;;0;100
Can you post a new tail of the process_perfdata log?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: Missing RRD Files

Post by 00_kl250 »

3# tail -f /var/log/pnp4nagios/perfdata.log
2015-06-18 15:16:52 [12638] [0] RRDs::update /var/lib/pnp4nagios/perfdata/sw01xxx.xxxx/Port2Traffic.rrd 1434658602:0:0
2015-06-18 15:16:52 [12638] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/sw01xxx.xxxx/Port2Traffic.rrd: illegal attempt to update using time 1434658602 when last update time is 1434658602 (minimum one second step)
2015-06-18 15:19:11 [12869] [0] RRDs::update /var/lib/pnp4nagios/perfdata/sw01.sw01xxx.xxxx/Port2Traffic.rrd 1434658741:0:0
2015-06-18 15:19:11 [12869] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/sw01.sw01xxx.xxxx/Port2Traffic.rrd: illegal attempt to update using time 1434658741 when last update time is 1434658741 (minimum one second step)
2015-06-18 15:21:58 [13056] [0] RRDs::update /var/lib/pnp4nagios/perfdata/sw01.sw01xxx.xxxx/Port2Traffic.rrd 1434658908:0:0
2015-06-18 15:21:58 [13056] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/sw01.sw01xxx.xxxx/Port2Traffic.rrd: illegal attempt to update using time 1434658908 when last update time is 1434658908 (minimum one second step)
2015-06-18 15:23:48 [13259] [0] RRDs::update /var/lib/pnp4nagios/perfdata/sw01.sw01xxx.xxxx/Port2Traffic.rrd 1434659018:0:0
2015-06-18 15:23:48 [13259] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/sw01.sw01xxx.xxxx/Port2Traffic.rrd: illegal attempt to update using time 1434659018 when last update time is 1434659018 (minimum one second step)
2015-06-18 15:23:48 [13259] [0] RRDs::update /var/lib/pnp4nagios/perfdata/sw01sw01xxx.xxxx/Port2Traffic.rrd 1434659018:0:0
2015-06-18 15:23:48 [13259] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/sw01.sw01xxx.xxxx/Port2Traffic.rrd: illegal attempt to update using time 1434659018 when last update time is 1434659018 (minimum one second step)
Locked