Page 1 of 2
Need Immediate Email Notifications
Posted: Mon Aug 12, 2013 2:24 pm
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
Re: Need Immediate Email Notifications
Posted: Mon Aug 12, 2013 2:46 pm
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.
Re: Need Immediate Email Notifications
Posted: Mon Aug 12, 2013 3:25 pm
by praveen.ks
In which file i need to edit this.
Re: Need Immediate Email Notifications
Posted: Mon Aug 12, 2013 3:31 pm
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">
Re: Need Immediate Email Notifications
Posted: Mon Aug 12, 2013 4:05 pm
by praveen.ks
Am not able to find that file in Centos 5.6
Re: Need Immediate Email Notifications
Posted: Mon Aug 12, 2013 4:09 pm
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
NAGIOS ALERT NOT WORKING
Posted: Mon Aug 12, 2013 7:19 pm
by praveen.ks
I Changed email id in contacts.cfg in contacts, but am not getting any mail notification
Please help me
Re: Need Immediate Email Notifications
Posted: Tue Aug 13, 2013 10:54 am
by lmiltchev
Did you add the contact to the host/service you need to be notified about?
Re: Need Immediate Email Notifications
Posted: Tue Aug 13, 2013 11:06 am
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.
Re: Need Immediate Email Notifications
Posted: Tue Aug 13, 2013 11:09 am
by abrist
Is the host in a HARD down state, or just a soft? Was it flapping?
Check your mail logs: