Creating alert rule from syslog

Hi guys, just wanted to share my aproach.
I need to monitor ospf state from my main router.
Since Im not recibing this data from snmp Im sending ospf log messages into lnms.
The challenging part is that you can not bound an alert state from log messages (please correct me if im wrong).
So This is what I did:
Created 1 alert when neighbour is down like:

Created 1 alert when neighbour is up like:

Both rules are setted to send only 1 notification and not send recovery message

And … other interesting workaround I founded is , how to extract info from meesage to render the template.
This is my solution:

@foreach ($alert->faults as $key => $value)
{{ $key }}:
DISPOSITIVO: {{ $alert->sysName}} - {{ $alert->hostname }}
NEIGHBOR: {{ explode(",", $value['msg'])[1] }}
INTERFACE: {{ explode(",", $value['msg'])[9] }}

Please , let me know if there is a cleaner way to do it.
Any ideas to share about this task would be wellcome.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.