Page 3 of 3

Re: Using arguments in Alias commands NSClient++

Posted: Mon Jun 17, 2013 3:36 pm
by cfgriffith
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?

Re: Using arguments in Alias commands NSClient++

Posted: Mon Jun 17, 2013 4:37 pm
by sreinhardt
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> ....

Re: Using arguments in Alias commands NSClient++

Posted: Wed Jun 19, 2013 9:32 am
by cfgriffith
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.

Re: Using arguments in Alias commands NSClient++

Posted: Wed Jun 19, 2013 12:02 pm
by lmiltchev
Great! I am locking this post as resolved.