Hi all!
I want to output the SERVICEGROUP NAME assigned to a service trhough a service check command like an ARGx.
I tried: check_command -H $HOSTNAME$ -S $ARG1$ -C $ARG3$ -Y $SERVICEGROUPNAME$.
But when I execute the command it shows me the "$" simbol.
There's a way to output these information?
Servicegroup macro as argument in command
Re: Servicegroup macro as argument in command
How are you executing the command? The Test Check Command from the web UI has a lot of issues with it in terms of escaping and permissions, and if the service is assigned to a servicegroup from the service groups page (as opposed to through the service page) it will not have an entry for SERVICEGROUPNAME.
Former Nagios employee
Re: Servicegroup macro as argument in command
Hi,
Thanks for the reply.
I execute the command by the test check and no output for the $SERVICEGROUPNAME$ macro. The service is assigned from the service group page, may be I have to try to add through the service page? No other way exists to make it work?
Thanks a lot!
Thanks for the reply.
I execute the command by the test check and no output for the $SERVICEGROUPNAME$ macro. The service is assigned from the service group page, may be I have to try to add through the service page? No other way exists to make it work?
Thanks a lot!
Re: Servicegroup macro as argument in command
Try adding the service to the group from the service page and it should work.
Former Nagios employee
Re: Servicegroup macro as argument in command
Hi,
I tried to recreate all servicegroups and add the service to the groups from the service configuration page.
I launch then the check and it continues showing the $ simbol in the output
The macro is $SERVICEGROUPNAME$ ?
thanks.
I tried to recreate all servicegroups and add the service to the groups from the service configuration page.
I launch then the check and it continues showing the $ simbol in the output
The macro is $SERVICEGROUPNAME$ ?
thanks.
Re: Servicegroup macro as argument in command
That looks correct. Can you take two screenshots for me? One of the ARGs page where you have $SERVICEGROUPNAME$ entered and one of you testing the command like you normally would.
Former Nagios employee
Re: Servicegroup macro as argument in command
Thanks!
If I change the last ARG from $SERVICEGROUPNAME$ to $ARG3$ it works fine, but not with servicegroup macro.
If I change the last ARG from $SERVICEGROUPNAME$ to $ARG3$ it works fine, but not with servicegroup macro.
You do not have the required permissions to view the files attached to this post.
Re: Servicegroup macro as argument in command
What happens when you view the service under Home->Service Details? Clicking the service name there should let you view the output. If the $ is still showing up there it could be a bug, but as I said before using the Test Check Command button does not always work.
Former Nagios employee
Re: Servicegroup macro as argument in command
yea! You are right!! In performance data appear the correct ServiceGroupname!!
Thanks a lot!!

Thanks a lot!!