All,
I am trying to incorporate temperature sensor graphs into our alerts. We have it setup for port utilization and it works great but I am unable to make it work for temperature alerts. Here is what I am using…
{if %state == 1}<b>ALERT: </b>{else} <b>RECOVER:</b>{/if}<br>
<b>%title</b><br>
<b>Severity:</b> %severity<br>
<b>Timestamp:</b> %timestamp<br>
<b>Unique-ID:</b> %uid<br>
<b>Rule:</b> {if %name}%name{else}%rule{/if}<br>
{if %faults}<b>Faults:</b>
{foreach %faults}
<img src="http://servername.domain.co/graph.php?from=end-6h&id=%value.port_id&type=sensor_temperature&legend=no&height=150&width=500" /><br>
<b>Temperature:</b> %value.sensor_current<br>
<b>Previous Measurement:</b> %value.sensor_prev<br>
{/foreach}
{/if}
Are my variables correct (id=%value.port_id and type=sensor_temperature)? If I remove the image source and restore the “#key: %value.string” then it will spit out all the information that comes along with that and the alert works. With the current setup that I have listed above, the alert doesn’t send an email at all.
Any help provided is appreciated!