cinek810 / snow-grafana-proxy

Connector for grafana simple-json data source and ServiceNow incidents retieved over ServiceNow API
MIT License
23 stars 5 forks source link

Support for row count in Singlestat panel #13

Open vasekch opened 5 years ago

vasekch commented 5 years ago

It would be great if one can use snow-grafana-proxy with singlestat panel to display number of rows in the result.

Currently it's showing one value from the chosen column.

image

I know this may be actually requirement for the simple-json plugin, but things seem quite complicated in that area.

If we can make this plugin to return one column called count and one row with value, it would be easy.

Perhaps miss-use a bit query type timeserie? What do you think?

vasekch commented 5 years ago

this is ready in https://github.com/vasekch/snow-grafana-proxy/commit/2acd790da00bf6ba5b48d4ccccd18b174dd3baea

cinek810 commented 5 years ago

It's kind of dirty hack. I merged this just because it was part of many good thinks in your pull request. However we should probably refactor that to an attribute of the query configuration insnow-grafana-proxy.conf ? Currently there is only list of attributes but maybe adding an option outputType next to snowFilter will be more clean approach? The option will default to list as current behavior, but another outputType may simply be count?