Nagios questions - down duration and multiple email notify

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
soamz
Posts: 42
Joined: Sat May 07, 2016 8:29 am

Nagios questions - down duration and multiple email notify

Post by soamz »

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 ?
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Nagios questions - down duration and multiple email noti

Post by rhassing »

For the multiple mail addresses you can use contactgroups.

A contactgroup can maintain multiple contacts.
Rob Hassing
Image
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Nagios questions - down duration and multiple email noti

Post by mcapra »

soamz wrote:In the notification emails, I need it to show the duration also.
You may find the $SERVICEDURATION$ and $HOSTDURATION$ macros useful:
https://assets.nagios.com/downloads/nag ... ceduration
https://assets.nagios.com/downloads/nag ... stduration
soamz wrote:I need to send the nagios notifications to multiple emails, like 2 emails right now.
As @rhassing indicated, contactgroups are the perfect candidate for this:
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/
soamz
Posts: 42
Joined: Sat May 07, 2016 8:29 am

Re: Nagios questions - down duration and multiple email noti

Post by soamz »

Awesome thanks.

So, better to use both service and host then ?

I see both have the vars.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios questions - down duration and multiple email noti

Post by rkennedy »

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
soamz
Posts: 42
Joined: Sat May 07, 2016 8:29 am

Re: Nagios questions - down duration and multiple email noti

Post by soamz »

email thing is done already
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

Post by dwhitfield »

soamz wrote: But stuck at the notification downtime thing.
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.

Please let us know if that does not resolve your issue.
soamz
Posts: 42
Joined: Sat May 07, 2016 8:29 am

Re: Nagios questions - down duration and multiple email noti

Post by soamz »

Im using
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

Post by dwhitfield »

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!).
Locked