So I recently setup LibreNMS and it works great. However, I am having issues with mail alerts. I do not see any relevant data that can give me an idea about which device is having an issues. I am using the default template that comes with LibreNMS and just added 3 lines to it.
> {{ $alert->title }}
> Hostname: {{ $alert->hostname }}
> System Name: {{ $alert->sysName }}
> IP Address: {{ $alert->ip }}
> Severity: {{ $alert->severity }}
> @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif
> Timestamp: {{ $alert->timestamp }}
> Unique-ID: {{ $alert->uid }}
> Rule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif
> @if ($alert->faults) Faults:
> @foreach ($alert->faults as $key => $value)
> {{ $key }}: {{ $value['string'] }}
> @endforeach
> @endif
> Alert sent to:
> @foreach ($alert->contacts as $key => $value)
> {{ $value }} <{{ $key }}>
> @endforeach
Using the above template, I get a mail alert with the below data which doesn’t mention any relevant data.
> Alert for device - Port status up/down
>
>
>
>
> 17
> Severity: critical
> Timestamp: 2018-12-13 13:10:18
> Unique-ID: 518
> Rule: Port status up/down Faults:
> 1: sysObjectID = .1.3.6.1.4.1.311.1.1.3.1.2; sysDescr = Hardware: Intel64 Family 6 Model 45 Stepping 7 AT/AT COMPATIBLE - Software: Windows Version
> 6.1 (Build 7601 Multiprocessor Free); port_id = 244; ifDescr = Teredo Tunneling Pseudo-Interface.;
> 2: sysObjectID = .1.3.6.1.4.1.311.1.1.3.1.2; sysDescr = Hardware: Intel64 Family 6 Model 45 Stepping 7 AT/AT COMPATIBLE - Software: Windows Version
> 6.1 (Build 7601 Multiprocessor Free); port_id = 245; ifDescr = WAN Miniport (IKEv2).; Alert sent to:
As you can see, it throws the sysdescription but nothing relevent. I do not want anything fancy. A simple template saying there is an issue with xyz device and if possible, a little detail about the issue.
Few things to note: I have added all device IP’s in the host files so that librenms can resolve them to hostname and added each and every device using the hostname.
Could someone please help me as I am completely new to this.