Templating Configuration
Retrieve Switches Device Name
Variable: $device
Query: label_values({job="snmp"},instance)
Retrieve Switches Interface
Variable: $Interface
Query: query_result(ifHCOutOctets{job="snmp",instance="$Device"})
Regex: .interface="(.?)",.*
Metrics Query
To Get Inbound Traffic
irate(ifHCInOctets{job='snmp',instance='$Device',interface=~'$Interface'}[5m])*8
To Have More Meaningful legend, I Use The Following
{{interface}} - In
To Get Outbound Traffic
irate(ifHCOutOctets{job='snmp',instance=~'$Device',interface=~'$Interface'}[5m]) * 8
To Have More Meaningful legend, I Use The Following
{{interface}} - Out
Hope This Quick Configuration Guide Will Help Someone Out There, and If Need More Info or Improve Further. Give A Comment
Thank You
/.interface="(.*)",.*/
query_result(ifHCOutOctets{job="snmp",instance="$device"})
Thank you. So its working after the changes mentioned.I would like to monitor CPU/PSU/Interface resets etc... and I have defined a new module cisco_sw in my snmp.yml for this. I am able to use my SNMP exporter and walk the OIDs. Now I have if_mib module also exists in my SNMP.yml. How can I use two modules to scrape a single set of target in prometheus?
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2a3ba8c0-23a5-45ef-9b06-c89a48e53047%40googlegroups.com.--
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 prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2a3ba8c0-23a5-45ef-9b06-c89a48e53047%40googlegroups.com.
Hello Bryan,Ok, but what if I duplicate the prometheus job with a different module name? Which one is more efficient? Combining the module in to a single one or duplicating the jobs?
The context is suppose if I have different vendor appliances to monitor, certain OIDs will be specific to that vendor hence It doesn’t make sense to walk all OIDs.
RegardsNishant
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2a3ba8c0-23a5-45ef-9b06-c89a48e53047%40googlegroups.com.
--_Sent from my IPhone
On 15 February 2018 at 10:48, Nishanth <nisha...@gmail.com> wrote:Hello Bryan,Ok, but what if I duplicate the prometheus job with a different module name? Which one is more efficient? Combining the module in to a single one or duplicating the jobs?The efficiency difference is minor, you want one job for sanity.The context is suppose if I have different vendor appliances to monitor, certain OIDs will be specific to that vendor hence It doesn’t make sense to walk all OIDs.It's (usually) harmless to walk additional OIDs, but I would long term expect to end up with a module per device type/role.Brian
RegardsNishant
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2a3ba8c0-23a5-45ef-9b06-c89a48e53047%40googlegroups.com.
--_Sent from my IPhone