Not able to receive alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

I can receive the test message, i configured the services to check for every 15 mins and 0 notification interval, but am receiving them for every 1hr 15 mins
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

ISSB_MAOST wrote:but am receiving them for every 1hr 15 mins
Ok so you are receiving them.

Can you show the configuration file for one of these hosts/services?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

define service {
host_name Host_name
service_description / Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 15% -c 10% -p /boot'!!!!!!
initial_state o
max_check_attempts 1
check_interval 15
retry_interval 1
active_checks_enabled 1
check_period xi_timeperiod_24x7
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,
notifications_enabled 1
contacts hadoopadmin,nagiosadmin
_xiwizard linux-server
register 1
}

define service {
host_name Host_name
service_description /boot Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 15% -c 10% -p /boot'!!!!!!
initial_state o
max_check_attempts 1
check_interval 15
retry_interval 1
active_checks_enabled 1
check_period xi_timeperiod_24x7
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,
notifications_enabled 1
contacts hadoopadmin,nagiosadmin
_xiwizard linux-server
register 1
}

define service {
host_name HOst_name
service_description /dev/shm Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 15% -c 10% -p /dev/shm'!!!!!!
max_check_attempts 1
check_interval 15
retry_interval 1
active_checks_enabled 1
check_period xi_timeperiod_24x7
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,
contacts hadoopadmin,nagiosadmin
_xiwizard linux-server
register 1
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

I don't see the following like you mentioned

Code: Select all

notification_interval    0
This would then use the default notification interval which is 60 minutes (+ your 15 minute check interval) which is why you are getting notification every 1hr 15 mins
notification_interval: This directive is used to define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. If you set this value to 0, Nagios will not re-notify contacts about problems for this host - only one problem notification will be sent out.
https://assets.nagios.com/downloads/nag ... tions.html

as a note, an empty value is different than 0
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

so if i want to receive notifications for every 15 minutes and if i don't need any notification interval how can i set that?
I set notification_interval 1 so that i can receive alerts for every 16 minutes but when i run re-configure script am seeing these type of errors.

Warning: Service 'Users' on host 'Host_name' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'java' on host 'Host_name' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.


so, how to avoid those warnings.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

These are just warnings and not errors (letting you know you aren't going to receive a notification every minute if the check_interval is 15 minutes), but you could set this

Code: Select all

notification_interval    15
It will send a notification if if the last notification was more that 15 minutes ago.

being notifications are only sent when a check happens, and your check_interval is every 15 minutes you would receive a notification every check if it is in a non-OK state
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Not able to receive alerts

Post by ITOMB_IMT »

I have set the following

define service {
host_name host_name
service_description /boot Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 15% -c 10% -p /boot'!!!!!!
initial_state o
max_check_attempts 1
check_interval 15
retry_interval 1
active_checks_enabled 1
check_period xi_timeperiod_24x7
notification_interval 15
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,
notifications_enabled 1
contacts hadoopadmin,nagiosadmin
_xiwizard linux-server
register 1
}

and i received alerts as below

2019-06-05 13:38:47 host_name /boot Disk Usage Service Problem No WARNING nagiosadmin Nagios XI DISK WARNING - free space: /boot 28 MB (11.57% inode=99%):
2019-06-05 13:08:49 host_name /boot Disk Usage Service Problem No WARNING nagiosadmin Nagios XI DISK WARNING - free space: /boot 28 MB (11.57% inode=99%):
2019-06-05 12:38:53 host_name /boot Disk UsageService Problem No WARNING nagiosadmin Nagios XI DISK WARNING - free space: /boot 28 MB (11.57% inode=99%):
2019-06-04 15:41:24 host_name /boot Disk Usage Service Problem No WARNING nagiosadmin Nagios XI DISK WARNING - free space: /boot 28 MB (11.57% inode=99%):

so i am receiving alerts for every 30 mins, how can i set to receive alerts for every 15 minutes?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to receive alerts

Post by scottwilkerson »

You either need to check more frequently by changing the check_interval

Code: Select all

check_interval 5
or, just be ok with the warning (it is just a notification not an error) and change the notification_interval to something less than the check interval

Code: Select all

notification_interval 14
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked