Page 1 of 1
check_snmp_int.pl
Posted: Tue Jul 18, 2017 5:07 am
by RADOUAN
hello
i'm trying to install a pluguin to monitor the bandwith of 10 PC windows 7, i had chosing check_snmp_int.pl, when i tested it from the terminal, it work correctelly, but when integreted it in nagios pluguin directory i get this error:
(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_snmp_int.pl, ...) failed. errno is 2: No such file or directory
thank you.
Re: check_snmp_int.pl
Posted: Tue Jul 18, 2017 10:40 am
by tacolover101
it appears the file doesn't exist in the folder you specified. (or perhaps under a different name) i would verify what you've entered in different places, and that the nagios user is able to see the plugin. (could be permissions with root:root stopping you)
from the CLI, can you do su - nagios then try to test the plugin?
Re: check_snmp_int.pl
Posted: Tue Jul 18, 2017 3:56 pm
by dwhitfield
Definitely could be permissions. What's the output of ll /usr/local/nagios/libexec/? Also, is this XI or Core?
Re: check_snmp_int.pl
Posted: Wed Jul 19, 2017 4:01 am
by RADOUAN
HELLO
thank you all four your answers, i'm usineg nagios core 4.0.8, when i tryed ll /usr/local/nagios/libexec/, i found that the owner is nagios, however my admin is nagiosadmin, so i changed the owner, no it's work but i have a new error : UNKNOW unable to write file tmp/tmp_Nagios_int.10.40.20.8 !! (1,4KBps/1,5KBps):UP:UNKOWN
thank you
Re: check_snmp_int.pl
Posted: Wed Jul 19, 2017 9:43 am
by dwhitfield
The apache account and the account on the server are probably different. nagios was probably right.
Can you please post the entire output of ll /usr/local/nagios/libexec/ so we can see exactly what's going on? If you are concerned about security, let's just do ll /usr/local/nagios/libexec/check_snmp_int.pl
Re: check_snmp_int.pl
Posted: Wed Jul 19, 2017 10:29 am
by RADOUAN
HELLO
thank you for your answer, when i tryed this ll /usr/local/nagios/libexec/check_snmp_int.pl i get :
-rwxr-xr-x 1 nagiosadmin root 34480 14:17 /usr/local/nagios/libexec/check_snmp_int.pl
i want just to tell you that nagiosadmin is the appache's server admin,
the ful error is : UNKNOW unable to write file tmp/tmp_Nagios_int.10.40.20.8 !! No usable DATA on file (6 rows) (1,4KBps/1,5KBps):UP:UNKOWN
thank you
Re: check_snmp_int.pl
Posted: Wed Jul 19, 2017 2:58 pm
by tgriep
That plugin stores temporary files that it needs to calculate the output in files in the /tmp folder.
When you ran it in the console, you probably ran it as root and when it created the temporary files that are only writeable by root but when Nagios runs the check, it runs it as the nagios user which cannot write to the temporary file, causing that error.
To fix this, go to the /tmp folder and delete the temporary file owned by root and then the next time Nagios runs the plugin, it should be able to create the file and run correctly.