anryko / grafana-influx-dashboard

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

Add 'where' graph target configuration parameter #6

Closed anryko closed 9 years ago

anryko commented 9 years ago

After migrating my infra from graphite metric format to straight collectd I noticed that some plugins put multiple metrics under the same series name. In this case I will need a 'where' sql keyword to get multiple graphs data per series.

anryko commented 9 years ago

Added 'where' keyword support. Nevertheless encountered another issue with that. As series are matched by the plugin.graph. -> series I need to figure out plugin configuration change to reflect that.

anryko commented 9 years ago

Now graph configuration supports an array [https://github.com/anryko/grafana-influx-dashboard/commit/83198f7aa1c561ba3afbf03d5aefcd19b82c92f6]:

Silly example:

  plugins.load = new Plugin();
  plugins.load.load = {
    'graph': {
      'midterm': [
        { 'column': 'value*3', 'alias': 'loadx3' },
        { 'column': 'value*10', 'alias': 'loadx10' },
      ],
    },
    'panel': {
      'title': 'Load Average',
    },
  };

This functionality will be used to utilise { 'where': "dsname='midterm'" } graph configuration keyword for multiple graphs per single series.