Page 1 of 4
Email is not getting generated for some cases
Posted: Thu Apr 11, 2019 5:16 am
by amitgupta19
I have Nagios Core 4.0 and setup the email to be triggered for all the Problems.
But some cases, i find that Nagios does not generate the EMAIl.
For Example for the UP Time of one server, when it was rebooted it should have sent an email. But it did not generate the email.
Can any one please help me?
Re: Email is not getting generated for some cases
Posted: Thu Apr 11, 2019 3:18 pm
by scottwilkerson
Do you see it in the notifications report?
What are the config setting for the host/service that isn't sending these?
Re: Email is not getting generated for some cases
Posted: Fri Apr 12, 2019 5:54 am
by amitgupta19
It is not in the notifications report.
When i see the configuration report it is defined to send the Alert Notification , also screenshot attached for your referrence.
When i see the trends for that service it shows the critical but no alert generated during that time.
Re: Email is not getting generated for some cases
Posted: Fri Apr 12, 2019 8:45 am
by scottwilkerson
Can you also show the state history where this service went into a hard state?
Re: Email is not getting generated for some cases
Posted: Fri Apr 12, 2019 11:56 am
by amitgupta19
I checked that it didn't went into the Hard State.
But it is the UPTime of the server and i have set it to be critical for Uptime less than 3 Hours.
So it should have been gone into the Hard state. Any reason why?
Re: Email is not getting generated for some cases
Posted: Fri Apr 12, 2019 12:57 pm
by scottwilkerson
amitgupta19 wrote:I checked that it didn't went into the Hard State.
But it is the UPTime of the server and i have set it to be critical for Uptime less than 3 Hours.
So it should have been gone into the Hard state. Any reason why?
This depends on the settings in the configuration file for the service, how often it is checked and what is the retry interval.
Re: Email is not getting generated for some cases
Posted: Mon Apr 15, 2019 5:07 am
by amitgupta19
Following is the definition of the UPTIME Service
define service {
name windows-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 2 ; Re-check the service up to 3 times in order to determine its final (hard) state
check_interval 2 ; Check the service every 10 minutes under normal conditions
retry_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contacts events-monitor ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 0 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
define service{
host_name
service_description UPTIME
use windows-service
notifications_enabled 1
check_command check_nt!UPTIME!-l hours -c 2
hostgroup_name windows-servers
}
Re: Email is not getting generated for some cases
Posted: Mon Apr 15, 2019 5:10 am
by amitgupta19
Attaching the Definition of the service in the text file.
Re: Email is not getting generated for some cases
Posted: Mon Apr 15, 2019 7:14 am
by scottwilkerson
Can you show the alert summary report for this service?
Re: Email is not getting generated for some cases
Posted: Mon Apr 15, 2019 11:30 am
by amitgupta19
Please find attached...