Page 2 of 2
Re: Performance data not showing - Nagios XI
Posted: Tue Sep 29, 2015 2:00 pm
by jdalrymple
I've made some rudimentary modifications to the plugin that should get you perfdata, try the attached.
Re: Performance data not showing - Nagios XI
Posted: Tue Sep 29, 2015 3:01 pm
by amit.ahuja
so any thoughts how we have the data saved to see performance graph -- anything I can append in script
thanks
Re: Performance data not showing - Nagios XI
Posted: Tue Sep 29, 2015 3:42 pm
by jdalrymple
amit.ahuja wrote:so any thoughts how we have the data saved to see performance graph -- anything I can append in script
thanks
The above provided script should offer what you need.
Re: Performance data not showing - Nagios XI
Posted: Tue Sep 29, 2015 5:02 pm
by amit.ahuja
Thank you that also worked - can you please help with ./check_nwc_health
as well -
[root@esu4v247 libexec]# ./check_nwc_health
Usage: check_nwc_health [ -v|--verbose ] [ -t <timeout> ] --mode <what-to-do> --hostname <network-component> --community <snmp-community> ...]
[root@esu4v247 libexec]#
I have attached script as well to take a look.
Thanks
Re: Performance data not showing - Nagios XI
Posted: Wed Sep 30, 2015 8:23 am
by lmiltchev
Doesn't this plugin return perfdata output for you "out of the box"? I tried the "cpu-usage" mode and I do see perfdata output.
Code: Select all
./check_nwc_health.pl --hostname x.x.x.x --community public --mode cpu-usage
OK - cpu usage is 0.00% | 'cpu_usage'=0%;80;90;0;100
Can you show an example of a check that you are running from the command line?
Re: Performance data not showing - Nagios XI
Posted: Wed Sep 30, 2015 11:23 am
by amit.ahuja
We are using the same script to check connections and hardware halth for hardware health we are able to see Performance graph but for Connections we are not seeing it
please find the output from command line
check- connections -
[root@esu4v247 ~]# /usr/local/nagios/libexec/check_nwc_health --hostname 63.165.185.110 --community simpsons --mode check-connections --warning --critical
Argument "--" isn't numeric in sprintf at /usr/local/nagios/libexec/check_nwc_health line 1506.
OK - average service time for http requests is 0.48400s | 'http_response_time'=0.48400s;-0critical;10;;
Check hardware health -
[root@esu4v247 ~]# /usr/local/nagios/libexec/check_nwc_health --hostname 63.165.185.110 --community simpsons --mode hardware-health --warning --critical
OK - disk 0 usage is 18.00%, environmental hardware working fine | 'sensor_Motherboard temperature'=43;;;; 'sensor_+12V bus voltage'=12;;;; 'sensor_-12V bus voltage'=-11.96;;;; 'sensor_+5V standby voltage'=5.11;;;; 'sensor_+3V battery voltage'=3.20;;;; 'sensor_CPU temperature'=46;;;; 'sensor_Fan 1 speed'=4157.60;;;; 'sensor_Fan 2 speed'=4561.20;;;; 'sensor_Fan 3 speed'=4326.70;;;; 'sensor_CPU core voltage 1'=1.50;;;; 'sensor_CPU core voltage 2'=1.55;;;; 'sensor_+3V bus voltage'=3.32;;;; 'sensor_+5V bus voltage'=5.03;;;; 'disk_0_usage'=18%;60;60;0;100
Re: Performance data not showing - Nagios XI
Posted: Wed Sep 30, 2015 1:27 pm
by tgriep
The plugin is returning performance data but this message is affecting the data.
Code: Select all
Argument "--" isn't numeric in sprintf at /usr/local/nagios/libexec/check_nwc_health line 1506.
You may need to have to add warning and critical thresholds to your check command and that should solve it for you.
Re: Performance data not showing - Nagios XI
Posted: Wed Sep 30, 2015 4:45 pm
by amit.ahuja
Thanks, check_nw_health is working now after adding value for warning and critical.
Another issue I'm having right now is check_snmp script doesn't generate perfdata. It's also don't have -f option either.
[root@esu4v247 libexec]# /usr/local/nagios/libexec/check_snmp -H 11.120.220.13 -C simpsons -o .1.3.6.1.2.1.25.1.1.0
SNMP OK - Timeticks: (3023741170) 349 days, 23:16:51.70 |
Re: Performance data not showing - Nagios XI
Posted: Wed Sep 30, 2015 9:45 pm
by jdalrymple
You're not getting perfdata because check_snmp doesn't parse the output type, it's not defined as an integer.
Try this plugin:
https://exchange.nagios.org/directory/P ... me/details
Code: Select all
[jdalrymple@localhost ~]$ ./check_snmp_uptime.pl -f -C public -H hostname
OK: Cisco IOS Software, - up 355 days 14 hours 53 minutes | type=4 uptime_minutes=512093
Although I must admit, perfdata for uptime seems fairly useless...