Hello guys, am I have installed and monitoring. But I do get a lot of alerts but, the alerts are not clear. Also the notifications being sent out readable. How can I make the notification or the alerts very clear and readable.
Example:
Device vtk–cpe-rt.example.net.gh recovered from Port status up/down
Device vtk-heavydee-cpe-rt.vtechnology.net.gh recovered from Port status up/down
Severity: critical
Time elapsed: 50m 35s
Timestamp: 2020-01-28 14:57:36
Unique-ID: 149150
Rule: Port status up/down
Faults:
#1: sysObjectID => .1.3.6.1.4.1.14988.1; sysDescr => RouterOS RB952Ui-5ac2nD; location_id => 8; port_id => 5529; ifDescr => ether5;
#2: sysObjectID => .1.3.6.1.4.1.14988.1; sysDescr => RouterOS RB952Ui-5ac2nD; location_id => 8; port_id => 5530; ifDescr => ether4;
#3: sysObjectID => .1.3.6.1.4.1.14988.1; sysDescr => RouterOS RB952Ui-5ac2nD; location_id => 8; port_id => 5531; ifDescr => ether3;
#4: sysObjectID => .1.3.6.1.4.1.14988.1; sysDescr => RouterOS RB952Ui-5ac2nD; location_id => 8; port_id => 5532; ifDescr => ether2;
Alert sent to: admin
First of all, take a look to the alert templating https://docs.librenms.org/Alerting/Templates/
After that, everything will be more clear.
What you sended means that the device recovered from a port down, and is telling you the faults on that device
@TheGreatDoc Thanks for the feedback please what can I do at he alert templates to make the alerts clear and readable?
Just read the documentation. I think its clear.
But in small words, just create/import a template and assign it to an alert rule
@TheGreatDoc please what about the Faults: options how can I get the exact fault in words but not in the numbers form.
It will depend on what you want to show.
My best suggestion is to take a sample from the docs and start playing with it.
For example, this is my ports template (for up/down notifications)
` Host : {{ $alert->hostname }}`
` Fecha : {{ $alert->timestamp }}`
` Estado : @if ($alert->state == 0)✅ @endif @if ($alert->state == 1)⚠ Warning @endif`
` Regla : @if ($alert->name){{ $alert->name }} @else {{ $alert->rule }} @endif `
@if ($alert->state == 0)⏳ Time elapsed: {{ $alert->elapsed }} @endif
@if ($alert->faults)
Puerto(s):
@foreach ($alert->faults as $key => $value)
` ⭗ {{ $value['ifName'] }}`
` Descripción: {{ $value['ifAlias'] }}`
` Estado : {{ $value['ifOperStatus'] }}`
@endforeach
@endif
Its in markdown as I use it for telegram/rocketchat transports that allows markdown.
1 Like