knyar / nginx-lua-prometheus

Prometheus metric library for Nginx written in Lua
MIT License
1.46k stars 231 forks source link

Invalid datasource on grafana dashboard #88

Closed shujaaa closed 4 years ago

shujaaa commented 4 years ago

Hello,

First thank you for this exporter that works really well and that I now use in production !

I'm here to report that the grafana dashboard published under ID 10223 has some small issues w/regards to datasources that could easily be corrected. I am not sure if you developped that dashboard and/or if you know the person who did so shot in the dark - apologies....

I simply referred to the appropriate global defined datasource everywhere and here is the corrected JSON...

Also some suggestions for coloring the per-request graph :

"seriesOverrides": [
    {
      "alias": "/2[0-9]+/",
      "color": "#56A64B"
    },
    {
      "alias": "200",
      "color": "#C8F2C2"
    },
    {
      "alias": "/3[0-9]+/",
      "color": "#5794F2"
    },
    {
      "alias": "/4[0-9]+/",
      "color": "#FA6400"
    },
    {
      "alias": "404",
      "color": "#FFCB7D"
    },
    {
      "alias": "/5[0-9]+/",
      "color": "#C4162A"
    },
    {
      "alias": "502",
      "color": "#FFA6B0"
    }
  ],

Full JSON file (without the color overrides)

nginx-lua_rev2.json.txt

Thanks for reading, and apologies if you're not the person to contact.... Regards,

knyar commented 4 years ago

Thanks for taking the time to report this issue.

Note that this is not an exporter, but rather a generic library that can be used to export metrics. The README file includes some examples, but in general I would expect each user to configure metrics that suit their environment.

I don't really know who published the Grafana dashboard, so unfortunately cannot make any changes to it.