mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Added formatted uptime value for alert templates #4983
feature: Added formatted uptime value for alert templates #4983
This commit is contained in:
committed by
Søren Rosiak
parent
a0fec9e574
commit
e934e306fc
@@ -453,6 +453,8 @@ function DescribeAlert($alert)
|
||||
$obj['sysName'] = $device['sysName'];
|
||||
$obj['location'] = $device['location'];
|
||||
$obj['uptime'] = $device['uptime'];
|
||||
$obj['uptime_short'] = formatUptime($device['uptime'], 'short');
|
||||
$obj['uptime_long'] = formatUptime($device['uptime']);
|
||||
$obj['description'] = $device['purpose'];
|
||||
$obj['notes'] = $device['notes'];
|
||||
$obj['device_id'] = $alert['device_id'];
|
||||
|
@@ -118,6 +118,9 @@ Placeholders:
|
||||
- Hostname of the Device: `%hostname`
|
||||
- sysName of the Device: `%sysName`
|
||||
- location of the Device: `%location`
|
||||
- uptime of the Device (in seconds): `%uptime`
|
||||
- short uptime of the Device (28d 22h 30m 7s): `%uptime_short`
|
||||
- long uptime of the Device (28 days, 22h 30m 7s): `%uptime_long`
|
||||
- description (purpose db field) of the Device: `%description`
|
||||
- notes of the Device: `%notes`
|
||||
- Title for the Alert: `%title`
|
||||
|
Reference in New Issue
Block a user