Hi,
I sent you the backup in PM. please check and let me know.
Thanks.
down hosts clean up
Re: down hosts clean up
Hi
The file was not attached to the PM. Please resend.
Thanks
The file was not attached to the PM. Please resend.
Thanks
Re: down hosts clean up
Hi,
We are going to delete those "phantom" entries out of the database.
First we need to take a System Backup to preserve the current state of the databases.
Go to the Admin page, pick "Local Backup Archives" from the left-hand menu under 'System Backups' and then hit
the "Create Backup" button. Next on a command line on the server:
Thanks
We are going to delete those "phantom" entries out of the database.
First we need to take a System Backup to preserve the current state of the databases.
Go to the Admin page, pick "Local Backup Archives" from the left-hand menu under 'System Backups' and then hit
the "Create Backup" button. Next on a command line on the server:
Code: Select all
mysql -u root -p nagios
<enter password when prompted, default = 'nagiosxi'>
delete from nagios_hoststatus where status_update_time < (SELECT STR_TO_DATE('2021-02-25 00:00:01','%Y-%m-%d %H:%i:%s'));
commit;You do not have the required permissions to view the files attached to this post.
Re: down hosts clean up
Hi,
could you please explain what exactly this delete statement will do?
I see that some host with OK status are included in this delete.
thanks.
could you please explain what exactly this delete statement will do?
I see that some host with OK status are included in this delete.
thanks.
Re: down hosts clean up
Hi,
I amended the statement
Now it will delete every entry that hasn't been updated since 24 FEB and a status like 'CRITICAL....."
Seems like we will have some with STATUS = OK and not updated since 24 FEB, but we can examine them after
you run the delete.
Thanks
I amended the statement
Code: Select all
mysql -u root -p nagios
<enter password when prompted, default = 'nagiosxi'>
delete from nagios_hoststatus where status_update_time < (SELECT STR_TO_DATE('2021-02-25 00:00:01','%Y-%m-%d %H:%i:%s'))
AND output like 'CRITICAL%';
commit;Seems like we will have some with STATUS = OK and not updated since 24 FEB, but we can examine them after
you run the delete.
Thanks
Re: down hosts clean up
Hi,
Sounds good now. I will keep monitoring.
Thanks.
Sounds good now. I will keep monitoring.
Thanks.
You do not have the required permissions to view the files attached to this post.
Re: down hosts clean up
Hi,
Great! I am going to lock this thread for now. But
please reach out if you have more issues.
Thanks
Great! I am going to lock this thread for now. But
please reach out if you have more issues.
Thanks