We are monitoring a bunch of IoT Devices using TIG stack and are trying to configure alerts using InfluxDB V2’s inbuilt Alerts feature. We have configured the slack notification channel and we would like to capture the metric value as part of the message. Here is a sample status message template:
The memory utilization is *${ r._level }*
On Device Name: *${ r.host }*
Polled At: *${ r._time}*
This shows the alert like this:
Memory Alert The memory utilization is crit
On Device Name: Device-dev-02
Polled At: 2021-09-16T06:41:15.000000000Z
The actual value is in the field _value
, when I try to capture this as part of the message
The memory utilization is *${ r._level }*
On Device Name: *${ r.host }*
Polled At: *${ r._time}*
Current Memory: *${ r._value}*
The notification check fails. I read in the documentation that Flux only interpolates string values, I tried to convert the _value to string
The memory utilization is *${ r._level }*
On Device Name: *${ r.host }*
Polled At: *${ r._time}*
Current Memory: *${string(v: r._value)}*
Still, the notification check fails.
Are we missing something?