49 lines
1.0 KiB
Protocol Buffer
49 lines
1.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package sys_mon_agent_api;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/empty.proto";
|
|
|
|
service Agent {
|
|
rpc Configure(AgentConfiguration) returns (AgentConfigurationResponse);
|
|
rpc Poll(google.protobuf.Empty) returns (MonitoringStats);
|
|
}
|
|
|
|
message AgentConfiguration {
|
|
repeated string services_to_monitor = 2;
|
|
repeated string storage_to_monitor = 3;
|
|
}
|
|
|
|
message AgentConfigurationResponse {
|
|
string hostname = 1;
|
|
}
|
|
|
|
message MonitoringStats {
|
|
repeated MonitoredService services = 1;
|
|
repeated MonitoredStorage storage = 2;
|
|
}
|
|
|
|
enum MonitoredServiceState {
|
|
ACTIVE = 0;
|
|
RELOADING = 1;
|
|
INACTIVE = 2;
|
|
FAILED = 3;
|
|
ACTIVATING = 4;
|
|
DEACTIVATING = 5;
|
|
}
|
|
|
|
message MonitoredService {
|
|
string name = 1;
|
|
MonitoredServiceState state = 2;
|
|
bool result_success = 3;
|
|
optional google.protobuf.Timestamp main_started = 4;
|
|
optional google.protobuf.Timestamp main_exited = 5;
|
|
}
|
|
|
|
message MonitoredStorage {
|
|
string name = 1;
|
|
bool smart_pass = 2;
|
|
bool present = 3;
|
|
}
|