Hi, we use nagios for monitoring over 300+ devices and it works WOW.
Just 2 things, Im trying to achieve.
1. In the notification emails, I need it to show the duration also.
For example,
The monitor CISCOABC-POPSWITCH (103.111.111.12) is back UP (Host Is Reachable) (It was down for 3 hours, 45 minutes and 15 seconds).
2. I need to send the nagios notifications to multiple emails, like 2 emails right now.
Both are gmail Ids only.
How do we achieve ?
Nagios questions - down duration and multiple email notify
Re: Nagios questions - down duration and multiple email noti
For the multiple mail addresses you can use contactgroups.
A contactgroup can maintain multiple contacts.
A contactgroup can maintain multiple contacts.
Rob Hassing


Re: Nagios questions - down duration and multiple email noti
You may find the $SERVICEDURATION$ and $HOSTDURATION$ macros useful:soamz wrote:In the notification emails, I need it to show the duration also.
https://assets.nagios.com/downloads/nag ... ceduration
https://assets.nagios.com/downloads/nag ... stduration
As @rhassing indicated, contactgroups are the perfect candidate for this:soamz wrote:I need to send the nagios notifications to multiple emails, like 2 emails right now.
https://assets.nagios.com/downloads/nag ... ntactgroup
You could include multiple members in this contactgroup (contact1,contact2,alice,bob,etc) then assign the contactgroup to your service.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Nagios questions - down duration and multiple email noti
Awesome thanks.
So, better to use both service and host then ?
I see both have the vars.
So, better to use both service and host then ?
I see both have the vars.
Re: Nagios questions - down duration and multiple email noti
You can specify your contacts or contactgroups at either level, host or service. It really depends on how you want your notifications to flow, so I'm not sure how to answer your question.
Former Nagios Employee
Re: Nagios questions - down duration and multiple email noti
email thing is done already
But stuck at the notification downtime thing.
But stuck at the notification downtime thing.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios questions - down duration and multiple email noti
What version of Core are you using? 4.2 and newer made several improvements to downtime. Upgrade instructions at https://assets.nagios.com/downloads/nag ... ading.html. Also, there are important security updates, so if you aren't running the latest, I would highly suggest upgrading.soamz wrote: But stuck at the notification downtime thing.
Please let us know if that does not resolve your issue.
Re: Nagios questions - down duration and multiple email noti
Im using
Nagios® Core™
Version 4.1.1
Upgrading it, breaks my Nagios.
Nagios® Core™
Version 4.1.1
Upgrading it, breaks my Nagios.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios questions - down duration and multiple email noti
Well, that's no good! How does it break? Did you compile from source or install from distribution repos?
Also, I just want to clarify, the issue you were having in your first post in this thread is fixed. The downtime thing is a new issue, right? I just want to be sure if anyone else jumps in that they are looking at the correct issue (and of course that I am too!).
Also, I just want to clarify, the issue you were having in your first post in this thread is fixed. The downtime thing is a new issue, right? I just want to be sure if anyone else jumps in that they are looking at the correct issue (and of course that I am too!).