I have looked all afternoon for documentation regarding type conversion or 
type casting using Alertmanager's templating language, but have had no luck 
finding anything useful. Has anyone used type conversion or casting in a 
template successfully? Specifically, I am looking to convert a string 
variable to a float or integer in order to do value comparisons. 

Here's a snippet of code, though I don't think it is particularly useful:
"(gt float64(.Value) float64($disk_value))" 

.Value in this case is the value of a label I have on a disk space alert. 
I want to display only the highest % disk use value in the case where 
multiple mountpoints have passed the alerting threshold. 

Any help would be greatly appreciated. I am very new to Go, so if there is 
some documentation I should read, a link to that would be awesome too!

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/9fe5c475-7ae5-4668-99d8-3c60c146b01en%40googlegroups.com.

Reply via email to