Hi,
I have the description for port utilization alert defined this way:
Interface Problem: Utilization OUT [[ $value ]]% (current: [[ printf "round(port_out_bps{port_id='%s'} / ignoring(job) port_speed{port_id='%s'} * 100, 0.1)" .Labels.port_id .Labels.port_id | query | first | value ]]%)
Sometimes when I have no data from metric port_out_bps I got this error as description of alert:
"<first>: error calling first: first() called on vector with no elements"
Is there a way, how to check in template returned value and set fallback value for current utilization to "unknown" ?
Thank you.