Files
grafana/pkg/tsdb/models/tsdb_plugin.proto
2017-12-11 11:26:36 +01:00

69 lines
1.2 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "proto";
package plugins;
import "google/protobuf/timestamp.proto";
message TsdbQuery {
Timerange timerange = 1;
DatasourceInfo datasource = 2;
repeated Query queries = 3;
}
message Query {
string refId = 1;
string modelJson = 2;
int64 MaxDataPoints = 3;
int64 intervalMs = 4;
DatasourceInfo datasource = 5;
}
message Timerange {
string from = 1;
string to = 2;
google.protobuf.Timestamp now = 3;
}
message Response {
string message = 1;
repeated QueryResult results = 2;
}
message QueryResult {
string error = 1;
string errorString = 2;
string refId = 3;
string metaJson = 4;
repeated TsdbSeries series = 5;
//repeat TsdbTables tables = x;
}
message DatasourceInfo {
string name = 1;
string type = 2;
string access = 3;
string url = 4;
bool basicAuth = 5;
string basicAuthUser = 6;
string basicAuthPassword = 7;
string jsonData = 8;
string secureJsonData = 9;
}
message TsdbSeries {
string name = 1;
map<string, string> tags = 2;
repeated Point points = 3;
}
message Point {
google.protobuf.Timestamp timestamp = 1;
double value = 2;
}
service TsdbPlugin {
rpc Query(TsdbQuery) returns (Response);
}