Email is not getting generated for some cases

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.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Email is not getting generated for some cases

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email is not getting generated for some cases

Post by scottwilkerson »

Do you see it in the notifications report?

What are the config setting for the host/service that isn't sending these?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Email is not getting generated for some cases

Post 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.
Attachments
UPTIME-Server.JPG
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email is not getting generated for some cases

Post by scottwilkerson »

Can you also show the state history where this service went into a hard state?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Email is not getting generated for some cases

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email is not getting generated for some cases

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Email is not getting generated for some cases

Post 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
}
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Email is not getting generated for some cases

Post by amitgupta19 »

Attaching the Definition of the service in the text file.
Attachments
UPTIME Definition.txt
(2.78 KiB) Downloaded 166 times
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email is not getting generated for some cases

Post by scottwilkerson »

Can you show the alert summary report for this service?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Email is not getting generated for some cases

Post by amitgupta19 »

Please find attached...
Attachments
Alert-History-UPTIME.jpg
Locked