Send a notification only once
Send a notification only once
Using Nagios XI. I have a service that I want to send one alert only. I have tried setting the notification interval to 0 (as suggested by a 2012 post) but it still sends an alert every 10 minutes. Any suggestions on how to make this happen? Thanks for any help -- Tom
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Send a notification only once
Do you have any escalations? Did you apply the configuration after setting it to 0? Please attach your objects.cache file which you can find with the command find / -name objects.cache. The likely location is /usr/local/nagios/var/objects.cache. You won't be able to PM it as this is your first post. If you'd like you can just post again saying "I'd like to PM" and then we can approve that and then you would be able to PM it.
UPDATE: objects.cache shared with techs
UPDATE: objects.cache shared with techs
Re: Send a notification only once
There are no escalations
I did apply configuration after the change.
I'd like to PM so I can send the file. please approve. thanks -- tom
I did apply configuration after the change.
I'd like to PM so I can send the file. please approve. thanks -- tom
Re: Send a notification only once
Is this the service you are talking about?
Could you also run the database repair script.
Thanks.
Code: Select all
define service {
host_name dmedap1001.jmlfdc.mil
service_description TEST Check JMAR L Drive
display_name TEST Check JMAR L Drive
check_period 24x7
check_command check_nrpe_PRODUCTION!check_drivesize! -a drive=L: 'warning=free<90%' 'critical=free<85%'!!!!!!
contacts xxxxx
notification_period xxxx_notification_times
initial_state o
importance 0
check_interval 10.000000
retry_interval 1.000000
max_check_attempts 1
is_volatile 1
parallelize_check 1
active_checks_enabled 1
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options o,w,u,c
freshness_threshold 0
check_freshness 1
notification_options r,w,u,c,f,s
notifications_enabled 1
notification_interval 0.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
}
Code: Select all
cd /usr/local/nagiosxi/scripts/
./repair_databases.sh
Re: Send a notification only once
Yes, that is the service. I'll have the DB repair script run shortly. I'll let you know once I run it. Thanks
Re: Send a notification only once
repair script has been run and completed successfully. What would you like me to try next? The alert i still sending every 10 minutes. Should I resave the service config and apply config again? Thanks -- tc
Re: Send a notification only once
Thanks!
Let's truncate some tables next.
After that, you can repair the db again.
Let's truncate some tables next.
Code: Select all
mysql -u ndoutils -pn@gweb nagiosxi -e 'TRUNCATE TABLE xi_meta'
mysql -u ndoutils -pn@gweb nagiosxi -e 'TRUNCATE TABLE xi_events'
mysql -u ndoutils -pn@gweb nagiosxi -e 'TRUNCATE TABLE xi_eventqueue
Code: Select all
cd /usr/local/nagiosxi/scripts/
./repair_databases.sh
Re: Send a notification only once
Just got back to this. We ran the truncate commands and the refresh and the service continues to send multiple notifications. What's next? Thanks -- Tom
Re: Send a notification only once
Can you post or PM the output of this command. Thanks.
If you see multiple nagios processes or not, please run kill the nagios process with these commands.
Then let us know if notifications are correct.
Code: Select all
ps -ef | head -1 && ps -ef | grep bin/nagios
Code: Select all
service nagios stop
killall -9 nagios
service nagios start
Re: Send a notification only once
Thanks very much for your help. I appreciate the timely responses.
We have resolved the problem and believe that the problem was caused by host/service/notification template inconsistencies. When we created a new service that did not use any templates with hosts and contacts that also did not use templates the single notification started working (i love this technical smoke and mirrors stuff )
Thanks again for your help -- Tom
We have resolved the problem and believe that the problem was caused by host/service/notification template inconsistencies. When we created a new service that did not use any templates with hosts and contacts that also did not use templates the single notification started working (i love this technical smoke and mirrors stuff )
Thanks again for your help -- Tom