Page 1 of 1
Pass "!" is a service argument
Posted: Fri Oct 20, 2017 6:01 am
by kmarinov
Hi all
Happy to join the forum!
I'm currently adding a new monitoring for 3rd party Windows service and getting to followin error:
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
I'm using Nagios XI -> Service Management and when I add the name for example: "Name! Test" and save it - when i get back into the settings of this service i see as follow:
Name
Test
without "!" and on two lines.
How can I pass "!"? Probably that is the reason of the error.
Thank you in advance
Re: Pass "!" is a service argument
Posted: Fri Oct 20, 2017 11:13 am
by cdienger
! is used as an argument seperator in Nagios. Try using a
\ to escape it first.
https://support.nagios.com/kb/article/n ... cters.html has more information on this.
Re: Pass "!" is a service argument
Posted: Tue Oct 24, 2017 4:44 am
by kmarinov
Thank you but I still cannot pass it with \ in front of !. Any other suggestions?
I'm using check_nsc_nt plugin
Re: Pass "!" is a service argument
Posted: Tue Oct 24, 2017 9:36 am
by cdienger
Can you clarify where it isn't working with a screenshot of it failing? It's possible that the test button will no longer work but it is still able to execute as scheduled and will display content on the dashboard.
Re: Pass "!" is a service argument
Posted: Tue Oct 24, 2017 1:59 pm
by kmarinov
The one from the left is before I save (that is the real name of the service and how I want to looks like) and the one from right is after I click Save and get back into the service options.
Re: Pass "!" is a service argument
Posted: Tue Oct 24, 2017 3:35 pm
by npolovenko
@kmarinov, What version of XI are you running? Can you try to paste "Act\! Scheduler" as an argument to a different random command, save it and then reopen it. Would it be split over two lines or no?
Re: Pass "!" is a service argument
Posted: Wed Oct 25, 2017 4:46 am
by kmarinov
Hello,
Our version is Nagios® Core⢠Version 4.0.7. I tried the same command in different config but the result is the same...
Re: Pass "!" is a service argument
Posted: Wed Oct 25, 2017 12:12 pm
by npolovenko
@kmarinov , Can you try to use single quotes instead?
'Act! Scheduler'
Re: Pass "!" is a service argument
Posted: Fri Nov 03, 2017 10:13 am
by SteveBeauchemin
Re: Pass "!" is a service argument
Posted: Fri Nov 03, 2017 11:18 am
by npolovenko
Thanks,
@SteveBeauchemin!
@kmarinov, Let us know if your issue was resolved so we can close this thread.