add smartctl to ndsudo (#17515)
Ilya Mashchenko committed
Apr 24, 2024 at 18:38 UTC
fae824fb719659a664b9071a4341a01a57087b13
1 file changed
+16
src/collectors/plugins.d/ndsudo.c
+16
@@ -13,6 +13,22 @@ struct command {
13
const char *params;
14
const char *search[MAX_SEARCH];
15
} allowed_commands[] = {
16
+ {
17
+ .name = "smartctl-json-scan",
18
+ .params = "--json --scan",
19
+ .search = {
20
+ [0] = "smartctl",
21
+ [1] = NULL,
22
+ },
23
+ },
24
+ {
25
+ .name = "smartctl-json-device-info",
26
+ .params = "--json --all {{deviceName}} --device {{deviceType}} --nocheck {{powerMode}}",
27
+ .search = {
28
+ [0] = "smartctl",
29
+ [1] = NULL,
30
+ },
31
+ },
32
{
33
.name = "fail2ban-client-status",
34
.params = "status",