aristanetworks / goarista

Fairly general building blocks used in Arista Go code and open-sourced for the benefit of all.
Apache License 2.0
206 stars 66 forks source link

ocprometheus doesn't work on Arista running 4.21.5F #41

Open aned opened 5 years ago

aned commented 5 years ago

I'm getting this directly from gnmi cli:

./gnmi -addr 10.10.1.1:6042 -username admin -password blah get "/Sysdb/connectivityMonitor/status"

/Sysdb/connectivityMonitor/status/hostStatus/device-1/defaultStats/latency:
0.07800000160932541
/Sysdb/connectivityMonitor/status/hostStatus/device-1/defaultStats/jitter:
0.012000000104308128
/Sysdb/connectivityMonitor/status/hostStatus/device-1/defaultStats/packetLoss:
0

In ocprometheus I have this configured:

subscriptions:
        - /Sysdb/connectivityMonitor/status

metrics:
        - name: PacketLossArista
          path: /Sysdb/connectivityMonitor/status/hostStatus/(?P<dst_target>.+)/defaultStats/packetLoss
          help: Packet loss on Arista

        - name: LatencyArista
          path: /Sysdb/connectivityMonitor/status/hostStatus/(?P<dst_target>.+)/defaultStats/latency
          help: Latency on Arista

        - name: JitterArista
          path: /Sysdb/connectivityMonitor/status/hostStatus/(?P<dst_target>.+)/defaultStats/jitter
          help: Jitter on Arista

It worked fine on previous EOS version.

aaronbee commented 5 years ago

The issue is likely due to a change in TerminAttr in EOS-4.21.5F that removes use of deprecated fields of the gNMI protobufs. ocprometheus was updated to support both the deprecated and newer fields here: https://github.com/aristanetworks/goarista/commit/22b2444f947b7d395b5c227cf0dd881d0100bdb1

aned commented 5 years ago

Running the latest master, the same issue (no metrics being exported).

aned commented 5 years ago

Ping? Or the entire thing is no longer supported?

aaronbee commented 5 years ago

@aned I suggest you get in contact with Arista Support.

aned commented 5 years ago

Cut arista case# 158111 @aaronbee

aned commented 5 years ago

@aaronbee Arista TAC provided an extension ocprometheus-1.6.swix. Installed it on arista switch, /usr/bin/ocprometheus worked as expected, got my metrics. Copied over the binary to my server and it's working as well. So it's definitely some issue with the current code on github.

aaronbee commented 5 years ago

Thanks for the update. What version of TerminAttr you are running on the device? You can tell with the Cli command:

bash /usr/bin/TerminAttr -version

(This is assuming you are running TerminAttr from its default location. If not, replace /usr/bin/TerminAttr with the path used under daemon TerminAttr.)

aned commented 5 years ago

Running TerminAttr from the default location:


v1.5.2 go1.10.3