grafana-gnocchi-datasource
grafana-gnocchi-datasource copied to clipboard
Feature Request: Group and sort functions for measures
Right now it's impossible to sort all obtained measures or show only part of them.
For example we need to get instances with top CPU utilization. That means that we want to get all metrics (cpu_util) for some resource type (instance), sort by value in descending order and show only some of them in Grafana.
We can use "resource search" query type, set resource type, metric name and some simple query string (say, started_at>='somedate'). After that we will receive some amount of metrics, maximum amount of those metrics will be equal to api.max_limit value in gnocchi.conf. If we want to get all measures (to perform some kind of analysis) we have to set big value for api.max_limit option in gnocchi.conf. But in this case we will get thousands of metrics on one chart in Grafana.
What we need is some kind of functions to set them on all of our received values. There are some example implementations: Graphite datasource: http://docs.grafana.org/features/datasources/graphite/#functions Zabbix datasource: http://docs.grafana-zabbix.org/reference/functions/
I have tracked the pagination stuffs here:
https://github.com/gnocchixyz/grafana-gnocchi-datasource/issues/33
About functions, we have a start of this. Last release of the grafana plugin (1.5.2) have a new field called 'transformation' and use the 'transform' API of future Gnocchi 4.1.
Currently Gnocchi server will implement only some basic functions (absolute, negative, ...). But it can be enhanced with your need. Feel free to open a ticket with functions you need on Gnocchi server side.
So feature is already in progress :)