statusengine / worker

PHP worker process that writes all event data to a storage backend
https://statusengine.org/worker/#overview
GNU General Public License v3.0
9 stars 8 forks source link

Space utilization #32

Closed thale13 closed 2 years ago

thale13 commented 3 years ago

Forgive me if this isn't the right project. I'm wondering if there are any recommendations for tracking and controlling space utilization. We monitor on the order of 1000 hosts and I've filled up and had to extend my mysqldb filesystem several times now. Currently its >130g.

Are they any tuning parameters or capacity planning ideas that I can do (other than just monitor the filesystem space itself)? I'm not averse to having a lot of space, just want to understand what I'm allocating and where its going.

nook24 commented 3 years ago

First of all you should check which tables are the big ones. My guesses are statusengine_perfdata, statusengine_hostchecks and statusengine_servicechecks.

You can use phpMyAdmin to get the size of all tables quite nice.

In case of the host- and servicechecks tables you should check if the database cleanup cronjob is running and reduce the storage time of those tables. https://statusengine.org/worker/#cleanup-database Normally nobody cares about this data for more than 5 days

If you store performancedata (metrics for charts) in mysql you should think of migrating over to Graphite, Elasticsearch or CrateDB. MySQL has no compression for such data and so the tables get really big at some point. https://statusengine.org/getting_started/#performance-data