My own plugin isn't working


I wrote my own plugin and placed it in the plugins directory on the server that will be using the plugin. Running it from the command line works. However, running check_nrpe to check the plugin yeilds the error: “CHECK_NRPE: No output returned from daemon.”

Here’s my service definition on the server that runs check_nrpe:

define service{ use all-services
   host_name                        server1
   service_description        TW
   check_command             check_nrpe!tw_check

Here’s my command definition on the server in nrpe.cfg:

command[tw_check]=/usr/lib/nagios/plugins/ -D /var/lib/tripwire/report

Anyone have any ideas?


Also, here are the version of nagios that I"m running.

Local host server (check_nrpe):

Remote server (my plugin)

Both servers are RHEL 3.0es


Sounds like you didn’t follow the nrpe README file, to allow connections on the remote host. That’s why you get “no output”


Sorry I didn’t specify earlier but yes, I did read the README file. I currently have the nrpe daemon running on the remote host and other plugins that came with nagios are working fine.
However, the plugin I wrote isn’t working and gives the error I gave above.


Try running the command by hand when logged in as the user that runs nagios.


Thanks! You pointed me in the right direction.
The problem was the nagios user didn’t have the correct permissions on the files that were accessed in the script.


Who’s da man now!!! Hooah!!! Finally got one right.