I am having trouble configuring check command for sql serivce. It has $ sign in it.
something like these:
define serivce{
use generic -service
host_name host23
service_description sql server
check_command check_nt!SERVICESTATE! -d SHOWALL -l MSSQL$SQLEXP
}
it gives errors.please suggest.
How to configure services with a $
Re: How to configure services with a $
Some documentation with various solutions:
https://support.nagios.com/kb/article/n ... mmand.html
https://support.nagios.com/kb/article/n ... cters.html
I realize it says Nagios XI in the title, but much of the same solutions also apply to Nagios Core.
https://support.nagios.com/kb/article/n ... mmand.html
https://support.nagios.com/kb/article/n ... cters.html
I realize it says Nagios XI in the title, but much of the same solutions also apply to Nagios Core.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: How to configure services with a $
Thanks @mcapra!
OP, let us know if that does not resolve your issue. Also, please give the exact error if you continue to have problems, as well as the updated config.
OP, let us know if that does not resolve your issue. Also, please give the exact error if you continue to have problems, as well as the updated config.
Re: How to configure services with a $
Thank you mcapra for sharing the links. Adding a backslash \ and two dollars worked for most of the services except for the below.
please check the attachment for the error in nagios console and also the service to be monitored:
please check the attachment for the error in nagios console and also the service to be monitored:
Code: Select all
define service {
use generic-service
host_name IA0CW005
service_description SQL ServerRTCLOCAL
check_command check_nt !SERVICEST! -d SHOWALL -l MSSQL\$$RTCLOCAL
}
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to configure services with a $
your command somehow got chopped and should be SERVICESTATE not SERVICEST
this
should be this
define service {
use generic-service
host_name IA0CW005
service_description SQL ServerRTCLOCAL
check_command check_nt !SERVICESTATE! -d SHOWALL -l MSSQL\$$RTCLOCAL
}
this
Code: Select all
define service {
use generic-service
host_name IA0CW005
service_description SQL ServerRTCLOCAL
check_command check_nt !SERVICEST! -d SHOWALL -l MSSQL\$$RTCLOCAL
}
define service {
use generic-service
host_name IA0CW005
service_description SQL ServerRTCLOCAL
check_command check_nt !SERVICESTATE! -d SHOWALL -l MSSQL\$$RTCLOCAL
}
Re: How to configure services with a $
i feel stupid for not checking the command twice. thank you.
Thank you mcapra for sharing the links and scott for pointing my mistake.
This topic can be closed now.
Thank you mcapra for sharing the links and scott for pointing my mistake.
This topic can be closed now.