| $Hostname |
| $Interface |
| $Device |
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/6a9c3e74-23bb-4952-b19f-e662e55cf349%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
| $Device |
I'd also recommend fixing your DNS such that you don't need to extract the hostname from sysName. You want XXXXXXXXX.PH01.COM to be used for the instance value in the prometheus config.
On Fri, Jun 2, 2017 at 7:38 AM, Ben Kochie <sup...@gmail.com> wrote:
You probably want to use label_values(sysName{instance="$Device"}, sysName)Your label_values() functions above should probably use a metric name like sysName$device = label_values(sysName{job="cisco_snmp"}, instance)Otherwise Prometheus will search all metric names in order to produce the device, this could be very slow.
On Fri, Jun 2, 2017 at 2:03 AM, Emmanuel Yong <yongem...@gmail.com> wrote:
Dear All,Currently I Am trying To Monitor The Traffic Of All My Company Cisco Switches, Having Issues Matching The IP Address of the Switch To the Hostname.I am using Grafana Templating To Do So, and below are my Templating:When I Try $Hostname, it does return the device hostname but is not in the format which i want, how can i make sure it just return XXXXXXXXX.PH01.COMsysName{instance="10.5.2.12",job="cisco_snmp",sysName="XXXXXXXX.PH01.COM"} 1 1496361351000
$Hostname
$Interface
$Device
--
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-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
Awesome Ben, This Is Lifesaver as I Was Pondering on RegEx.This is a very good tipBTW, are there any option for me to combine $device and $name together? So that user when select a device, it will show the appropriate hostname?
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 view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/0abaef5e-b2f7-482c-8da6-8c031f496f77%40googlegroups.com.
{"status":"error","errorType":"bad_data","error":"parse error at char 13: could not parse remaining input \"({job=\\\"cisco_sn\"..."}this is what i am seeing from http://grafana-internal:9090/api/v1/series?match[]=label_values(%7Bjob%3D%22cisco_snmp%22%2Cinstance%3D%22OPB48L1-CS29SW05%22%7D)&start=1496396747&end=1496397047
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 view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/26907665-e7c6-4ced-95e9-5f8b7e2e694d%40googlegroups.com.