Common Error I find with Many Plugins - Desperate to solve..

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
LAINFOSEC
Posts: 16
Joined: Wed Feb 13, 2019 10:23 am

Common Error I find with Many Plugins - Desperate to solve..

Post by LAINFOSEC »

So far, Nagios XI has been a stellar project. After working for a very large billion dollar corp working in their DC, using many different custom monitoring tools, Nagios has really shined in my eyes.

However, I do run into a lot of bumps, but fortunately, there is usually a solution.

This particular issue though, I come across it in many many plugins and its becoming a bit frustrating. Here is the error:

Code: Select all

(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''

/bin/sh: -c: line 1: syntax error: unexpected end of file
Now, the error is obvious in someways especially if you code. I noticed that sometimes when installing a new plugin, somehow in the $ARG$ the string you write out gets chopped off. In my experience its like the last 3 character, one of those character usually being and en quote. So I just add it back in, save, and viola, it works.

Sometimes though, like today, I installed the NRDP agent, got it configured, force checked all the services and they returned what I needed, all is looking good...then a few minutes later, they all take a dump and pop this alert. I checked the $ARG$ where the token was spelled out to be passed, and everything seemed fine. No missing characters or quotes.

So why does this happen in various different plugins and how do I mitigate it? Its quite the headache.

Thank you for your time!
"New technology is not good or evil in and of itself. It's all about how people choose to use it."
User avatar
LAINFOSEC
Posts: 16
Joined: Wed Feb 13, 2019 10:23 am

Re: Common Error I find with Many Plugins - Desperate to sol

Post by LAINFOSEC »

Update:

I changed the token to a one that doesnt have special characters in it and it seems fine. Is this a sensitive matter in Nagios plugins because various languages require special character to be escaped?
"New technology is not good or evil in and of itself. It's all about how people choose to use it."
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Common Error I find with Many Plugins - Desperate to sol

Post by tgriep »

When using special characters in Nagios Arguments, they do need to be escaped for the command to function.

This KB article has some examples that you can try.
https://support.nagios.com/kb/article/n ... s-580.html

For me, putting the string with the special characters between single quotes '' works for most of the commands.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked