Can I clean old data from PerfData directory?

This forum was archived to /woltlab and is now in read-only mode.
  • Hi all,

    I'm running a working Icinga2 installation with Graphite and PerfData modules enabled. PerfDataWriter and GraphiteWriter are working but PerfData files are not automaticaly purged. PerfData directory (/var/spool/icinga2/perfdata) is increasing daily and I didn't find any advise about how to purge those files.

    Can I clean PerfData directory?
    How many data I need to keep on it?

    Thank you!

  • The PerfdataWriter feature only writes and rotates such files. It expects that an external daemon (e.g. NPCD used in conjunction with PNP) collects and deletes those files.

    If you don't use any of those perfdata processing mechanisms disable the feature.

  • just leaving an answer here, because i had the same questions:

    yes, GraphiteWriter is not dependent of PerfDataWriter. One can disable PerfDataWriter if not needed elsewhere.
    Had the same question in mind, all the tutorials suggest that one needs both, but i think that's not right and it's working fine for me with only GraphiteWriter.

  • Users seem to confuse the performance data chapter and do not chose one way, but doing them all top-down. The careful reader will know of course ;-)…features#performance-data

  • i had some trouble configuring it and was looking around in the net.
    in all the other tutorials, everybody says to activate perfdata and graphitewriter...

    an meanwhile there are so many way to handle "performance data". but everybody seems to stick to this ancient perfdata thing with creepy files on the harddisk and the hope, that something will care about XD

  • Those tutorials are nice, but never 100% complete. It is based on user experience, illustrate their way of doing things. I keep that in mind when looking for solutions, and check back with the documentation when there's some bogus/unclear information.

  • OMG! I didnt know why I enabled this perfdata feature, I neither use PNPnagios nor Graphite. I checked my "/var/spool/icinga2/perfdata" location, it is now 12G. Can I just disabled this feature and remove those logs?

    1. # icinga2 feature disable perfdata
    2. # rm -rf /var/spool/icinga2/perfdata


  • You should at least recreate the directory after deletion and re-add permissions as before. Next time you'll enable the feature it might fail.

  • Greetings, i'm using perfdata with InfluxDB writer but it doesn't seem to have any options to rotate perfdata files.…objecttype-influxdbwriter

    Considering its quick flush interval i assume it's safe to rotate perfdata files daily. Is it correct? Thank you.

    flush_interval Optional. How long to buffer data points before transfering to InfluxDB. Defaults to 10s.
    flush_threshold Optional. How many data points to buffer before forcing a transfer to InfluxDB. Defaults to 1024.
  • You should create a new thread, because this one is quite old and already marked as solved.

    Anyway, there's no need to enable the perfdata feature when you use influxdb, they have nothing to do with each other.