Page 1 of 1

Issue with special characters

Posted: Sun Mar 27, 2016 1:33 am
by reincarne
Hi,
I'm experiencing a strange issue with one of my service checks.

I need to search for a pattern inside a file. The patter is "[]" .
If I execute the plugin locally on the machine - it works.
Running it from Nagios is returns an error: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
I'm pretty sure its related some how to special characters issue. For some reason it looks like using NRPE it doesn't allow special characters.
I tried to use '\' to escape the special charachters but it didn't really help. Is there another way to handle this issue?


check_nrpe_file_content2!/home/log/production.log!\[\]!0!1

Re: Issue with special characters

Posted: Sun Mar 27, 2016 9:45 am
by eloyd
Is this a custom plugin? I'm not familiar with it. At any rate, my quick assessment is that if you are always passing in "[]" as a parameter, then it doesn't need to be passed in. It could be specified in the nrpe.cfg file (or one of its include) as a direct parameter on the command line. Or, optionally, the plugin could be updated so that it is using "[]" directly instead of needing to be passed that argument.

But this is all supposition, since it depends on what the plugin actually does and it depends on how you may use it differently in different services.

Re: Issue with special characters

Posted: Mon Mar 28, 2016 9:22 am
by lmiltchev
Show us how the command is defined on the remote box, and the actual check you run from the command line on the Nagios XI server, along with the output of it.