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.
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?
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.
[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.
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!
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!
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!
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.
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)