Use of customized macro in CONTACT definition
Alex Griffin
agriffin at nagios.com
Wed Apr 25 19:16:18 CEST 2012
You said you tried to echo “EMAILID=$NAGIOS__CONTACTEMAILID”, but
echoing this string will not set EMAILID to the value of
$NAGIOS_CONTACTEMAILID. You should set EMAILID, and then echo it afterwards.
Otherwise, looking over your settings they seem to be fine.
Alex Griffin
---
Tech Team
agriffin at nagios.com
Deborah Martin wrote:
> Hi,
>
> I’m trying to define a customized contact macro so that I can pass it to
> an event handler
>
> My contact definition is :-
>
> define contact{
>
> contact_name test-admin
>
> alias test-admin
>
> service_notification_period 24x7
>
> host_notification_period 24x7
>
> service_notification_options w,u,c,r
>
> host_notification_options d,u,r
>
> service_notification_commands notify-by-email
>
> host_notification_commands host-notify-by-email
>
> email deborah.martin at kognitio.com <mailto:deborah.martin at kognitio.com>
>
> _EMAILID deborah.martin at kognitio.com <mailto:deborah.martin at kognitio.com>
>
> }
>
> Then in my script test I just do echo “EMAILID=$NAGIOS__CONTACTEMAILID”
>
> This doesn’t work. But if I put the same customized macro into a service
> definition and change the test script to “EMAILID=$NAGIOS__SERVICEEMAILID”
>
> it works fine.
>
> According to the docs, I’m specifying this correctly. I’m using nagios
> 3.2.0 on SLES10.
>
> So, am I doing something that should work and is a bug and if so is it
> fixed in a later nagios version or have I done something silly here…?
>
> Thanks,
>
> Deborah
>
>
> This e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they are
> addressed. If you are not the intended recipient, please delete this
> e-mail immediately. Any unauthorised distribution or copying is strictly
> prohibited.
>
> Whilst Kognitio endeavours to prevent the transmission of viruses via
> e-mail, we cannot guarantee that any e-mail or attachment is free from
> computer viruses and you are strongly advised to undertake your own
> anti-virus precautions. Kognitio grants no warranties regarding
> performance, use or quality of any e-mail or attachment and undertakes
> no liability for loss or damage, howsoever caused.
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> 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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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