i cant make non-official plugins to work

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.
Sander5
Posts: 37
Joined: Wed Sep 04, 2013 5:15 am

Re: i cant make non-official plugins to work

Post by Sander5 »

I remember i also tried another check_printer script. exactly the same problem.

I have just used the check_snmp plugin and it works. (sort off)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: i cant make non-official plugins to work

Post by slansing »

What are your permissions on check_snmp?
Sander5
Posts: 37
Joined: Wed Sep 04, 2013 5:15 am

Re: i cant make non-official plugins to work

Post by Sander5 »

-rwxr-xr-x 1 root wheel 138700 Jun 25 13:06 check_snmp


-rwxr-xr-x 1 root wheel 32647 Sep 26 09:58 check_snmp_printer

I hope i am not asking a very stupid question but i can't edit check_snmp it's unreadable, is this supposed to be like this?
check_snmp_printer is readable in clean text
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: i cant make non-official plugins to work

Post by sreinhardt »

check_snmp is a binary file, and would not be readable via a normal editor. You would actually want to look at the source code it was compiled from. The other is likely a perl or some other script. As for your permissions, they normally should be owned by both the nagios user and group. Do you know if there is a reason this is not the case? You can try:

Code: Select all

 chmod nagios:nagios /path/to/plugin
To try and get them running properly. I realize they have everyone read and execute, but that is less than ideal.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Sander5
Posts: 37
Joined: Wed Sep 04, 2013 5:15 am

Re: i cant make non-official plugins to work

Post by Sander5 »

Sorry for this late reaction.

Before i did anything (chmod) it reads: -rwxr-xr-x 1 root wheel 32647 Sep 26 09:58 check_snmp_printer
root wheel should be nagios nagios right?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: i cant make non-official plugins to work

Post by lmiltchev »

root wheel should be nagios nagios right?
Correct.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Sander5
Posts: 37
Joined: Wed Sep 04, 2013 5:15 am

Re: i cant make non-official plugins to work

Post by Sander5 »

I changed it to nagios nagios
Still the plugin may be missing 127 error.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: i cant make non-official plugins to work

Post by abrist »

What is the output of:

Code: Select all

grep USER1 /usr/local/nagios/etc/resource.cfg
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.
Sander5
Posts: 37
Joined: Wed Sep 04, 2013 5:15 am

Re: i cant make non-official plugins to work

Post by Sander5 »

Code: Select all

# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/libexec
my resource.cfg is located at /usr/local/etc/nagios and not /usr/local/nagios/etc

Is this normal? i have the feeling i did something wrong or i forgot something
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: i cant make non-official plugins to work

Post by abrist »

What is the listing of:

Code: Select all

ls -la /usr/local/libexec
Sander5 wrote: Is this normal? i have the feeling i did something wrong or i forgot something
How did you install nagios? (source, repo, etc)
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.
Locked