'Servicename': Not found error
'Servicename': Not found error
Hello,
We are getting 'Servicename': Not found error in one of our servers.
We did test check command in service, it is working fine.
Also we crosschecked it using putty where also it is working fine(PFB output)-
[nagios@nagiosserver libexec]$ ./check_nt -H remoteserver -s "password" -p 12489 -v SERVICESTATE -l 'Servicename' -d SHOWALL
Servicename: Started
Please let us know why we are getting 'Servicename': Not found error in Nagios GUI.
We are getting 'Servicename': Not found error in one of our servers.
We did test check command in service, it is working fine.
Also we crosschecked it using putty where also it is working fine(PFB output)-
[nagios@nagiosserver libexec]$ ./check_nt -H remoteserver -s "password" -p 12489 -v SERVICESTATE -l 'Servicename' -d SHOWALL
Servicename: Started
Please let us know why we are getting 'Servicename': Not found error in Nagios GUI.
Thanks & Regards,
I2MP Team.
I2MP Team.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 'Servicename': Not found error
does servicename contain any non-alpha chars?
Can you share the config from the CCM for this service?
Can you share the config from the CCM for this service?
Re: 'Servicename': Not found error
Hello Scott,
I've attached the configs.
Thanks!
I've attached the configs.
Thanks!
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 'Servicename': Not found error
The $ is going to need special escaping
See this article
https://support.nagios.com/kb/article/n ... s-580.html
See this article
https://support.nagios.com/kb/article/n ... s-580.html
Re: 'Servicename': Not found error
I referred the KB, but the backslash did not help. I noticed when I run the 'Test Check Command' it takes the backslash on it's own, you can find it in the snapshot attached.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 'Servicename': Not found error
That looks like you got a proper response.
In this post the backslash wasn't present
https://support.nagios.com/forum/viewto ... 35#p252147
In this post the backslash wasn't present
https://support.nagios.com/forum/viewto ... 35#p252147
Re: 'Servicename': Not found error
Although I am getting a proper response in the Test Check Command, the error is not resolved yet. The service still shows critical. I am attaching the Service config from CCM, the result of Test Check Command and the Error I get on the service.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 'Servicename': Not found error
In $ARG3$ change
to
the test command performs some escaping that may not allow the "real" command to run. this is required to prevent command injection form apache although the command may run correct once nagios is executing it.
Code: Select all
$
Code: Select all
\$
Re: 'Servicename': Not found error
Hey,
You should use single quotation for SQL service names.
In your case ARG3 would be -
-l 'SQLAgent$REMEA_LANDESK' or -l 'SQLAgent$REMEA_LANDESK' -d SHOWALL
Try both and let us know the result.
You should use single quotation for SQL service names.
In your case ARG3 would be -
-l 'SQLAgent$REMEA_LANDESK' or -l 'SQLAgent$REMEA_LANDESK' -d SHOWALL
Try both and let us know the result.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 'Servicename': Not found error
Yes this can work also, but it all depends on how the command is configured.sac1472 wrote:In your case ARG3 would be -
-l 'SQLAgent$REMEA_LANDESK' or -l 'SQLAgent$REMEA_LANDESK' -d SHOWALL