findmypast/icingaweb2-module-graphite

"-" aren't converted to "_" in this module

Ziaunys opened this issue · 5 comments

It looks like this module only converts "." to "" in the Graphite targets. However, Icinga2 converts both "-" and "." to "". Is there any way around this?

Edit your "/usr/share/icingaweb2/modules/graphite/library/Graphite/Macro.php"
and search for "escapeMetric".
Then add the line: "$str=str_replace('-','_',$str);"

It works for me.

I have not seen this behaviour (icinga2 changing - to _ in the current master branch).

rp3u commented

hm... it is very strange but
with Icinga2 2.3.10 (last update!) you need to:

  1. fall back to $str=str_replace('-','_',$str) in Macro.php
  2. put 'legacy_mode = true' in icingaweb2/modules/graphite/config.ini

Hi guys, had the same issue. PR created. Hope the maintainer merging this.