Page 1 of 1

Custom Plugin

Posted: Fri May 03, 2013 2:28 pm
by cvken
I've created a custom plugin for nagios.
I can run the plugin as the nagios user from the command line.
Output of ls -l
-rwxr-xr-x 1 nagios nagios 2137 May 3 13:11 check_verify_count.pl
When I added the plugin as a command it runs from the command page and returns output. The plugin does call a windows mount that is mounted with nagios user and group.

When I added the command to a service check the output is blank and the service check returns. "(Return code of 127 is out of bounds - plugin may be missing)"
What have I done wrong here?

Re: Custom Plugin

Posted: Fri May 03, 2013 2:42 pm
by abrist
Permissions look fine.
cvken wrote:When I added the plugin as a command it runs from the command page and returns output.
Are you using the test check feature for this? Could you clarify how you are running this command from the command.
I assume the plugin script is located at: /usr/local/nagios/libexec
Is this correct?

Can you give us an example of this command running from the cli?

Re: Custom Plugin

Posted: Fri May 03, 2013 2:44 pm
by sreinhardt
In addition to abrist's path question, are you pre-appending $USER1$/ before your check name?

Re: Custom Plugin

Posted: Fri May 03, 2013 2:50 pm
by cvken
Sorry, this was a case of stupid.
I had changed the name of the script...and not updated the command to reflect the new name.

Re: Custom Plugin

Posted: Fri May 03, 2013 2:57 pm
by abrist
No problem. I hear weekends fix even the worst cases of stupid. Have a good one and get well :P