forked from librenms/librenms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alert template clean up "\r\n\n" (librenms#10541)
* clean up "\r\n\n" * clean up "\r\n\n" and reformat.
- Loading branch information
Showing
3 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
INSERT INTO `alert_templates` (`name`, `template`) VALUES ('BGP Sessions.', '{{ $alert->title }}\r\n\\r\\n\nSeverity: {{ $alert->severity }}\r\n\\r\\n\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }}\r\n @endif\\r\\n\nTimestamp: {{ $alert->timestamp }}\r\n\\r\\n\nUnique-ID: {{ $alert->uid }}\r\n\\r\\n\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \r\n\\r\\n\n @if ($alert->faults) Faults:\r\n\\r\\n\n @foreach ($alert->faults as $key => $value)\\r\\n\n#{{ $key }}: {{ $value[\'string\'] }}\r\n\\r\\n\nPeer: {{ $value[\'astext\'] }}\r\n\\r\\n\nPeer IP: {{ $value[\'bgpPeerIdentifier\'] }}\r\n\\r\\n\nPeer AS: {{ $value[\'bgpPeerRemoteAs\'] }}\r\n\\r\\n\nPeer EstTime: {{ $value[\'bgpPeerFsmEstablishedTime\'] }}\r\n\\r\\n\nPeer State: {{ $value[\'bgpPeerState\'] }}\r\n\\r\\n\n @endforeach\\r\\n\n @endif'); | ||
INSERT INTO `alert_templates` (`name`, `template`) VALUES ('Ports', '{{ $alert->title }}\r\n\\r\\n\nSeverity: {{ $alert->severity }}\r\n\\r\\n\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif\\r\\n\nTimestamp: {{ $alert->timestamp }}\\r\\n\nUnique-ID: {{ $alert->uid }}\\r\\n\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \r\n\\r\\n\n @if ($alert->faults) Faults:\r\n\\r\\n\n @foreach ($alert->faults as $key => $value)\r\n\\r\\n\n#{{ $key }}: {{ $value[\'string\'] }}\r\n\\r\\n\nPort: {{ $value[\'ifName\'] }}\r\n\\r\\n\nPort Name: {{ $value[\'ifAlias\'] }}\r\n\\r\\n\nPort Status: {{ $value[\'message\'] }}\r\n\\r\\n\n @endforeach \r\n\\r\\n\n @endif'); | ||
INSERT INTO `alert_templates` (`name`, `template`) VALUES ('Temperature', '{{ $alert->title }}\r\n\\r\\n\nSeverity: {{ $alert->severity }}\r\n\\r\\n\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif \r\n\\r\\n\nTimestamp: {{ $alert->timestamp }}\r\n\\r\\n\nUnique-ID: {{ $alert->uid }}\r\n\\r\\n\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \r\n\\r\\n\n @if ($alert->faults) Faults:\r\n\\r\\n\n @foreach ($alert->faults as $key => $value)\r\n\\r\\n\n#{{ $key }}: {{ $value[\'string\'] }}\r\n\\r\\n\nTemperature: {{ $value[\'sensor_current\'] }}\r\n\\r\\n\nPrevious Measurement: {{ $value[\'sensor_prev\'] }}\r\n\\r\\n\n @endforeach \r\n\\r\\n\n @endif'); | ||
INSERT INTO `alert_templates` (`name`, `template`) VALUES ('BGP Sessions.', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }}\r\n @endif\nTimestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value)\n#{{ $key }}: {{ $value[\'string\'] }}\nPeer: {{ $value[\'astext\'] }}\nPeer IP: {{ $value[\'bgpPeerIdentifier\'] }}\nPeer AS: {{ $value[\'bgpPeerRemoteAs\'] }}\nPeer EstTime: {{ $value[\'bgpPeerFsmEstablishedTime\'] }}\nPeer State: {{ $value[\'bgpPeerState\'] }}\n @endforeach\n @endif'); | ||
INSERT INTO `alert_templates` (`name`, `template`) VALUES ('Ports', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif\nTimestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value)\n#{{ $key }}: {{ $value[\'string\'] }}\nPort: {{ $value[\'ifName\'] }}\nPort Name: {{ $value[\'ifAlias\'] }}\nPort Status: {{ $value[\'message\'] }}\n @endforeach \n @endif'); | ||
INSERT INTO `alert_templates` (`name`, `template`) VALUES ('Temperature', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif \nTimestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value)\n#{{ $key }}: {{ $value[\'string\'] }}\nTemperature: {{ $value[\'sensor_current\'] }}\nPrevious Measurement: {{ $value[\'sensor_prev\'] }}\n @endforeach \n @endif'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
INSERT INTO `alert_templates` (name, template) values('Default Alert Template', '{{ $alert->title }}\\r\\n\nSeverity: {{ $alert->severity }}\\r\\n\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }}\\r\\n\n @endif Timestamp: {{ $alert->timestamp }}\\r\\n\nUnique-ID: {{ $alert->uid }}\\r\\n\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif\\r\\n\n @if ($alert->faults) Faults:\\r\\n\n @foreach ($alert->faults as $key => $value) #{{ $key }}: {{ $value[\'string\'] }}\\r\\n\n @endforeach @endif Alert sent to: @foreach ($alert->contacts as $key => $value){{ $value }} <{{ $key }}> @endforeach'); | ||
INSERT INTO `alert_templates` (name, template) values('Default Alert Template', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }}\n @endif Timestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif\n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value) #{{ $key }}: {{ $value[\'string\'] }}\n @endforeach @endif Alert sent to: @foreach ($alert->contacts as $key => $value){{ $value }} <{{ $key }}> @endforeach'); |