Temperature Graphs in Alerts


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>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>

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!

1 Like

I expect this is due to a bug, should be merged and fixed today hopefully.

Interesting… is this unique to just temperature graphs in alerts? It works beautifully for port utilization threshold.

No but it’s the symptoms of the bug. Update and retest.

I updated and we are at least getting the emails now. The graphic is still not displaying which leads me to believe my variables may be incorrect but this is a positive step in the right direction!

I’m assuming you’ve tested the url in your web browser direct?

That’s wrong actually, %value.port_id should be %value.sensor_id

Thank you for clearing that up. I changed to “%value.sensor_id” and we are good to go! Thanks for your help!