I think Im just having a senior moment but I have a UPS Alert for when power is lost and the UPS switches to battery.
Alert Rule:
What I want to do is have the alert template include the battery run time in the alert email. Which is recorded in the sensors.sensor_current field for sensors.sensor_descr “Runtime”. Below is the template I have so far I’m just not sure how to get it to read the “Runtime” instead of the “upsBasicOutputStatus” which is used in the rule.
Alert Template Fault:
<table border="1" width="50%">
<col style="width:20%">
<col style="width:20%">
<col style="width:10%">
<thead>
<tr>
<th>Host Name</th>
<th><font color=red>Alert Name</th>
<th><font color=orange>Run Time</th>
</tr>
</thead>
<tbody>
{foreach %faults}
<tr>
<td align="center">%hostname </td>
<td align="center"><font color=red>{if %name}%name{else}%rule{/if}</td>
<td align="center">"I would imagine Im missing somthing here just not sure what" %value.sensor_descr</td>
</tr>
{/foreach}{/if}
</tbody>
</table>
This is what the alert looks like without the Runtime
Thanks for reading and advice.