anryko / grafana-influx-dashboard

Grafana InfluxDB scripted dashboard
MIT License
132 stars 44 forks source link

Add plugin configuration for MongooseIM #79

Closed oli-g closed 7 years ago

oli-g commented 7 years ago

Hi @anryko I'm adding support for MongooseIM metrics.

MongooseIM metrics can be grabbed by CollectD thanks to this configuration snippet:

LoadPlugin curl_json
<Plugin "curl_json">
          <URL "http://<MONGOOSEIM_IP>:5280/api/metrics/all">
              Instance "mongooseim"
              <Key "metrics/sessionCount">
                  Type "absolute"
              </Key>
              <Key "metrics/*/count">
                  Type "absolute"
              </Key>
              <Key "metrics/*/one">
                  Type "absolute"
              </Key>
          </URL>
</Plugin>

The dashboard I added already works, but I would suggest a little change in your code. Check my comments 😉 .

Thank you for this great tool!

anryko commented 7 years ago

Thanks @oli-g Could you add a collectd config example file too? To work around the issue with plugin name I would suggest to use collectd precache chain modifications and rename metric before passing it to influxdb. I encountered the same case with kafka plugin. I will experiment with your suggestion for configurable series and see what I can do in the next couple of days.

oli-g commented 7 years ago

Oh I missed that PreCacheChain stuff on Collectd! Thank you, it seems to be what I was looking for, so maybe the change I suggested is not that needed anymore! I will update this PR soon with your suggestion.

anryko commented 7 years ago

Nice! Could you please update README and I'll merge it.

anryko commented 7 years ago

thank you.