We have automated our nagios and every time some application or services is removed from the server, nagios removes all services , creates the new template and reloads.
(since we can't remove only particular services over the nagiosql_delete_service.php script).
The thing is, we have 11k checks. Removing all services (15 of them) from 5 different hosts takes a lot of time.
I noticed that the transfer speed is way too low:
Code: Select all
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'type=service&cmd=delete&id=15042' -O nagiosql.delete.service
--2016-10-06 08:29:16-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.delete.service’
[ <=> ] 101,592 34.5KB/s in 2.9s
2016-10-06 08:29:19 (34.5 KB/s) - ‘nagiosql.delete.service’ saved [101592]Is this an issue with the database? I have optimized mysql but it appears it has made no progress.
What is strange is the fact that this is sometimes very quick, and sometimes it takes 20 minutes to remove 10 hosts and add them again.
Is there something I'm missing? Should I remove some /tmp files before? Reload mysql? Re-index it?
It certainly has to do something with the size of the database as this works perfectly with 10-15 hosts.. Now when we have over 700 of them, the above issue is appearing
Any suggestion is welcomed.