mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
Add HTML transport example for ms teams (#9969)
and fix missing " in Processor Alert with Graph example.
This commit is contained in:
parent
1cfe4ea5fd
commit
3f5d8e3633
@ -304,7 +304,7 @@ Rule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif <br>
|
||||
{{ $key }}: {{ $value['string'] }}<br>
|
||||
@endforeach
|
||||
@if ($alert->faults) <b>Faults:</b><br>
|
||||
@foreach ($alert->faults as $key => $value)<img src="https://server/graph.php?device={{ $value['device_id'] }}&type=device_processor&width=459&height=213&lazy_w=552&from=end-72h><br>
|
||||
@foreach ($alert->faults as $key => $value)<img src="https://server/graph.php?device={{ $value['device_id'] }}&type=device_processor&width=459&height=213&lazy_w=552&from=end-72h"><br>
|
||||
https://server/graphs/id={{ $value['device_id'] }}/type=device_processor/<br>
|
||||
@endforeach
|
||||
Template: CPU alert <br>
|
||||
@ -312,6 +312,20 @@ Template: CPU alert <br>
|
||||
@endif
|
||||
```
|
||||
|
||||
#### MS Teams formatted default template:
|
||||
```
|
||||
<a href="https://your.librenms.url/device/device={{ $alert->device_id }}/">{{ $alert->title }}</a>
|
||||
<pre><strong>Device name:</strong> {{ $alert->sysName }}
|
||||
<strong>Severity:</strong> {{ $alert->severity }}
|
||||
@if ($alert->state == 0)<strong>Time elapsed:</strong>{{ $alert->elapsed }}
|
||||
@endif<strong>Timestamp:</strong> {{ $alert->timestamp }}
|
||||
<strong>Unique-ID:</strong> {{ $alert->uid }}
|
||||
<strong>Rule:</strong>@if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif</pre>
|
||||
<pre style="white-space:normal;">@if ($alert->faults) <strong>Faults:</strong>
|
||||
@foreach ($alert->faults as $key => $value) #{{ $key }}: {{ $value['string'] }}
|
||||
@endforeach </pre> @endif
|
||||
```
|
||||
|
||||
## Included
|
||||
|
||||
We include a few templates for you to use, these are specific to the type of alert rules you are creating. For example if you create a rule that would alert on BGP sessions then you can
|
||||
|
Loading…
Reference in New Issue
Block a user