Dear Expert
Wishing you all HAPPY NEW YEAR and all the best during these days.
Nagios Server was up and running however some reachability issue occurred (assume main Gateway Router/Switch) was down.
Now when Nagios came UP its started sending old accumulated pending Notification in bulk, how to clear those from Nagios server?
Regards
how to clear pending Notification
Re: how to clear pending Notification
If you login to the XI interface and go to the Admin > Email Settings menu and is the Mail Method is set to Sendmail, you would run the following as root to clear the message queue.
You will also, have to run the following in a root shell to stop, truncate old data and start the processes.
Depending if your server is hosting the nagiosxi database in MYSQL, you would run this.
If it is Postgress, run this
FYI, you can run them both if you are unsure, just one of the commands will generate an error and that is normal.
All of the old pending Notifications should be gone now.
Code: Select all
postsuper -d ALLYou will also, have to run the following in a root shell to stop, truncate old data and start the processes.
Code: Select all
service npcd stop
service nagios stop
service ndo2db stop
service crond stop
pkill -9 -u nagiosCode: Select all
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -u root -pnagiosxi nagiosxiCode: Select all
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | psql nagiosxi nagiosxiCode: Select all
mysqlcheck -f -r -u root -pnagiosxi --all-databases --use-frm
if grep --quiet pgsql /usr/local/nagiosxi/html/config.inc.php; then service postgresql stop; fi;
service mysqld restart
rm -f /usr/local/nagios/var/rw/nagios.cmd
rm -f /usr/local/nagios/var/nagios.lock
rm -f /var/run/nagios.lock
rm -f /usr/local/nagios/var/ndo.sock
rm -f /usr/local/nagios/var/ndo2db.lock
rm -f /var/lib/mrtg/mrtg_l
rm -f /usr/local/nagiosxi/var/*.lock
rm -f /usr/local/nagiosxi/tmp/*.lock
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
pkill python
if grep --quiet pgsql /usr/local/nagiosxi/html/config.inc.php; then service postgresql start; fi;
service httpd restart
service ndo2db start
service nagios start
service npcd start
service crond startBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: how to clear pending Notification
Thanks tgriep for detail reply,
NagiosXI having Feature to Enable/Disable NOTIFICATIONS, same way ...
i suggest to have WEB Feature to truncate/delete all pending Email/Notifications, easy and safe.
should have Feature Request....as we want better NagiosXI in future.
Regards
NagiosXI having Feature to Enable/Disable NOTIFICATIONS, same way ...
i suggest to have WEB Feature to truncate/delete all pending Email/Notifications, easy and safe.
should have Feature Request....as we want better NagiosXI in future.
Regards
Re: how to clear pending Notification
That is a good idea to add the ability to remove queued up notifications in the web interface.
I can submit a feature request on your behalf if you'd like. Please keep in mind that the decision to implement the enhancement is at the sole discretion of our development team.
I can submit a feature request on your behalf if you'd like. Please keep in mind that the decision to implement the enhancement is at the sole discretion of our development team.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: how to clear pending Notification
Yes tgriep
Please submit new Feature Request
everything should be on fingertip (here away only one/two mouse click)
regards
Please submit new Feature Request
everything should be on fingertip (here away only one/two mouse click)
regards
Re: how to clear pending Notification
A Feature Request has been put in for this.
Be sure to check out our Knowledgebase for helpful articles and solutions!