Dear fellow LibreNMS users,
I configured our alert messages for custom oids, and everything looks fine. However when I receive the recovery, it states the value of when the error occured. Can somebody please provide me with some support to get the current value in the recovery message?
The template looks as follow now:
{{ $alert->title }}
Severity: {{ $alert->severity }}
Klant: {{ $alert->notes }}
System Name: {{ $alert->sysName }}
IP: {{ $alert->hostname }}
Locatie: {{ $alert->location }}
Route: {{ $alert->description }}
Rule: if ($alert->name) {{ $alert->name }} else {{ $alert->rule }} @endif
if ($alert->faults) foreach ($alert->faults as $key => $value)
Sensor: {{ $value[‘customoid_descr’] }}
Current Value: {{ $value[‘customoid_current’] }} {{ $value[‘customoid_unit’] }}
Value Limit Low: {{ $value[‘customoid_limit_low’] }} {{ $value[‘customoid_unit’] }}
Value Limit High: {{ $value[‘customoid_limit’] }} {{ $value[‘customoid_unit’] }}
endforeach
endif
if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} endif
Tijd: {{ $alert->timestamp }}
And this is the message I receive:
Device xxxx recovered from CustomOID under limit
Severity: critical
Klant: xxxx
System Name: xxxx
IP: xxxxx
Locatie: xxxx
Route: Lab
Rule: CustomOID under limit
Sensor: Rx Line Slot 1
Current Value: -60 dBm
Value Limit Low: -12.9 dBm
Value Limit High: -10.9 dBm
Time elapsed: 24m 56s
Tijd: 2023-03-08 09:52:55
./validate.php:
===========================================
Component | Version |
---|---|
LibreNMS | 23.2.0 (2023-02-24T01:19:03+01:00) |
DB Schema | 2022_09_03_091314_update_ports_adsl_table_with_defaults (248) |
PHP | 8.1.2-1ubuntu2.11 |
Python | 3.10.6 |
Database | MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1 |
RRDTool | 1.7.2 |
SNMP | 5.9.1 |
=========================================== |