Need Immediate Email Notifications

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.
praveen.ks
Posts: 41
Joined: Wed May 29, 2013 5:35 pm

Need Immediate Email Notifications

Post by praveen.ks »

I need immediate email notifications, how to change that interval time ......

When some host is down or any other issue, i need immediate notification
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need Immediate Email Notifications

Post by slansing »

You would need to change your max_check_attempts to 1:
max_check_attempts: This directive is used to define the number of times that Nagios will retry the service check command if it returns any state other than an OK state. Setting this value to 1 will cause Nagios to generate an alert without retrying the service check again.
And you may in turn, want to change your retry_interval as well:
retry_interval: This directive is used to define the number of "time units" to wait before scheduling a re-check of the service. Services are rescheduled at the retry interval when they have changed to a non-OK state. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" rate as defined by the check_interval value. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. More information on this value can be found in the check scheduling documentation.
praveen.ks
Posts: 41
Joined: Wed May 29, 2013 5:35 pm

Re: Need Immediate Email Notifications

Post by praveen.ks »

In which file i need to edit this.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need Immediate Email Notifications

Post by slansing »

You would need to change this in the service or host.cfg files which you want to alter. On a Centos/Rhel installation the path should be:

Code: Select all

/usr/local/nagios/etc/<"services/hosts">/<"service/host name.cfg">
praveen.ks
Posts: 41
Joined: Wed May 29, 2013 5:35 pm

Re: Need Immediate Email Notifications

Post by praveen.ks »

Am not able to find that file in Centos 5.6
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need Immediate Email Notifications

Post by slansing »

That is the path to the configuration files of your hosts and services.

It seems like you may want to do a bit of reading on Object definitions as all of the questions you have had were answered through these pages here:

http://nagios.sourceforge.net/docs/3_0/ ... tions.html
praveen.ks
Posts: 41
Joined: Wed May 29, 2013 5:35 pm

NAGIOS ALERT NOT WORKING

Post by praveen.ks »

I Changed email id in contacts.cfg in contacts, but am not getting any mail notification

Please help me
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need Immediate Email Notifications

Post by lmiltchev »

Did you add the contact to the host/service you need to be notified about?
Be sure to check out our Knowledgebase for helpful articles and solutions!
praveen.ks
Posts: 41
Joined: Wed May 29, 2013 5:35 pm

Re: Need Immediate Email Notifications

Post by praveen.ks »

i added email id in Contacts file

define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user

email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}


and i added printer host in printer.cfg file. i added multiple printer

sometime i will get notification for some printer and if sometime I'll not get notification even the host is down also.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Need Immediate Email Notifications

Post by abrist »

Is the host in a HARD down state, or just a soft? Was it flapping?
Check your mail logs:

Code: Select all

tail -25 /var/log/maillog
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked