icingaweb2-module-vspheredb icon indicating copy to clipboard operation
icingaweb2-module-vspheredb copied to clipboard

Add data retention period into server configuration

Open waja opened this issue 5 years ago • 2 comments

Expected Behavior

There should be a configurable data retention period for every vCenter. For the most cases it should not be needed to keep the data infinite.

Current Behavior

Actually the vsphere module is collecting data. With many events and/or vCenter systems the database will grow up quickly. While it is nice to have a look into the events it is not needed to keep them very long to for monitoring purpose itself. If anybody needs such an information later it can be extracted from vCenter logs itself.

Possible Solution

I would suggest to implement a configurable data retention period per vCenter via configuration option. While we still have a background process running, it would be great to kick a garbage collector at least once a day deleting data older then the configured retention periods.

Your Environment

  • Version/GIT-Hash of this module: 1.1.0
  • Icinga Web 2 version: 2.7.3
  • Operating System and version: Debian 10
  • Webserver, PHP versions: 2.4.38, 7.3.11

waja avatar Nov 13 '19 14:11 waja

Hello,

Using vspheredb for more than two years (FTW), I second this issue because I'm seeing my db growing, especially about the event history for which tons of history does not fit our needs:

ncdu 1.15.1 ~ Use the arrow keys to navigate, press ? for help
--- /var/lib/mysql/vspheredb -------------------------
    2,4 GiB [##########]  vm_event_history.ibd
   36,0 MiB [          ]  alarm_history.ibd
   10,0 MiB [          ]  monitoring_rule_problem_history.ibd
    9,0 MiB [          ]  vm_hardware.ibd

Does anybody know how we can purge this event history? Does this require SQL queries or is there a way through the web GUI?

necarnot avatar Apr 03 '24 08:04 necarnot