Hi,
I need to provide more data to support personnel than the standard Core 4.x email output provides. As with most users, I use a Postfix front end to process Nagios email. Is there any way I can use any of the on board Macros in Core to add data to the email content? In other words, are there any generic buckets I can put data into that can then be added to an alert email to tell things like machine location, machine credentials, methods of fixing typical problems, etc? All of this is really valuable information that I would really like to include in the alert message. Is there any way to use macro slots as buckets, or if not, reach out to a database that I would build and link the alert with the DB entry? Is this a pipe dream?
Thanks in advance!
Joe
Email Content Elaboration
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Email Content Elaboration
Yes, all of this is possible.
Have you read this:
http://nagios.sourceforge.net/docs/nagi ... acros.html
And this:
http://nagios.sourceforge.net/docs/nagi ... olist.html
Have you read this:
http://nagios.sourceforge.net/docs/nagi ... acros.html
And this:
http://nagios.sourceforge.net/docs/nagi ... olist.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Email Content Elaboration
Hey Guy
I had seen the second page but really couldn't make hide nor hair. I am guessing that the first page is going to make things a little clearer. I very much appreciate the help. Lets see what this sad tired brain can come up with. Hope things are well down under. I am in California, would love to see your country some day. Would you see what you can do about moving it closer? Its too long a plane ride. Thanks man...
Joe
I had seen the second page but really couldn't make hide nor hair. I am guessing that the first page is going to make things a little clearer. I very much appreciate the help. Lets see what this sad tired brain can come up with. Hope things are well down under. I am in California, would love to see your country some day. Would you see what you can do about moving it closer? Its too long a plane ride. Thanks man...
Joe
Re: Email Content Elaboration
Here is a quick example for if you want to add the Host Notes to your notify-host-by-email command.
All you would have to do is edit that command and add the $HOSTNOTES$ macro to the message. If the host has the notes field filled in, it will be sent on the next notification.
Does that help you?
All you would have to do is edit that command and add the $HOSTNOTES$ macro to the message. If the host has the notes field filled in, it will be sent on the next notification.
Code: Select all
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\nNotes: $HOSTNOTES$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Email Content Elaboration
Thanks tgriep, good example.
I've been to California a few times, very similar climate to Australia
I can't help with moving it closer ... I'm very familiar with the 14 hour plane flight
Does tgriep's example help you?
I've been to California a few times, very similar climate to Australia
Does tgriep's example help you?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.