Skip to content

Commit ccf1187

Browse files
committed
* Device Monitoring management
* Better suricata rules management
1 parent 8001c4c commit ccf1187

7 files changed

Lines changed: 287 additions & 11 deletions

File tree

src/protos/pirogue_admin_api/services.proto

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ service Services {
1515
/*rpc UpdateSuricataRulesSources (google.protobuf.Empty) returns (google.protobuf.StringValue) {}*/
1616
rpc AddSuricataRulesSource (SuricataRulesSource) returns (google.protobuf.Empty) {}
1717
rpc DeleteSuricataRulesSource (google.protobuf.StringValue) returns (google.protobuf.Empty) {}
18+
19+
/* Device Monitoring */
20+
rpc ListDeviceMonitorings (google.protobuf.Empty) returns (DeviceMonitorings) {}
21+
rpc AddDeviceMonitoring (DeviceMonitoring) returns (google.protobuf.Empty) {}
22+
rpc DeleteDeviceMonitoring (google.protobuf.StringValue) returns (google.protobuf.Empty) {}
23+
rpc GetDeviceMonitoringTemplate (google.protobuf.Empty) returns (DeviceMonitoring) {}
1824
}
1925

2026
message DashboardConfiguration {
@@ -23,9 +29,48 @@ message DashboardConfiguration {
2329

2430
message SuricataRulesSource {
2531
string name = 1;
26-
string url = 2;
32+
optional string url = 2;
33+
optional bool enabled = 3;
34+
optional bool system = 4;
35+
map<string, string> parameters = 5;
36+
37+
optional string summary = 6;
38+
optional string vendor = 7;
39+
optional string license = 8;
2740
}
2841

2942
message SuricataRulesSources {
3043
repeated SuricataRulesSource sources = 1;
44+
}
45+
46+
message DeviceMonitoringFilter {
47+
string attribute = 1;
48+
repeated string values = 2;
49+
}
50+
51+
message DeviceMonitoring {
52+
string name = 1;
53+
bool enable = 2;
54+
string url = 3;
55+
map<string, string> headers = 4;
56+
repeated DeviceMonitoringFilter filters = 5;
57+
58+
optional string mode = 6;
59+
optional int32 bulk_size = 7;
60+
optional float periodic_interval = 8;
61+
optional int32 periodic_rate = 9;
62+
63+
optional int32 retry_count = 10;
64+
optional float retry_delay = 11;
65+
optional float timeout = 12;
66+
67+
optional bool verify_ssl = 13;
68+
69+
optional string auth_type = 14;
70+
optional string auth_token = 15;
71+
optional string auth_header_name = 16;
72+
}
73+
74+
message DeviceMonitorings {
75+
repeated DeviceMonitoring monitorings = 1;
3176
}

src/python/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ Networking:
2727
Services:
2828
- Grafana administration
2929
- Suricata detection rules management
30+
- Device monitoring management
3031
```

src/python/debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
python3-pirogue-admin-api (2.0.5) bookworm; urgency=medium
2+
3+
* Device Monitoring management
4+
* Better suricata rules management
5+
6+
-- Christophe Andral <christophe@andral.fr> Fri, 27 Mar 2026 12:13:01 +0100
7+
18
python3-pirogue-admin-api (2.0.4) bookworm; urgency=medium
29

310
* Fixed pypi PEP-625 compliance

src/python/pirogue_admin_api/services_pb2.py

Lines changed: 21 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/python/pirogue_admin_api/services_pb2.pyi

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,89 @@ class DashboardConfiguration(_message.Message):
1313
password: str
1414
def __init__(self, password: _Optional[str] = ...) -> None: ...
1515

16+
class DeviceMonitoring(_message.Message):
17+
__slots__ = ["auth_header_name", "auth_token", "auth_type", "bulk_size", "enable", "filters", "headers", "mode", "name", "periodic_interval", "periodic_rate", "retry_count", "retry_delay", "timeout", "url", "verify_ssl"]
18+
class HeadersEntry(_message.Message):
19+
__slots__ = ["key", "value"]
20+
KEY_FIELD_NUMBER: _ClassVar[int]
21+
VALUE_FIELD_NUMBER: _ClassVar[int]
22+
key: str
23+
value: str
24+
def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
25+
AUTH_HEADER_NAME_FIELD_NUMBER: _ClassVar[int]
26+
AUTH_TOKEN_FIELD_NUMBER: _ClassVar[int]
27+
AUTH_TYPE_FIELD_NUMBER: _ClassVar[int]
28+
BULK_SIZE_FIELD_NUMBER: _ClassVar[int]
29+
ENABLE_FIELD_NUMBER: _ClassVar[int]
30+
FILTERS_FIELD_NUMBER: _ClassVar[int]
31+
HEADERS_FIELD_NUMBER: _ClassVar[int]
32+
MODE_FIELD_NUMBER: _ClassVar[int]
33+
NAME_FIELD_NUMBER: _ClassVar[int]
34+
PERIODIC_INTERVAL_FIELD_NUMBER: _ClassVar[int]
35+
PERIODIC_RATE_FIELD_NUMBER: _ClassVar[int]
36+
RETRY_COUNT_FIELD_NUMBER: _ClassVar[int]
37+
RETRY_DELAY_FIELD_NUMBER: _ClassVar[int]
38+
TIMEOUT_FIELD_NUMBER: _ClassVar[int]
39+
URL_FIELD_NUMBER: _ClassVar[int]
40+
VERIFY_SSL_FIELD_NUMBER: _ClassVar[int]
41+
auth_header_name: str
42+
auth_token: str
43+
auth_type: str
44+
bulk_size: int
45+
enable: bool
46+
filters: _containers.RepeatedCompositeFieldContainer[DeviceMonitoringFilter]
47+
headers: _containers.ScalarMap[str, str]
48+
mode: str
49+
name: str
50+
periodic_interval: float
51+
periodic_rate: int
52+
retry_count: int
53+
retry_delay: float
54+
timeout: float
55+
url: str
56+
verify_ssl: bool
57+
def __init__(self, name: _Optional[str] = ..., enable: bool = ..., url: _Optional[str] = ..., headers: _Optional[_Mapping[str, str]] = ..., filters: _Optional[_Iterable[_Union[DeviceMonitoringFilter, _Mapping]]] = ..., mode: _Optional[str] = ..., bulk_size: _Optional[int] = ..., periodic_interval: _Optional[float] = ..., periodic_rate: _Optional[int] = ..., retry_count: _Optional[int] = ..., retry_delay: _Optional[float] = ..., timeout: _Optional[float] = ..., verify_ssl: bool = ..., auth_type: _Optional[str] = ..., auth_token: _Optional[str] = ..., auth_header_name: _Optional[str] = ...) -> None: ...
58+
59+
class DeviceMonitoringFilter(_message.Message):
60+
__slots__ = ["attribute", "values"]
61+
ATTRIBUTE_FIELD_NUMBER: _ClassVar[int]
62+
VALUES_FIELD_NUMBER: _ClassVar[int]
63+
attribute: str
64+
values: _containers.RepeatedScalarFieldContainer[str]
65+
def __init__(self, attribute: _Optional[str] = ..., values: _Optional[_Iterable[str]] = ...) -> None: ...
66+
67+
class DeviceMonitorings(_message.Message):
68+
__slots__ = ["monitorings"]
69+
MONITORINGS_FIELD_NUMBER: _ClassVar[int]
70+
monitorings: _containers.RepeatedCompositeFieldContainer[DeviceMonitoring]
71+
def __init__(self, monitorings: _Optional[_Iterable[_Union[DeviceMonitoring, _Mapping]]] = ...) -> None: ...
72+
1673
class SuricataRulesSource(_message.Message):
17-
__slots__ = ["name", "url"]
74+
__slots__ = ["enabled", "license", "name", "parameters", "summary", "system", "url", "vendor"]
75+
class ParametersEntry(_message.Message):
76+
__slots__ = ["key", "value"]
77+
KEY_FIELD_NUMBER: _ClassVar[int]
78+
VALUE_FIELD_NUMBER: _ClassVar[int]
79+
key: str
80+
value: str
81+
def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
82+
ENABLED_FIELD_NUMBER: _ClassVar[int]
83+
LICENSE_FIELD_NUMBER: _ClassVar[int]
1884
NAME_FIELD_NUMBER: _ClassVar[int]
85+
PARAMETERS_FIELD_NUMBER: _ClassVar[int]
86+
SUMMARY_FIELD_NUMBER: _ClassVar[int]
87+
SYSTEM_FIELD_NUMBER: _ClassVar[int]
1988
URL_FIELD_NUMBER: _ClassVar[int]
89+
VENDOR_FIELD_NUMBER: _ClassVar[int]
90+
enabled: bool
91+
license: str
2092
name: str
93+
parameters: _containers.ScalarMap[str, str]
94+
summary: str
95+
system: bool
2196
url: str
22-
def __init__(self, name: _Optional[str] = ..., url: _Optional[str] = ...) -> None: ...
97+
vendor: str
98+
def __init__(self, name: _Optional[str] = ..., url: _Optional[str] = ..., enabled: bool = ..., system: bool = ..., parameters: _Optional[_Mapping[str, str]] = ..., summary: _Optional[str] = ..., vendor: _Optional[str] = ..., license: _Optional[str] = ...) -> None: ...
2399

24100
class SuricataRulesSources(_message.Message):
25101
__slots__ = ["sources"]

0 commit comments

Comments
 (0)