Supporterino / truenas-graphite-to-prometheus

A graphite exporter mapping file for truenas scale >23.10.1 metrics and some example grafana dashboards
GNU General Public License v3.0
78 stars 12 forks source link

Simplify `graphite_mapping.conf` #45

Closed basnijholt closed 3 months ago

basnijholt commented 3 months ago

This PR updates the Graphite mappings for TrueNAS metrics to simplify the syntax and ensure compatibility with TrueNAS 24.04 (Dragonfish). The main changes are:

  1. Replaced regex syntax with simpler wildcard syntax using asterisks (*).
  2. Removed explicit "match_type: regex" declarations where possible.
  3. Changed capturing group syntax from ${n} to $n for consistency and simplicity.

These changes maintain the overall structure and intent of the mappings while making them more readable and easier to maintain. The updated mappings should work correctly with TrueNAS 24.04 (Dragonfish) and provide consistent metric collection.

I will update the README too, because the new setup requires a Namespace field and some other fields have changed too.

Supporterino commented 3 months ago

Hi @basnijholt The regex change was done on purpose since people where using dots in their hostnames for the instances labels and this would break the simple matcher. Feel free to implements the quotes and such. But revert to simple matcher isn't considered merging any time soon.