Issue with special characters

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
reincarne
Posts: 146
Joined: Wed Jun 26, 2013 4:39 am

Issue with special characters

Post 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
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Issue with special characters

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issue with special characters

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked