Page 1 of 2
Remove acknowledgements and enable notifications
Posted: Mon Mar 04, 2019 10:03 am
by emartine
We keep getting "nagios failing to notify us" because individuals are supressing alerts by acknowledging them in some for or another. Is there a way to create a weekly purge of acknowlegements and enable notifications ?
Re: Remove acknowledgements and enable notifications
Posted: Mon Mar 04, 2019 3:19 pm
by npolovenko
Hello,
@emartine. One way to get rid of all acknowledgments is to delete the retention.dat file.
/usr/local/nagios/var/retention.dat
So you could create a simple shell script that removes this file and put it in a cron.
PS: Deleting the retention.dat file will also delete all scheduled downtime and comments.
Re: Remove acknowledgements and enable notifications
Posted: Mon Mar 04, 2019 4:41 pm
by emartine
Deleting the retention.dat file will also delete all scheduled downtime and comments.
Meaning if it is active now that it will remove currently active scheduled downtime? Or it will remove any future scheduled downtime windows?
Re: Remove acknowledgements and enable notifications
Posted: Mon Mar 04, 2019 4:45 pm
by npolovenko
@emartine, It will remove all existing downtime records, whether downtime was scheduled for now and already started or if it's scheduled for some time in the future.
Re: Remove acknowledgements and enable notifications
Posted: Tue Mar 05, 2019 10:10 am
by emartine
Is there a way to reimport those schedules in bulk?
Re: Remove acknowledgements and enable notifications
Posted: Tue Mar 05, 2019 3:17 pm
by npolovenko
@emartine, This sequence of commands worked for me do delete all acknowledgments without affecting scheduled downtime:
service nagios stop
sed -i "s/problem_has_been_acknowledged=1/problem_has_been_acknowledged=0/g" /usr/local/nagios/var/retention.dat
service nagios start
Please backup your XI before trying this.
Re: Remove acknowledgements and enable notifications
Posted: Fri Mar 15, 2019 2:52 pm
by emartine
This does remove the acknowledgements but doesn't seem to enable notifications.
Re: Remove acknowledgements and enable notifications
Posted: Fri Mar 15, 2019 3:02 pm
by npolovenko
@emartine, Can you run the same query with enable_notifications=1?
service nagios stop
sed -i "s/problem_has_been_acknowledged=1/problem_has_been_acknowledged=0/g" /usr/local/nagios/var/retention.dat
sed -i "s/enable_notifications=0/enable_notifications=1/g" /usr/local/nagios/var/retention.dat
service nagios start
Re: Remove acknowledgements and enable notifications
Posted: Fri Mar 15, 2019 3:34 pm
by emartine
I think you mean notifications_enabled=1 ?
Re: Remove acknowledgements and enable notifications
Posted: Fri Mar 15, 2019 4:25 pm
by emartine
I created a dashboard with a urldashlet
and although the page looks fine... when I have a report sent only the top part of the pdf is visible while the rest is blank.
Any idea why or what I can do to fix this?
The url dashlet I created was
https://servername/includes/components/ ... viceattr=4