Page 4 of 6

Re: i cant make non-official plugins to work

Posted: Tue Oct 01, 2013 9:30 am
by Sander5
yes /usr/local/libexec/check_snmp_printer: function: not found

On CLI if i change the script #!/bin/sh to #!/bin/bash it gives me no errors. but when i leave it at /sh i comes with the function: not found error.

Re: i cant make non-official plugins to work

Posted: Tue Oct 01, 2013 3:43 pm
by scottwilkerson
This could be an issue with the interpreter. If it is working on your system with #!/bin/bash I would change it to that.

Re: i cant make non-official plugins to work

Posted: Thu Oct 03, 2013 4:49 am
by Sander5
I changed it. and now it is back to (Return code of 127 is out of bounds - plugin may be missing) again....

(i also just changed the default shell from csh to bash, same result...return code of 127...)

Re: i cant make non-official plugins to work

Posted: Thu Oct 03, 2013 11:05 am
by abrist
Does the altered check now work from the cli and is just reporting the 127 error through nagios?

Re: i cant make non-official plugins to work

Posted: Mon Oct 07, 2013 2:21 am
by Sander5
Yes just the 127 error in nagios

Re: i cant make non-official plugins to work

Posted: Mon Oct 07, 2013 9:30 am
by slansing
What are the permissions on this plugin now? Can you run the following:

Code: Select all

ll -la /usr/local/nagios/libexec/pluginname

Re: i cant make non-official plugins to work

Posted: Thu Oct 10, 2013 3:28 am
by Sander5
-rwxr-xr-x 1 root wheel 32647 Sep 26 09:58 /usr/local/libexec/check_snmp_printer

This is what you meant, right?

Re: i cant make non-official plugins to work

Posted: Thu Oct 10, 2013 10:47 am
by abrist
Can you run the check as the user "nagios" ?

Re: i cant make non-official plugins to work

Posted: Mon Oct 14, 2013 4:15 am
by Sander5
Yes i can run the command as nagios.

Altough i do not know which user runs the commands from the website, could it be another user?

Re: i cant make non-official plugins to work

Posted: Mon Oct 14, 2013 10:48 am
by abrist
The commands should be run as the user 'nagios'. Do you only have issues with this one plugin?