RES: Add information in notification
Hari Sekhon
hpsekhon at googlemail.com
Wed Mar 5 18:33:39 CET 2008
Bráulio H. Soares wrote:
> Thanks for the help, Hari. But I need to add information possibly different for each host and/or service notification, understand?
>
> By this way, I cannot insert static parameter in the command_line, into the commands file.
>
> I think another method to do this, but is no functional. I think the following:
>
> - Create a contact template with a specific service and host notifies command.
> - Create a command to send e-mail to each contact template, so I would have customized commands to each situation I need.
>
> The problem rises when creating the contacts, because the same contact should be assigned to several contact template, but is not possible.
>
> Anymore idea!?
>
> Thanks.
>
> Sds,
>
If you are trying to do something too complicated, you might be trying
to push a square peg in to a round hole by forcing Nagios to work in a
way it normally doesn't do.
Have you considered just having one notification command which calls a
script. You can then program in all the logic in to this script.
The script can accept lots and lots of Nagios macros and change the
output depending of conditional testing and outputting certain macros
with information depending on which host or service it is.
This way all the logic is in once place and you just need to maintain
that notification script.
I didn't look at the one contributed by John Kramme just now, but that
might be a good starting point for you.
-h
--
Hari Sekhon
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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