Closed pmeffre closed 3 years ago
Hi,
Prometheus supports numerical values only ( converted to floats ), all other values are dropped.
If you want the string values (like state/port-id
) to show up as labels of your prometheus metric, you have to set strings-as-labels
to true
under your prom output:
outputs:
prom
#...
# other settings
#...
# a boolean, enables setting string type values as prometheus metric labels.
strings-as-labels: true
ref: https://gnmic.kmrd.dev/user_guide/outputs/prometheus_output/
Thanks a lot
It works like a charm ....
Pierre
Hello, I have Juniper Infrastructure and I am experiences some problems that I do not understand. When I subscribe the path "/network-instances/network-instance/protocols/protocol/evpn/peer", all works fine and i get my result in Prometheus. When I subscribe the path "/lldp/interfaces/interface/neighbors/neighbor/state", the result in Prometheus is very partial: only few counters are available. (
)
But When I request direct GNMIc with
docker exec -ti dd16 /app/gnmic --address 10.9.5.104 --port 50051 --username xxx --password xxxxx --insecure --encoding proto subscribe --mode once --path "/lldp/interfaces/interface/neighbors/neighbor/state"
, I got all leafs and values (conform to lldp yang model):Find next my gnmic.yml file :
I do not know what is wrong in my config, and why I could not see all values returned in Prometheus ?