Using arguments in Alias commands NSClient++
Posted: Wed May 29, 2013 10:05 am
I have a generic service check alias that I use on all my boxes. I want to be able to exclude services via argument lines in Nagios XI.
I have written the following check:
alias_service = checkServiceState CheckAll? "exclude=ShellHWDetection" "exclude=clr_optimization_v4.0.30319_32" "exclude=clr_optimization_v4.0.30319_64" "exclude=clr_optimization_v2.0.50727_32"
I know NSClient++ is a separate product, but I think what I may be doing wrong might be something on the Nagios XI side.
"exclude=clr_optimization_v4.0.30319_32" "exclude=SysmonLog?" "exclude=VMUpgradeHelper" "exclude=HealthService?" "exclude=0193831367257817mcinstcleanup" "exclude=iphlpsvc" "exclude=stisvc" "exclude=SplunkForwarder?" "exlude=TSM Client Scheduler" "exclude=Contego_Spop" "exclude=$ARG2" "exclude=$ARG3$" "exclude=$ARG4$"
This check excludes certain static services that are commonly excluded on all boxes. In addition I added argument lines so I could add service to be excluded in Nagios XI, without having to make configuration changes on individual servers.
The service I am trying to exclude in this case is: IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310
When I write a static exclusion into the config, the service is excluded, but when I try to exclude it using it as an argument:
check_nrpe!alias_service!IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310!
The service is not excluded. Is there something I am doing wrong?
Thanks.
I have written the following check:
alias_service = checkServiceState CheckAll? "exclude=ShellHWDetection" "exclude=clr_optimization_v4.0.30319_32" "exclude=clr_optimization_v4.0.30319_64" "exclude=clr_optimization_v2.0.50727_32"
I know NSClient++ is a separate product, but I think what I may be doing wrong might be something on the Nagios XI side.
"exclude=clr_optimization_v4.0.30319_32" "exclude=SysmonLog?" "exclude=VMUpgradeHelper" "exclude=HealthService?" "exclude=0193831367257817mcinstcleanup" "exclude=iphlpsvc" "exclude=stisvc" "exclude=SplunkForwarder?" "exlude=TSM Client Scheduler" "exclude=Contego_Spop" "exclude=$ARG2" "exclude=$ARG3$" "exclude=$ARG4$"
This check excludes certain static services that are commonly excluded on all boxes. In addition I added argument lines so I could add service to be excluded in Nagios XI, without having to make configuration changes on individual servers.
The service I am trying to exclude in this case is: IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310
When I write a static exclusion into the config, the service is excluded, but when I try to exclude it using it as an argument:
check_nrpe!alias_service!IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310!
The service is not excluded. Is there something I am doing wrong?
Thanks.