My plan originally was to use each arg for a specific service that is not already in the long alias service list. But I am not sure if that would work without quotes, besides just for exclude=$ARG1$.
It sounds like from what your saying I can do a custom service exclusion using arguments only for one service, rest I'd have to put into the actual alias config. I can't do it with other arguments unquoted? Like: exclude=$ARG1$ exclude=$ARG2$ exclude=$ARG3$
I will run the command from the CLI tomorrow when I get in. Just to clarify which command is it you want me to run?
Using arguments in Alias commands NSClient++
-
cfgriffith
- Posts: 83
- Joined: Tue Jan 15, 2013 4:22 pm
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Using arguments in Alias commands NSClient++
I do believe slansing wanted to see what happened if you ran the check_nrpe command via cli, to see if it is possible.
/usr/local/nagios/libexec/check_nrpe -H <client_IP> -c alias_service -a "exclude=<service1> exclude=<service2> exclude=<service3> ....
/usr/local/nagios/libexec/check_nrpe -H <client_IP> -c alias_service -a "exclude=<service1> exclude=<service2> exclude=<service3> ....
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
cfgriffith
- Posts: 83
- Joined: Tue Jan 15, 2013 4:22 pm
Re: Using arguments in Alias commands NSClient++
I got it to work after testing for multiple service exceptions:
In my config I have:
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" "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=$ARG1$ exclude=$ARG2$ exclude=$ARG3$ exclude=$ARG4$
In Nagios I have:
check_nrpe!/usr/local/nagios/libexec/check_nrpe -H tsmreport.stkate.pvt -c alias_service -a "IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310" "SplunkForwarder"
So the two services I am excluding in this case are: "IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310" "SplunkForwarder", which are referenced in the configuration by exclude=$ARG1$ exclude=$ARG2$
Thanks for all the help guys.
In my config I have:
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" "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=$ARG1$ exclude=$ARG2$ exclude=$ARG3$ exclude=$ARG4$
In Nagios I have:
check_nrpe!/usr/local/nagios/libexec/check_nrpe -H tsmreport.stkate.pvt -c alias_service -a "IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310" "SplunkForwarder"
So the two services I am excluding in this case are: "IBMWAS70Service - Tivoli Integrated Portal - TIPProfile_Port_16310" "SplunkForwarder", which are referenced in the configuration by exclude=$ARG1$ exclude=$ARG2$
Thanks for all the help guys.
Re: Using arguments in Alias commands NSClient++
Great! I am locking this post as resolved.
Be sure to check out our Knowledgebase for helpful articles and solutions!