Files
grafana/pkg/tsdb/models/tsdb_plugin.proto
T

71 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;
// dont repeat. DatasourceInfo datasource = 5;
}
message Timerange {
string from = 1;
string to = 2;
google.protobuf.Timestamp now = 3;
}
message Response {
string message = 1;
map<string, QueryResult> results = 2;
}
message QueryResult {
string error = 1;
string errorString = 2;
string refId = 3;
string metaJson = 4;
repeated TimeSeries series = 5;
//repeat Table tables = x;
}
message DatasourceInfo {
int64 id = 1;
int64 orgId = 2;
string name = 3;
string type = 4;
string access = 5;
string url = 6;
bool basicAuth = 7;
string basicAuthUser = 8;
string basicAuthPassword = 9;
string jsonData = 10;
string secureJsonData = 11;
}
message TimeSeries {
string name = 1;
map<string, string> tags = 2;
repeated Point points = 3;
}
message Point {
int64 timestamp = 1;
double value = 2;
}
service TsdbPlugin {
rpc Query(TsdbQuery) returns (Response);
}