Expanding dynamic service macros for URL use?

John P. Rouillard rouilj at cs.umb.edu
Thu Oct 6 22:53:56 CEST 2005


Hi all:

I was looking at using the action_url in the serviceextinfo object to
pass data to a CGI that would create a trouble ticket. I set up the
URL (split for readability) as:

action_url      https://some_site.com/roundup/create?host="$HOSTNAME$"&
            service="$SERVICEDESC$"&state=$SERVICESTATE$&
            output="$SERVICEOUTPUT$"

or 
            output="$SERVICEOUTPUT:NULL:ping$"

While the HOSTNAME and SERVICEDESC macros work fine, the SERVICEOUTPUT
either in standard or on-demand form along with the SERVICESTATE macro
don't expand. I think they can just expand to the contents shown on
the service information page.

So does anybody else think this would be a good thing to have, or is
it just me?

I am not sure that it is necessary to URL encode them since the "bad"
characters can just be eliminated using illegal_macro_output_chars, so
a SERVICEOUTPUTURL isn't needed, just expansion.

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

P.S. I sent it before I rejoined the mailing list and it was
     apparently rejected by the moderator. In case the report was in
     error, I apologize for the duplicate.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list