mirror of https://gitlab.crans.org/nounous/nixos
141 lines
3.2 KiB
Nix
141 lines
3.2 KiB
Nix
{ critical, warning, ... }:
|
|
|
|
{
|
|
# cpqHeFltTolFanTable
|
|
|
|
alerts.IloFanDegraded = {
|
|
expr = ''
|
|
cpqHeFltTolFanCondition{
|
|
cpqHeFltTolFanCondition="degraded"
|
|
} == 1
|
|
'';
|
|
for = "0m";
|
|
labels = warning;
|
|
annotations = {
|
|
Chassis = "{{ $labels.cpqHeFltTolFanChassis }}";
|
|
Index = "{{ $labels.cpqHeFltTolFanIndex }}";
|
|
};
|
|
};
|
|
|
|
alerts.IloFanFailed = {
|
|
expr = ''
|
|
cpqHeFltTolFanCondition{
|
|
cpqHeFltTolFanCondition="failed"
|
|
} == 1
|
|
'';
|
|
for = "0m";
|
|
labels = critical;
|
|
annotations = {
|
|
Chassis = "{{ $labels.cpqHeFltTolFanChassis }}";
|
|
Index = "{{ $labels.cpqHeFltTolFanIndex }}";
|
|
};
|
|
};
|
|
|
|
# cpqHeFltTolPowerSupplyTable
|
|
|
|
alerts.IloHighPSUUsage = {
|
|
expr = ''
|
|
cpqHeFltTolPowerSupplyCapacityUsed
|
|
/ (cpqHeFltTolPowerSupplyCapacityMaximum > 0) > 0.5
|
|
'';
|
|
for = "0m";
|
|
labels = warning;
|
|
annotations = {
|
|
Usage = "{{ $value | humanizePercentage }}";
|
|
Chassis = "{{ $labels.cpqHeFltTolPowerSupplyChassis }}";
|
|
Bay = "{{ $labels.cpqHeFltTolPowerSupplyBay }}";
|
|
};
|
|
};
|
|
|
|
alerts.IloPSUDegraded = {
|
|
expr = ''
|
|
cpqHeFltTolPowerSupplyCondition{
|
|
cpqHeFltTolPowerSupplyCondition="degraded"
|
|
} == 1
|
|
'';
|
|
for = "0m";
|
|
labels = warning;
|
|
annotations = {
|
|
Chassis = "{{ $labels.cpqHeFltTolPowerSupplyChassis }}";
|
|
Bay = "{{ $labels.cpqHeFltTolPowerSupplyBay }}";
|
|
};
|
|
};
|
|
|
|
alerts.IloPSUFailed = {
|
|
expr = ''
|
|
(
|
|
cpqHeFltTolPowerSupplyCondition{
|
|
cpqHeFltTolPowerSupplyCondition="failed"
|
|
} == 1
|
|
) * on (
|
|
instance,
|
|
cpqHeFltTolPowerSupplyChassis,
|
|
cpqHeFltTolPowerSupplyBay
|
|
) group_left (
|
|
cpqHeFltTolPowerSupplyErrorCondition
|
|
)
|
|
(cpqHeFltTolPowerSupplyErrorCondition == 1)
|
|
'';
|
|
for = "0m";
|
|
labels = warning;
|
|
annotations = {
|
|
Chassis = "{{ $labels.cpqHeFltTolPowerSupplyChassis }}";
|
|
Bay = "{{ $labels.cpqHeFltTolPowerSupplyBay }}";
|
|
Error = "{{ $labels.cpqHeFltTolPowerSupplyErrorCondition }}";
|
|
};
|
|
};
|
|
|
|
# cpqHeTemperatureTable
|
|
|
|
alerts.IloTooHot = {
|
|
expr = ''
|
|
(
|
|
cpqHeTemperatureCondition{
|
|
cpqHeTemperatureCondition!="ok"
|
|
} == 1
|
|
) * on (
|
|
instance,
|
|
cpqHeTemperatureChassis,
|
|
cpqHeTemperatureIndex
|
|
) group_left (cpqHeTemperatureLocale)
|
|
cpqHeTemperatureLocale_info
|
|
'';
|
|
for = "0m";
|
|
labels = warning;
|
|
annotations = {
|
|
Chassis = "{{ $labels.cpqHeTemperatureChassis }}";
|
|
Index = "{{ $labels.cpqHeTemperatureIndex }}";
|
|
Locale = "{{ $labels.cpqHeTemperatureLocale }}";
|
|
Condition = "{{ $labels.cpqHeTemperatureCondition }}";
|
|
};
|
|
};
|
|
|
|
# cpqHeResMem2ModuleTable
|
|
|
|
alerts.IloRamHS = {
|
|
expr = ''
|
|
cpqHeResMem2ModuleStatus{
|
|
cpqHeResMem2ModuleStatus!~"good|notPresent"
|
|
} == 1
|
|
'';
|
|
for = "0m";
|
|
labels = critical;
|
|
annotations = {
|
|
Module = "{{ $labels.cpqHeResMem2Module }}";
|
|
Status = "{{ $labels.cpqHeResMem2ModuleStatus }}";
|
|
};
|
|
};
|
|
|
|
alerts.IloUneSeuleRam = {
|
|
expr = ''
|
|
count by (instance) (
|
|
cpqHeResMem2ModuleStatus{
|
|
cpqHeResMem2ModuleStatus="good"
|
|
} == 1
|
|
) <= 1
|
|
'';
|
|
for = "0m";
|
|
labels = critical;
|
|
};
|
|
}
|