feat: nut metrics
This commit is contained in:
parent
268247f9b3
commit
061f3e2029
2 changed files with 23 additions and 7 deletions
|
|
@ -107,6 +107,29 @@
|
|||
}
|
||||
];
|
||||
}
|
||||
{ job_name = "nut";
|
||||
metrics_path = "/ups_metrics";
|
||||
params = { ups = [ "minirack-1500va" ]; };
|
||||
static_configs = [{
|
||||
targets = [
|
||||
"127.0.0.1:9199"
|
||||
];
|
||||
labels = {
|
||||
ups = "minirack-1500va";
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.prometheus.exporters.nut = {
|
||||
enable = true;
|
||||
nutServer = "xalicas";
|
||||
nutVariables = [
|
||||
"battery.charge" "battery.charge.low" "battery.charge.warning"
|
||||
"battery.runtime" "battery.runtime.low"
|
||||
"ups.load" "ups.power" "ups.power.nominal" "ups.realpower"
|
||||
"ups.realpower.nominal" "ups.status"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue