macros for check_http

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

macros for check_http

Post by vuduops »

Hi;

Is there a way I can define a single macro in the commands.cfg that can take all the arguments in the service definition.

define command {
command_name check_xi_service_http_content
command_line $USER1$/check_http -H $HOSTADDRESS$ --onredirect=follow -s "$ARG1$"
}

Instead of check_http -H $HOSTADDRESS$ --onredirect=follow -s "$ARG1$" --> can we have a single argument that takes all the options ?

Thanks
Krishna
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: macros for check_http

Post by tacolover101 »

yes - use resources.cfg and reference $USERn$ accordingly - https://assets.nagios.com/downloads/nag ... Macros.pdf
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: macros for check_http

Post by dwhitfield »

If @tacolover101's response is not enough, I'm afraid you are going to have to explain a bit more about what you want.

I have a couple of questions that may help clarify things:
Are you trying to have a situation where you can change the command "on the fly"? If so, that's probably not going to work very well.
Are you trying to keep passwords out of the CCM?
Locked