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
Issue with special characters
Re: Issue with special characters
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.
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.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Issue with special characters
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!