Hi,
I have replaced our switches to HP 2530POE+ and Nagios core is showing "(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_snmp_hp-procurve.sh, ...) failed. errno is 2: No such file or directory " and memory error SNMP CRITICAL - free *39918564* bytes . I have tried few changes and googled but you guys are my last resort to fix this issue.
Please advise.
HP Switch 2530
Re: HP Switch 2530
Sounds like the permissions are wrong on the file, what is the output of
Code: Select all
ls -l /usr/local/nagios/libexec/check_snmp_hp-procurve.sh[/icode]? It should be the same as what the other plugins are in that folder.
Former Nagios Employee
Re: HP Switch 2530
The output is
-rwxr-xr-x. 1 nagios nagios 3295 Sep 26 2014 /usr/local/nagios/libexec/check_snmp_hp-procurve.sh
-rwxr-xr-x. 1 nagios nagios 3295 Sep 26 2014 /usr/local/nagios/libexec/check_snmp_hp-procurve.sh
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: HP Switch 2530
Could you post the plugin to the forum, as well as the command definition in nagios that these checks are using?
Thanks!
Thanks!
Re: HP Switch 2530
I would try my bestscottwilkerson wrote:Could you post the plugin to the forum, as well as the command definition in nagios that these checks are using?
Thanks!
define command {
command_name check_snmp_hp-procurve
command_line $USER1$/check_snmp_hp-procurve.sh public $HOSTADDRESS$
#command_line /usr/local/nagios/libexec/check_snmp_hp-procurve.sh public $HOSTADDRESS$
}
Plugin attached as well.
- Attachments
-
- check_snmp_hp-procurve.sh
- (3.22 KiB) Downloaded 496 times
Re: HP Switch 2530
It could be that the new switches are not compatible with the plugin and that could be causing the error.
Can you login to the server and run the command manually as the nagios user and post the output here?
Run the following to do that, replacing xxx.xxx.xxx.xxx with the IP address of the HP device.
Can you login to the server and run the command manually as the nagios user and post the output here?
Run the following to do that, replacing xxx.xxx.xxx.xxx with the IP address of the HP device.
Code: Select all
su nagios
/usr/local/nagios/libexec/check_snmp_hp-procurve.sh public xxx.xxx.xxx.xxx
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: HP Switch 2530
As requested.
[root@nagios ~]# su nagios
[nagios@nagios root]$ /usr/local/nagios/libexec/check_snmp_hp-procurve.sh public 192.168.3.48
bash: /usr/local/nagios/libexec/check_snmp_hp-procurve.sh: /bin/bash^M: bad interpreter: No such file or directory
[nagios@nagios root]$
[root@nagios ~]# su nagios
[nagios@nagios root]$ /usr/local/nagios/libexec/check_snmp_hp-procurve.sh public 192.168.3.48
bash: /usr/local/nagios/libexec/check_snmp_hp-procurve.sh: /bin/bash^M: bad interpreter: No such file or directory
[nagios@nagios root]$
Re: HP Switch 2530
Thanks for all your help but I managed to resolve it myself. I was downloading the script on a windows pc and moving over to linux pc using winscp. somehow it was causing the issue.
I set my notepad++ to unix mode in settings and created a new file and named it same as hp_snmp_hp-procurve.sh and paste the whole script in the new file and moved it again over my nagios server.
I run the command again as suggested
[root@nagios ~]# /usr/local/nagios/libexec/check_snmp_hp-procurve.sh public xxx.xxx.xxx.xxx
HP switch hardware is OK
I hope it helps others as well.
I set my notepad++ to unix mode in settings and created a new file and named it same as hp_snmp_hp-procurve.sh and paste the whole script in the new file and moved it again over my nagios server.
I run the command again as suggested
[root@nagios ~]# /usr/local/nagios/libexec/check_snmp_hp-procurve.sh public xxx.xxx.xxx.xxx
HP switch hardware is OK
I hope it helps others as well.
Re: HP Switch 2530
Glad you were able to find a solution! Locking and marking as resolved.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/