Disable flapping on service
Disable flapping on service
I have several services that are monitoring a MSSQL database using a Powershell script. Everything works great except I have noticed some notifications don't get dispatched because of flapping being enabled. I have set the Flapping Enabled to Off but I still am seeing this on the service and no notification gets sent out.
Here is the message and settings I am currently using. This check is monitoring logs so flapping is not needed.
Here is the message and settings I am currently using. This check is monitoring logs so flapping is not needed.
You do not have the required permissions to view the files attached to this post.
-
kyang
Re: Disable flapping on service
I just have to double check. Whether you set flapping to on or off, you are not receiving notifications?Everything works great except I have noticed some notifications don't get dispatched because of flapping being enabled. I have set the Flapping Enabled to Off but I still am seeing this on the service and no notification gets sent out.
But overall, you would still like to get notifications? In which it is not sending notifications? Is this right, or did I misunderstand something?This check is monitoring logs so flapping is not needed
Have you tried using skip?
What version of Nagios XI do you have?
Re: Disable flapping on service
Sorry, Nagios XI 5.4.11 is what I am running.
I have not tried skip but will give that a try. I do want notification but Nagios is seeing the service flapping and doesn't send out the notifications. I want to disable that feature so notifications get sent for the critical state of the service.
I have flapping enable set to off and do not receive the notifications due to Nagios seeing the service flapping so it suppresses them.
I have not tried skip but will give that a try. I do want notification but Nagios is seeing the service flapping and doesn't send out the notifications. I want to disable that feature so notifications get sent for the critical state of the service.
I have flapping enable set to off and do not receive the notifications due to Nagios seeing the service flapping so it suppresses them.
-
kyang
Re: Disable flapping on service
Let me know how skip works, and I see what you mean.
What are your alert settings?
Here's something I found on the Nagios Core Github.
https://github.com/NagiosEnterprises/na ... /issues/91
What are your alert settings?
Here's something I found on the Nagios Core Github.
https://github.com/NagiosEnterprises/na ... /issues/91
Re: Disable flapping on service
I don't have flapping enabled in my notification. Will that still send out notification when the service gets marked as flapping by Nagios XI?
You do not have the required permissions to view the files attached to this post.
Re: Disable flapping on service
Let's review the flapping options under the Check/Alert Settings tabs, and see what they really mean.
Check Settings tab
https://assets.nagios.com/downloads/nag ... pping.html
You were correct to disable flap detection under the Check Settings tab on the local level (your first screenshot). What we need to find out is whether the service is still in a "flapping state" or it recovered. Are you still seeing "Service is flapping between states" under the "Service Status Detail" page (Overview tab)? What is the value of the "is_flapping" directive for this service in the status.dat file? What is the "flap_detection_enabled" value? Does nagios "think" the flap detection is still enabled, even though you disabled it in the GUI? What is the value of the "flap_detection_enabled" for this service in the objects.cache?
Note: As far as the "skip" option, it only means that you are not defining the option directly (on the service level), but you are inheriting it from a template.
Alert Settings tab
Check Settings tab
For more info, see our official Nagios Core documentation on the topic here:Service - flap detection enabled
This directive is used to determine whether or not flap detection is enabled for this service. More information on flap detection can be found in the nagios documentation. Values: 0 = disable service flap detection, 1 = enable service flap detection.
Parameter name: flap_detection_enabled
https://assets.nagios.com/downloads/nag ... pping.html
You were correct to disable flap detection under the Check Settings tab on the local level (your first screenshot). What we need to find out is whether the service is still in a "flapping state" or it recovered. Are you still seeing "Service is flapping between states" under the "Service Status Detail" page (Overview tab)? What is the value of the "is_flapping" directive for this service in the status.dat file? What is the "flap_detection_enabled" value? Does nagios "think" the flap detection is still enabled, even though you disabled it in the GUI? What is the value of the "flap_detection_enabled" for this service in the objects.cache?
Note: As far as the "skip" option, it only means that you are not defining the option directly (on the service level), but you are inheriting it from a template.
Alert Settings tab
In your last screenshot we see that you have selected only "Critical" under the "Notification options". This means that notifications will be sent out ONLY on a CRITICAL state. You can deselect the "Critical" if you wish to receive notifications about all states, or select "Flapping" (in addition to "Critical") if you wish to receive notifications about Critial and Flapping states.Service - notification options
This directive is used to determine when notifications for the service should be sent out. Valid options are a combination of one or more of the following:
w = send notifications on a WARNING state,
u = send notifications on an UNKNOWN state,
c = send notifications on a CRITICAL state,
r = send notifications on recoveries (OK state),
f = send notifications when the service starts and stops flapping, and
s = send notifications when scheduled downtime starts and ends.
If you do not specify any notification options, Nagios will assume that you want notifications to be sent out for all possible states.
Example: If you specify w,r in this field, notifications will only be sent out when the service goes into a WARNING state and when it recovers from a WARNING state.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Disable flapping on service
You were correct to disable flap detection under the Check Settings tab on the local level (your first screenshot). What we need to find out is whether the service is still in a "flapping state" or it recovered. Are you still seeing "Service is flapping between states" under the "Service Status Detail" page (Overview tab)? What is the value of the "is_flapping" directive for this service in the status.dat file? What is the "flap_detection_enabled" value? Does nagios "think" the flap detection is still enabled, even though you disabled it in the GUI? What is the value of the "flap_detection_enabled" for this service in the objects.cache?
YesAre you still seeing "Service is flapping between states" under the "Service Status Detail" page (Overview tab)?
Where do I find this file?What is the value of the "is_flapping" directive for this service in the status.dat file?
Here it the config file for one of the services. I have about 20 of these but all are identical minus the check command syntax.
define service {
host_name DGTLMON1P
service_description Digital Policy Service
check_command check_nrpe_digital_db_monitor!"5"!"5"!"5"!"DigitalLogNagios"!"password"!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
flap_detection_enabled 0
notification_interval 60
notification_period xi_timeperiod_24x7
notification_options c,
contact_groups digital_monitoring_database_monitoring
register 1
}
Re: Disable flapping on service
The status.dat and objects.cache files are located in the "/usr/local/nagios/var/" directory, unless you changed that. For example, if you are utilizing a ramdisk, they could be in the "/var/nagiosramdisk/" directory.
As long as the service is still flapping, notifications won't go out. You have two options as I see it:
1. Wait until the service recover from the flapping state "on its own"
2. Force the recovery manually.
- Stop nagios service
- Open the "/usr/local/nagios/var/retention.dat" in a text editor, find the service in question, and change this:
to this:
Save and exit.
- Start nagios service
This should clear the flapping state.
FYI: The status.dat file is uses to store the current status, comment, and downtime information. It is deleted every time Nagios stops and recreated when it starts. You could check the flapping status of your service before performing step 2 (stopping nagios service), and after you are done (after starting nagios service). The state should change from "is_flapping=1" to "is_flapping=0".
As long as the service is still flapping, notifications won't go out. You have two options as I see it:
1. Wait until the service recover from the flapping state "on its own"
2. Force the recovery manually.
- Stop nagios service
Code: Select all
service nagios stopCode: Select all
is_flapping=1Code: Select all
is_flapping=0- Start nagios service
Code: Select all
service nagios startFYI: The status.dat file is uses to store the current status, comment, and downtime information. It is deleted every time Nagios stops and recreated when it starts. You could check the flapping status of your service before performing step 2 (stopping nagios service), and after you are done (after starting nagios service). The state should change from "is_flapping=1" to "is_flapping=0".
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Disable flapping on service
So far things are looking better. I just got word back from the Business Unit and that is what they reported.
You can close this for now and if it reappears I'll open up a new thread.
You can close this for now and if it reappears I'll open up a new thread.
-
kyang
Re: Disable flapping on service
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!