macro referencing in host/serviceextinfo notesdirective

Thomas Guyot-Sionnest Thomas at zango.com
Thu Oct 26 06:54:52 CEST 2006


> -----Original Message-----
> From: nagios-devel-bounces at lists.sourceforge.net [mailto:nagios-devel-
> bounces at lists.sourceforge.net] On Behalf Of Rob Brown
> Sent: Wednesday, October 25, 2006 16:05
> To: nagios-devel at lists.sourceforge.net
> Subject: [Nagios-devel] macro referencing in host/serviceextinfo
> notesdirective
> 
> I have been experimenting with using the host/serviceextinfo
> definitions to add some external links to information about
> hosts/services. One thing I noticed while messing about is that the
> "notes_url" and "action_url" directives seem to be able to do macro
> replacement, while the "notes" directive does not. It would be quite
> helpful to be able to use certain macros (like $HOSTNAME$,
> $HOSTALIAS$, etc) in the notes. For example:
> define hostextinfo{
> 	hostgroup_name	hostgroup1
> 	notes		<a
> href="http://webserver.localhost.localdomain/hostinfo.pl?host=$HOSTNAME$">
> Click
> Here for some external information about $HOSTNAME$</a><br><a
> href="http://webserver2.localhost.localdomain/hostinfo2.pl?host=$HOSTNAME$
> ">Click
> Here for some other information about $HOSTNAME$</a>
> 	}
> define serviceextinfo{
> 	hostgroup_name         hostgroup1
> 	service_description	someservice
> 	notes			<a
> href="http://webserver.localhost.localdomain/serviceinfo.pl?host=$HOSTNAME
> $&service=$SERVICEDESC$">Click
> Here for some external information about $SERVICEDESC$ on
> $HOSTNAME$</a><br><a
> href="http://webserver2.localhost.localdomain/serviceinfo.pl?host=$HOSTNAM
> E$&service=$SERVICEDESC$">Click
> Here for some other information about $SERVICEDESC$ on $HOSTNAME$</a>
> 	}

Yep, would be very useful. I personally point action_url to the commands
screen so I can send it in emails (plain-text). With the feature you suggest
I could send HTML mails (I don't especially like this but windows guys love
them) and include a notes macro just like the one you described.

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3076 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20061025/b5aea75a/attachment.bin>
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list