Skip to content

Commit 990398c

Browse files
peekjef72amotl
authored andcommitted
dsquery: add test for grafite and loki
1 parent f151635 commit 990398c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grafana_client/knowledge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,12 @@ def query_factory(datasource, model: Optional[dict]) -> Union[Dict, str]:
319319
"elasticsearch": "url:///datasources/proxy/{datasource_id}/{database_name}/_mapping",
320320
"fetzerch-sunandmoon-datasource": "url:///datasources/uid/{datasource_uid}",
321321
"grafana-simple-json-datasource": "url:///datasources/proxy/{datasource_id}",
322-
"graphite": "None", # TODO: Allow real None's.
322+
"graphite": "random-walk.count;dc=asia-1;app=collector;server=000", # from play.grafana.org explore Grafite datasource.
323323
"influxdb": "SHOW RETENTION POLICIES on _internal",
324324
"influxdb+influxql": "SHOW RETENTION POLICIES on _internal",
325325
"influxdb+flux": "buckets()",
326326
"jaeger": "url:///datasources/proxy/{datasource_id}/api/services",
327-
"loki": "url:///datasources/{datasource_id}/resources/labels?start=1656274994383000000&end=1656275594383000000",
327+
"loki": "count_over_time({job=~\".+\"} [5m])",
328328
"mssql": "SELECT 1",
329329
"mysql": "SELECT 1",
330330
"opentsdb": "url:///datasources/proxy/{datasource_id}/api/suggest?type=metrics&q=cpu&max=100",

0 commit comments

Comments
 (0)