hey all could use some assistance creating a Prometheus alert.

It seems simple but after some trial and error its more advanced than i 
thought.


We are looking to create alerts for "Link Saturation"


We have dashboards that show us the current bandwidth of the ports, and the 
queries look like this:
(
  sum by (snmp_target, ifDescr) 
(irate(ifHCOutOctets{job_snmp=~"integrations/snmp", 
snmp_target=~"$Switches", ifDescr=~"$ifName"}[$__interval])) +
  sum by (snmp_target, ifDescr) 
(irate(ifHCInOctets{job_snmp=~"integrations/snmp", 
snmp_target=~"$Switches", ifDescr=~"$ifName"}[$__interval]))
) * 8

And this query we use in a table to show the Ports Linked Speed:
last_over_time(ifHighSpeed{snmp_target="$Switches"}[$__interval])

So now here begs the question how can i create and alert that basically says

If the Value of (
  sum by (snmp_target, ifDescr) 
(irate(ifHCOutOctets{job_snmp=~"integrations/snmp", 
snmp_target=~"$Switches", ifDescr=~"$ifName"}[$__interval])) +
  sum by (snmp_target, ifDescr) 
(irate(ifHCInOctets{job_snmp=~"integrations/snmp", 
snmp_target=~"$Switches", ifDescr=~"$ifName"}[$__interval]))
) * 8 is Greater than 
last_over_time(ifHighSpeed{snmp_target="$Switches"}[$__interval]) fire an 
alert 

-- 
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/a23721bb-826a-4b95-8e99-a902aa891138n%40googlegroups.com.

Reply via email to