Custom notification commands...old question with new twist...
Andreas Ericsson
ae at op5.se
Wed Oct 6 13:56:27 CEST 2004
Steve Gilbert wrote:
> I've got a variation on a question that has been asked here several
> times before. Please bear with me...
>
> I want to modify my notification messages to include such things as
> physical location, serial number, user contact list, vendor contract
> numbers, etc.
>
> This is simple to do via changing the misccommands.cfg file...lots of
> folks seem to be just having it grep for the appropriate info from a
> flat file or database or whatever. Simple enough.
>
> Here's where I'd like to do it a little differently...and I'm not sure
> if this is possible or not. I'd really like to have all this info come
> straight from my hosts.cfg file somehow. Is it possible to add in
> another directive to a hosts definition?
Yes, but it requires a bit of meddling with the C-code. Nagios is a
monitoring tool, not an inventory system.
> I've played around with just
> trying to use the alias directive to hold all this info, but it's pretty
> ugly. I'd love to have some sort of "notes" directive in here that
> would populate a macro...
I'm working on adding a $HOSTNOTESURL$ macro to Nagios 2.0 (from
hostextinfo). That way you can connect it to whatever web-based system
you want.
> preferably being able to hold multiple lines of info.
This would require rather vast changes. Everything in Nagios is based on
'one-line' assumptions. Each variable have only one value, and each
value needs to be on one line only. I'm sure this could be changed
somehow, but that requires a bit of fiddling.
> It would just be nice to store all this info in one place and not
> have to maintain a hosts.cfg and a separate notes file.
Like I said before. Nagios is not an inventory system.
> Would this require a modification to the core Nagios code?
>
Yes.
> Thanks!
>
You're welcome.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.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