We’re trying to graph differents metrics with prometheus and grafana.
We intalled ocprometheus on the switches etc…
No issues on the basic steps.
But we’re going to perform some tests with pfc and it would be great to get the counter intfPfcClassCounter it gives a per interface count of pfc frames but mostly it seems to be per class too.
here’s an example of output via rest :
I used the path found here https://github.com/aristanetworks/goarista/blob/master/cmd/ocprometheus/sample_configs/ocprometheus-7050.yml
but the metric doesn’t show up in prometheus
from the output of the curl something seems off because this path looks incomplete there should be something like /count/value at the end
but mostly after “count” it’s an array of value, and except for pfc related metrics i haven’t found other metrics given as an array, and i don’t know how to complete the path to get the metric in prometheus and then graph so that we could see in which class we’d have pfc frames indicating a congestion so maybe we’d have to tune a bit our qos policy.
As anyone any idea how this sould be done ?
For those interested, got an answer from TAC :
"TamÃ¡s here from EMEA TAC! With eos-native paths you won't be able to make this work as arrays are not supported and with Smash you can't go further down the path, however this works fine with gNMI/OpenConfig and I'd highly recommend using OpenConfig in general and only use eos-native path if the state is not exposed via OpenConfig.
This would also ease your job a lot as in OpenConfig world all paths are standardized so no need to know which platform is using what forwarding agent, so on all your platforms you can use the same types
I've also added a note about this recommendation on our new OpenConfig website: https://aristanetworks.github.io/openmgmt/telemetry/adapters/ocprometheus/#using-ocprometheus-with-the-openconfigocta-agent-management-api-gnmi
The above is the slightly update version of the EOSC article you might have seen before: https://eos.arista.com/streaming-eos-telemetry-states-to-prometheus/
I've just tested this too and it works fine with the below subscription and metric path:
On the Prometheus side this is reflected like this
so I basically labelled the interface, the counter direction and the index
I'll update the github repo later with this example and will remove the pfc path from the eos-native yaml examples (the reason why they were there in the first place is that in older versions those counters might not have been inside an array like you found).
Let me know if you have any questions!
Tested on my side it works as expected with gnmi api.
Kudos to him.
Marked as resolved
Post your Answer
You must be logged in to post an answer.