source: nscp/libs/protobuf/plugin.proto @ c391984

0.4.00.4.10.4.2
Last change on this file since c391984 was c391984, checked in by Michael Medin <michael@…>, 2 years ago

0.4.x:

  • tweaks to the build environment to make the installer work
  • fixed Unicode issue
  • fixed performance data
  • improved so alias doesn't re-process the data so much
  • Property mode set to 100644
File size: 1.9 KB
Line 
1package PluginCommand;
2
3message Header {
4        enum Type {
5                REQUEST = 1;
6                RESPONSE = 2;
7        };
8        enum Version {
9                VERSION_1 = 1;
10        };
11        required Type type = 1;
12        required Version version = 2;
13        optional Version max_supported_version = 3;
14       
15        optional string sender = 17;
16        optional string recipient = 18;
17        optional int32 id = 19;
18};
19
20message Request {
21        enum Version {
22                VERSION_1 = 1;
23        };
24
25        required Version version = 1;
26        optional int32 id = 2;
27        required string command = 3;
28        repeated string arguments = 4;
29};
30
31message PerformanceData {
32        enum Type {
33                INT = 1;
34                STRING = 1;
35                FLOAT = 1;
36        };
37        message IntValue {
38                required int64 value = 1;
39                optional string unit = 2;
40                optional int64 warning = 3;
41                optional int64 critical = 4;
42                optional int64 minimum = 6;
43                optional int64 maximum = 7;
44        }
45        message StringValue {
46                required string value = 1;
47        }
48        message FloatValue {
49                required double value = 1;
50                optional string unit = 2;
51                optional double warning = 3;
52                optional double critical = 4;
53                optional double minimum = 6;
54                optional double maximum = 7;
55        }
56        required string alias = 1;
57        required Type type = 2;
58        optional IntValue int_value = 3;
59        optional StringValue string_value = 4;
60        optional FloatValue float_value = 5;
61       
62        // TODO add thresholds here!
63
64}
65
66message Response {
67        enum Code {
68                OK              = 0;
69                WARNING = 1;
70                CRITCAL = 2;
71                UNKNOWN = 3;
72        };
73        enum Version {
74                VERSION_1 = 1;
75        };
76
77        required Version version = 1;
78        optional int32 id = 2;
79        required string command = 5;
80        repeated string arguments = 16;
81       
82        required Code result = 9;
83        required string message = 10;
84        optional string legacyPerf = 11;
85        repeated PerformanceData perf = 12;
86       
87}
88
89message RequestMessage {
90        required Header header = 1;
91        repeated Request payload = 2;
92}
93message ResponseMessage {
94        required Header header = 1;
95        repeated Response payload = 2;
96}
97
98
Note: See TracBrowser for help on using the repository browser.