on avait oublié qq eaton par ci par là (on renome tout en ups)

victoriametrics
LapinPancake 2026-06-05 22:23:38 +02:00
parent c14721d7cb
commit 403b54e30a
4 changed files with 17 additions and 17 deletions

View File

@ -3,11 +3,11 @@
{ {
bird = ./bird.nix; bird = ./bird.nix;
ceph = ./ceph.nix; ceph = ./ceph.nix;
eaton = ./eaton.nix;
ilo = ./ilo.nix; ilo = ./ilo.nix;
jitsi = ./jitsi.nix; jitsi = ./jitsi.nix;
node = ./node.nix; node = ./node.nix;
postgresql = ./postgresql.nix; postgresql = ./postgresql.nix;
switch = ./switch.nix; switch = ./switch.nix;
unbound = ./unbound.nix; unbound = ./unbound.nix;
ups = ./ups.nix;
} }

View File

@ -1,7 +1,7 @@
{ critical, warning, ... }: { critical, warning, ... }:
{ {
alerts.EatonBatteryFailure = { alerts.UpsBatteryFailure = { # s'appelait eatonBatteryFailure avant
expr = '' expr = ''
xupsBatteryFailure{xupsBatteryFailure="yes"} == 1 xupsBatteryFailure{xupsBatteryFailure="yes"} == 1
''; '';
@ -9,7 +9,7 @@
labels = critical; labels = critical;
}; };
alerts.EatonBatteryLow = { alerts.UpsBatteryLow = { # idem
expr = '' expr = ''
xupsBatTimeRemaining < 1800 xupsBatTimeRemaining < 1800
''; '';

View File

@ -17,15 +17,6 @@
targets = import ./targets/ceph.nix {}; targets = import ./targets/ceph.nix {};
}; };
eaton = {
path = "/snmp";
params.module = [ "eaton" "uptime" ];
params.auth = [ "eaton" ];
replacementAddress = "127.0.0.1:9116";
replacementTarget = "$1";
targets = import ./targets/eaton.nix {};
};
ilo = { ilo = {
path = "/snmp"; path = "/snmp";
params = { params = {
@ -108,6 +99,15 @@
targets = import ./targets/unbound.nix {}; targets = import ./targets/unbound.nix {};
}; };
ups = {
path = "/snmp";
params.module = [ "ups" "uptime" ];
params.auth = [ "ups" ];
replacementAddress = "127.0.0.1:9116";
replacementTarget = "$1";
targets = import ./targets/ups.nix {};
};
# victoria-metrics = { # pour le jour où on aura deux victoriametrics pour se surveiller l'un l'autre # victoria-metrics = { # pour le jour où on aura deux victoriametrics pour se surveiller l'un l'autre
# replacementAddress = "$1:8428"; # replacementAddress = "$1:8428";
# targets = [ # targets = [

View File

@ -11,23 +11,23 @@
priv_protocol = "AES"; priv_protocol = "AES";
priv_password = "\${ILO_PRIV}"; priv_password = "\${ILO_PRIV}";
}; };
eaton = { ups = {
version = 1; version = 1;
community = "prometheus"; community = "prometheus";
}; };
## Tenté, échoue sur 10.201.3.1 (celui dans le local serveurs de EDC). :( ## Tenté, échoue sur 10.201.3.1 (celui dans le local serveurs de EDC). :(
#eaton = { #ups = {
# version = 3; # version = 3;
# username = "prometheus"; # username = "prometheus";
# security_level = "authPriv"; # security_level = "authPriv";
# auth_protocol = "SHA"; # auth_protocol = "SHA";
# password = "\${EATON_AUTH}"; # password = "\${ups_AUTH}";
# priv_protocol = "AES"; # priv_protocol = "AES";
# priv_password = "\${EATON_PRIV}"; # priv_password = "\${ups_PRIV}";
#}; #};
}; };
modules.eaton = { modules.ups = {
walk = [ walk = [
"xupsInput" "xupsInput"
"xupsOutput" "xupsOutput"