Server reboot notification.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pacmag
Posts: 12
Joined: Wed Dec 11, 2013 6:39 pm

Re: Server reboot notification.

Post by pacmag »

Ok,

I've configured the reboot notification using system uptime service. I've created a new user for this notification that receives only critical alerts i.e. we will be receiving only one alert while the server reboots. Or when the server uptime is less than 1 minutes then it says system rebooted.

As I mentioned in the earlier post, we are using linux-snmp wizard. I've managed to edit the wizard so now it lists the options for uptime too which is good.

While running wizard we are selecting a group to receive notification for the host/services. Once the wizard finishes when I try to edit the notifications settings from Home Page >> Search for Host >> uptime service >>Configure >>Re-configure this service >>Notification. By default its selecting the group but I want to notify the custom user created for reboot alert. It allows me to de-select the group and add the user for notification but in fact the change doesn't come in effect instead it revert back to the group for some reason. But If I do via CCM >> service it saves the settings I made.

Another question:
After I made changes in notification from the CCM for uptime service to alert the user. Its still alerting the group for some reason. please see below for the host and service settings from console.

Host Settings:

define host {
host_name atp-elvprocess3.<our domain>
use xiwizard_linuxsnmp_host
address 10.26.240.117
hostgroups linux-servers
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contact_groups ServerTeam
notification_interval 60
notification_period xi_timeperiod_24x7
icon_image snmppenguin.png
statusmap_image snmppenguin.png
_xiwizard linuxsnmp
register 1
}


Service settings:

define service {
host_name atp-elvprocess3.<our domain>
service_description uptime
use Check_Host_Uptime_Linux
check_command check_snmp_uptime_linux!!!!!!!!
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts dlitserverteam
_xiwizard linuxsnmp
register 1

I mean its still sending emails to ServerTeam which it didn't suppose to. All i want is receive notification in dlitserverteam only.

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

Re: Server reboot notification.

Post by lmiltchev »

What is the Nagios XI version, that you are currently using? We've fixed a couple of bugs, related to "Configure->Re-configure->Notifications" in 2.8+.
I mean its still sending emails to ServerTeam which it didn't suppose to. All i want is receive notification in dlitserverteam only.
Is the alert that you are receiving a "host" or a "service" alert? The "ServerTeam" contactgroup has been assigned to this host... Can you show us the actual alert that you received?
Be sure to check out our Knowledgebase for helpful articles and solutions!
pacmag
Posts: 12
Joined: Wed Dec 11, 2013 6:39 pm

Re: Server reboot notification.

Post by pacmag »

lmiltchev wrote:What is the Nagios XI version, that you are currently using? We've fixed a couple of bugs, related to "Configure->Re-configure->Notifications" in 2.8+.
We are currently using the latest available version:
Latest Available Version: 2012R2.9
Installed Version: 2012R2.9



I mean its still sending emails to ServerTeam which it didn't suppose to. All i want is receive notification in dlitserverteam only.
Is the alert that you are receiving a "host" or a "service" alert? The "ServerTeam" contactgroup has been assigned to this host... Can you show us the actual alert that you received?
Below is the list of emails we are getting:

1st message received by "ServerTeam" contactgroup ::


***** Nagios XI Alert *****

Nagios has detected a problem with this service.

Notification Type: PROBLEM

Service: Uptime
Host: atp-elvprocess3
Address: 10.26.240.213
State: CRITICAL
Info:
System Rebooted at Tue Feb 25 09:49:34 2014
Date/Time: 2014-02-25 09:49:40


2nd message received by 'dlitserverteam' contact:

***** Monitoring System Alert *****

Nagios has detected a problem with this service.

Notification Type: System Reboot

Service: Uptime
Host: atp-elvprocess3
Address: 10.26.240.213
State: Rebooted
Info: System Rebooted at Tue Feb 25 09:49:34 2014
Date/Time: 2014-02-25 09:49:40


3rd message received by "ServerTeam" contactgroup

***** Nagios XI Alert *****

Nagios has detected this service has recovered.

Notification Type: RECOVERY

Service: Uptime
Host: atp-elvprocess3
Address: 10.26.240.213
State: OK
Info:
System hasnt rebooted for 2 minutes
Date/Time: 2014-02-25 09:50:41


I wanted to receive the second message only, as you can see I've customized the message pattern for the user and only critical alert has been enabled with this user just to receive reboot notification.

Let me know if you need any more info
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Server reboot notification.

Post by sreinhardt »

To remove the third(recovery) message, you will want to remove these services from sending recovery messages, and likely only send critical. Just leave only the critical check box checked.

As for the first one, is this service set to notify any other contacts or contact groups in its definitions? I see that the only difference being the info area. Also is this contact set as a contact for the host? It is entirely possible that you are getting duplicate notifications if that is the case, although we should be able to work around that.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
pacmag
Posts: 12
Joined: Wed Dec 11, 2013 6:39 pm

Re: Server reboot notification.

Post by pacmag »

Thanks for your reply,

As you can see in my previous posts, the service notification contact is defined as contactname not the contact group. So how is it sending to the group? that's my question.

I know the host notification is going to the group but for this particular service I've modified the contact to send notification to the contact name. Looks like its picking from somewhere else.

Could you please investigate ?

Let me know if more info required.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Server reboot notification.

Post by sreinhardt »

If the group, is listed as a contact for the host, it is expected behavior, that they would receive notifications for the service issues as well. Any host contact is considered an admin of that host and will get all service notifications as well, regardless if they are configured specifically for the services or not.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Server reboot notification.

Post by WillemDH »

Please note that host contacts and contact groups are only inherited by a service when that service has no contacts or contactgroups defined.

See http://support.nagios.com/forum/viewtop ... ce+contact for more information or like Andy Brist said:
Contacts on a host will *always* be contacts for that host's services except when a contact is defined on the service object itself.
Grtz
Nagios XI 5.8.1
https://outsideit.net
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Server reboot notification.

Post by lmiltchev »

OK, let's step back and clarify something. You have the service defined as:
define service {
host_name atp-elvprocess3.<our domain>
service_description uptime
use Check_Host_Uptime_Linux
check_command check_snmp_uptime_linux!!!!!!!!
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts dlitserverteam
_xiwizard linuxsnmp
register 1
The alert is for "Uptime", not "uptime" (which is different):
***** Nagios XI Alert *****

Nagios has detected a problem with this service.

Notification Type: PROBLEM

Service: Uptime
Host: atp-elvprocess3
Address: 10.26.240.213
State: CRITICAL
Info:
System Rebooted at Tue Feb 25 09:49:34 2014
Date/Time: 2014-02-25 09:49:40
Just want to verify if this is a typo or you have two different services: "uptime" and "Uptime". The Nagios XI alert *should* display the service name exactly as it is defined... Also, "atp-elvprocess3.<our domain>" is not the same as "atp-elvprocess3"... Can you clarify?
Be sure to check out our Knowledgebase for helpful articles and solutions!
pacmag
Posts: 12
Joined: Wed Dec 11, 2013 6:39 pm

Re: Server reboot notification.

Post by pacmag »

lmiltchev wrote:OK, let's step back and clarify something. You have the service defined as:
define service {
host_name atp-elvprocess3.<our domain>
service_description uptime
use Check_Host_Uptime_Linux
check_command check_snmp_uptime_linux!!!!!!!!
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts dlitserverteam
_xiwizard linuxsnmp
register 1
The alert is for "Uptime", not "uptime" (which is different):
***** Nagios XI Alert *****

Nagios has detected a problem with this service.

Notification Type: PROBLEM

Service: Uptime
Host: atp-elvprocess3
Address: 10.26.240.213
State: CRITICAL
Info:
System Rebooted at Tue Feb 25 09:49:34 2014
Date/Time: 2014-02-25 09:49:40
Just want to verify if this is a typo or you have two different services: "uptime" and "Uptime". The Nagios XI alert *should* display the service name exactly as it is defined... Also, "atp-elvprocess3.<our domain>" is not the same as "atp-elvprocess3"... Can you clarify?
Sorry for the confusion:
Its just a typo:

define service {
host_name atp-elvprocess3.<our domain>
service_description uptime
use Check_Host_Uptime_Linux
check_command check_snmp_uptime_linux!!!!!!!!
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts dlitserverteam
_xiwizard linuxsnmp
register 1
}

Its lowercase 'uptime'. And we got all hosts defined as fully qualified domains i..e <hostname>.<ourdomain> just wanted to hide the domain name that's all.

let me know if you need more info.
pacmag
Posts: 12
Joined: Wed Dec 11, 2013 6:39 pm

Re: Server reboot notification.

Post by pacmag »

WillemDH wrote:Please note that host contacts and contact groups are only inherited by a service when that service has no contacts or contactgroups defined.

See http://support.nagios.com/forum/viewtop ... ce+contact for more information or like Andy Brist said:
Contacts on a host will *always* be contacts for that host's services except when a contact is defined on the service object itself.
Grtz
That's my point, if I have defined the contactname for the service explicitly why is it still spamming to the host contact group??, If it is inherited from the host, what's the point of creating service specific contacts?
Locked