sensu / sensu-influxdb-handler

Sensu Go InfluxDB Metrics Handler
https://sensu.io
MIT License
14 stars 16 forks source link

Feature Request: Enterprise style parsing #44

Closed hurrycaine closed 3 years ago

hurrycaine commented 3 years ago

Enterprise customer here. The format that the metrics are being put in are not similar to how they were implemented for the enterprise influxdb handler. I had used a community handler prior to that but don't remember if there were differences there.

There are 2 differences with current format and the sensu enterprise influxdb handler. This is mostly for the graphite out metrics but could apply to any outputs.

  1. Current: If the measurement has a '.' in the name, then the first word is used for the measurement name. The subsequent used as the key or the name of the value. Previously it was just "value", which is what the current process defaults to if there are no '.' to split. After trying this out I saw no benefit when using grafana to display the data. I agree having something other then the generic "value" could add context but I saw no benefit when using grafana. Also, it would make queries more complicated to make, either static but much more if doing anything dynamic.

Enterprise: The entire measurement is the measurement and the key for the value is always "value"

  1. The tag was previously called host but now sensu_entity_name. Could add an additional 'host' tag but that would be a duplication and tags are indexed so doubling the index cost of inserting for no gain. This is the least of the issues but still a pain to change everything to use sensu_entity_name (instead of 'host') and also it's really wordy and takes up more real-estate then is needed (IMHO)

I propose a -e --enterprise flag that will change this behavior. I'm open to flag names of course. I also refactored some of the code in the for loop I think it makes it cleaner and easy to test but again open to suggestions.

Thank you for your consideration on this feature request.