Closed zenmetsu closed 5 years ago
For clarification, are you asking that I provide a way to simply inject with the metric name set to the name from the event's metrics points attribute?
I suppose I can fork it and do so. I'm attempting to migrate from Sensu 1.x to 5.x, and the previous community-provided graphite handlers did just that. I would think that it would be nice to have the option, if possible. I can close the issue if you feel that it is invalid.
No, it's not invalid. I created it the way I did to scratch my own itch. It should be a relatively simple change to add an option that does just that. How about "-n/--no-prefix" for that purpose? I should be able to get this done this week, if you're okay with that.
That would be awesome sir.
I just uploaded a new release with this change. Let me know if it works for you (I don't currently have a test bed for it).
sooooo close. :)
It is now omitting the eventname_hostname
field as desired, but it is still throwing a sensu
in front of everything. I can certainly work with this.
I can specify -n -P ''
and it will work exactly as I need it to. So maybe specifying -n should override the default of sensu
Thanks a million!
Sorry, it should be fixed now.
That did it. Thanks!
I'll go ahead and close this issue.
In prior versions of Sensu, our deployment would have the checks use a schema so we'd end up with metrics with names such as 'production.hostname.*'
Regardless of what I try using for prefix with this handler, i'm ending up with entries in Graphite such as 'sensu.hostname.metrics-cpu_hostname.*' where the Graphite handler appears to be adding "sensu" or whatever is defined with prefix option, along with "hostname" and "eventname_hostname".
Instead of touching the prefix with the graphite handler, I'd prefer to just use the metric names verbatim as produced by the checks themselves. As it stands now, the "eventname_hostname" field that is being injected is making it impossible to use templating within Grafana.