|
|
9 лет назад | |
|---|---|---|
| .. | ||
| src | 9 лет назад | |
| .jscs.json | 9 лет назад | |
| .jshintrc | 9 лет назад | |
| Gruntfile.js | 9 лет назад | |
| README.md | 9 лет назад | |
| package.json | 9 лет назад | |
| plugin.json | 9 лет назад | |
#Generic backend datasource#
This is a very minimalistic datasource that forwards http requests in a defined format. The idea is that anybody should be able to build an api and retrieve data from any datasource without built-in support in grafana.
Its also serves as an living example implementation of a datasource.
A guide for installing plugins can be found at [placeholder for links].
Your backend need implement 3 urls
{ refId: 'F', target: 'select metric' }
An array of options based on the target input
####Example####
["upper_25","upper_50","upper_75","upper_90","upper_95"]
{
range: { from: '2015-12-22T03:06:13.851Z',to: '2015-12-22T06:48:24.137Z' },
interval: '5s',
targets:
[ { refId: 'B', target: 'upper_75' },
{ refId: 'A', target: 'upper_90' } ],
format: 'json',
maxDataPoints: 2495 //decided by the panel
}
An array of
{
"target":"target_name",
"datapoints":[
[intvalue, timestamp in epoch],
[intvalue, timestamp in epoch]
]
}
###Example###
[
{
"target":"upper_75",
"datapoints":[
[622,1450754160000],
[365,1450754220000]
]
},
{
"target":"upper_90",
"datapoints":[
[861,1450754160000],
[767,1450754220000]
]
}
]