Skip to content

Commit

Permalink
Correct SNMP query (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
nomaster authored Nov 1, 2024
1 parent f949ac0 commit c3b2073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jobs/traffic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
prometheus = Prometheus::ApiClient.client(url: ENV['PROMETHEUS_URL'])

def query(prometheus, q)
res = prometheus.query(query: "rate(if#{q}Octets{ifDescr=\"eth1\"}[2m])")
res = prometheus.query(query: "rate(if#{q}Octets{instance=\"10.1.0.1\", ifName=\"eth4\"}[2m])")
res['result'][0]['value'][1].to_f * 8
end

Expand Down

0 comments on commit c3b2073

Please sign in to comment.