Griesbacher / nagflux

A connector which copies performancedata from Nagios / Icinga(2) / Naemon to InfluxDB
GNU General Public License v2.0
67 stars 32 forks source link

add StorePerformanceLabelAsField and StoreCommandAsField options #42

Open u238 opened 6 years ago

u238 commented 6 years ago

Hi,

On big monitoring environments with tons of checks with variable performanceLabel (like disk label on disk checks or interface labels on network interface checks, etc.) the cardinality of the performanceLabel tag explodes. This causes each write to become slower and slower and memory allocation increases.

Storing the performanceLabel as Field instead of a Tag in InfluxDB has proven to decrease load a lot in such situations.

This pull requests adds two options for storing the performanceLabel as a Field:

[InfluxDBGlobal]
    [...]
    # on big installations with lot of checks that have device dependend performance labels
    # e.g. check_interface_table, the series cardinality in influxdb can explode and therefore
    # cause write timeouts.
    # In such cases, setting PerformanceLabel as Field value will significantly reduce the series
    # cardinality.
    StorePerformanceLabelAsField = false