Add prometheus data source

Change-Id: Ia56aa4e8015eacf8e21f78d3aba7f9822515b364
This commit is contained in:
William Huang 2019-02-12 16:41:30 +08:00
parent 0c1dccc15b
commit 60a4c15c9b
3 changed files with 18 additions and 1 deletions

View File

@ -23,7 +23,8 @@ class Datasource(object):
v.Required('isDefault', default=False): v.All(bool),
v.Required('name'): v.All(str, v.Length(min=1)),
v.Required('type', default='graphite'): v.Any('graphite',
'influxdb'),
'influxdb',
'prometheus'),
v.Required('url'): v.All(str, v.Length(min=1)),
v.Optional('orgId'): int,
v.Optional('database'): v.All(str, v.Length(min=1)),

View File

@ -0,0 +1,11 @@
{
"datasource": {
"new-prometheus-datasource": {
"access": "proxy",
"isDefault": false,
"name": "New prometheus datasource",
"type": "prometheus",
"url": "http://example.org:9090"
}
}
}

View File

@ -0,0 +1,5 @@
datasource:
name: New prometheus datasource
url: http://example.org:9090
access: proxy
type: prometheus