Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wildcard for target in /query #23

Merged
merged 2 commits into from Apr 25, 2017
Merged

Conversation

doublemarket
Copy link
Owner

@doublemarket doublemarket commented Apr 24, 2017

You can use * as a wildcard for the target value in the /query endpoint.

Request:

{
  "panelId": 1,
  "range": {
    "from": "2016-10-31T06:33:44.866Z",
    "to": "2016-10-31T12:33:44.866Z",
    "raw": {
      "from": "now-6h",
      "to": "now"
    }
  },
  "rangeRaw": {
    "from": "now-6h",
    "to": "now"
  },
  "interval": "30s",
  "intervalMs": 30000,
  "targets": [
     { "target": "a:b:c:upper_*:value", refId: "A" }
  ],
  "format": "json",
  "maxDataPoints": 550
}

Response:

[
  {
    "target":"a:b:c:upper_75:value",
    "datapoints":[
      [622,1450754160000],
      [365,1450754220000]
    ]
  },
  {
    "target":"a:b:c:upper_90:value",
    "datapoints":[
      [861,1450754160000],
      [767,1450754220000]
    ]
  }
]

@coveralls
Copy link

Coverage Status

Coverage increased (+1.1%) to 75.556% when pulling 0c6d521 on query-wildcard into 8e8be72 on master.

@doublemarket doublemarket merged commit e1595f8 into master Apr 25, 2017
@doublemarket doublemarket deleted the query-wildcard branch April 25, 2017 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants