tsdb_plugin.proto 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. syntax = "proto3";
  2. option go_package = "proto";
  3. package plugins;
  4. message TsdbQuery {
  5. TimeRange timeRange = 1;
  6. DatasourceInfo datasource = 2;
  7. repeated Query queries = 3;
  8. }
  9. message Query {
  10. string refId = 1;
  11. int64 maxDataPoints = 2;
  12. int64 intervalMs = 3;
  13. string modelJson = 4;
  14. }
  15. message TimeRange {
  16. string fromRaw = 1;
  17. string toRaw = 2;
  18. int64 fromEpochMs = 3;
  19. int64 toEpochMs = 4;
  20. }
  21. message Response {
  22. repeated QueryResult results = 1;
  23. }
  24. message QueryResult {
  25. string error = 1;
  26. string refId = 2;
  27. string metaJson = 3;
  28. repeated TimeSeries series = 4;
  29. //repeat Table tables = x;
  30. }
  31. message DatasourceInfo {
  32. int64 id = 1;
  33. int64 orgId = 2;
  34. string name = 3;
  35. string type = 4;
  36. string url = 5;
  37. string jsonData = 6;
  38. string secureJsonData = 7;
  39. }
  40. message TimeSeries {
  41. string name = 1;
  42. map<string, string> tags = 2;
  43. repeated Point points = 3;
  44. }
  45. message Point {
  46. int64 timestamp = 1;
  47. double value = 2;
  48. }
  49. service TsdbPlugin {
  50. rpc Query(TsdbQuery) returns (Response);
  51. }