0

I am confused. Not that is difficult to get me in a confused state, but I am so confused, that I don't know what my name is or where I live (like Baldrick!).

Anyway, I have nrpe installed on a client and everything works fine from the nagios server. Until I created my own simple plugin.

All it does is read a file from /tmp and echos its one-liner content. Except I get the NRPE: Unable to read output error.

I tried going the sudo route, but that did not work either. I logged in as the nagios user - the owner of the nrpe process - and the plugin works fine then. But executing it from the nagios server does not work.

In the end, I moved the file from /tmp to /usr/lib/nagios/plugins/logs and now it works from the nagios server.

So, my question is, how does ubuntu limit the plugin to /usr/lib/nagios/plugins when the script is being executed from the nagios server, but when logged in locally as the nagios user, it has access to the file in /tmp?

closed as off-topic by Keith, womble Sep 14 '18 at 3:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • Chances are it's a permissions thing – Christopher Dias Sep 13 '18 at 10:34
0

You can test your plugin on your client with the command 'nrpe test' and you will have the same results like on your nagios server.

And your problem should be in the permission of the user which execute the nrpe agent on your client.

Not the answer you're looking for? Browse other questions tagged or ask your own question.