check_snmp_int.pl

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.
Locked
RADOUAN
Posts: 4
Joined: Mon Jun 12, 2017 8:14 am

check_snmp_int.pl

Post 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.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: check_snmp_int.pl

Post 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?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_snmp_int.pl

Post by dwhitfield »

Definitely could be permissions. What's the output of ll /usr/local/nagios/libexec/? Also, is this XI or Core?
RADOUAN
Posts: 4
Joined: Mon Jun 12, 2017 8:14 am

Re: check_snmp_int.pl

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_snmp_int.pl

Post 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
RADOUAN
Posts: 4
Joined: Mon Jun 12, 2017 8:14 am

Re: check_snmp_int.pl

Post 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
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_int.pl

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked