influxdata / influxdata/influxdb
Collected telemetry from SONiC Device is unable to push into the Influxdb.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Hi,
We are trying to see the collected telemetry data from SONiC Device in the influxdb. Here we are using the gnmic tool as a collector and influxdb + Grafana.
Currently we are able to see the "GET" & "SUBSCRIBE" telemetry output by using the gNMIC CLI Client. Now i need to push the data collected into influxdb.
Link which i refered: https://gnmic.openconfig.net/
Subscribe Request:
`gnmic -a 50.0.0.20:50051 -u admin -p YourPaSsWoRd --tls-ca /etc/telegraf/ca.pem --tls-cert /etc/telegraf/server.pem --tls-key /etc/telegraf/server.key --skip-verify sub --path "/openconfig-interfaces:interfaces/interface[name=Ethernet4]/state/counters/" --mode SAMPLE --sample-interval 30s --target OC-YANG --mode stream --encoding proto`
Subscribe Request Log:
`{"source":"50.0.0.20:50051","subscription-name":"sub1","timestamp":1688839509491006457,"time":"2023-07-08T23:35:09.491006457+05:30","prefix":"openconfig-interfaces:interfaces/interface[name=Ethernet92]/state","target":"OC-YANG","updates":[{"Path":"counters/in-broadcast-pkts","values":{"counters/in-broadcast-pkts":685484008794}},{"Path":"counters/in-multicast-pkts","values":{"counters/in-multicast-pkts":1038992245409}},{"Path":"counters/in-octets","values":{"counters/in-octets":0}},{"Path":"counters/out-discards","values":{"counters/out-discards":0}},{"Path":"counters/out-pkts","values":{"counters/out-pkts":3210371048829}},{"Path":"counters/in-errors","values":{"counters/in-errors":2145968746397}},{"Path":"counters/in-pkts","values":{"counters/in-pkts":2890612899528}},{"Path":"counters/out-broadcast-pkts","values":{"counters/out-broadcast-pkts":863147990623}},{"Path":"counters/out-unicast-pkts","values":{"counters/out-unicast-pkts":1558366802814}},{"Path":"counters/in-discards","values":{"counters/in-discards":0}},{"Path":"counters/in-unicast-pkts","values":{"counters/in-unicast-pkts":0}},{"Path":"counters/out-errors","values":{"counters/out-errors":159055111279}},{"Path":"counters/out-multicast-pkts","values":{"counters/out-multicast-pkts":788856255392}},{"Path":"counters/out-octets","values":{"counters/out-octets":0}}]}
`
Subscribe Request output: [Std output.log](https://github.com/influxdata/influxdb/files/13363759/Std.output.log)
Next while trying to push the collected data to influxdb installed the gnmic tool in linux pc
uname -a
`Linux sfsintel 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux`
gnmic version
`version : 0.33.0 |
commit : d8f931e |
date : 2023-10-08T17:08:01Z |
gitURL : https://github.com/openconfig/gnmic |
docs : https://gnmic.openconfig.net
`
Influxd version
`InfluxDB v2.7.1 (git: 407fa622e9) build_date: 2023-04-28T13:24:27Z`
Influx version
`Influx CLI dev (git: none) build_date: 2023-04-28T14:24:14Z`
Cloned Repo link : `https://github.com/openconfig/gnmic.git`.
After that we can see that their are three files `config.yaml, config.json, config.toml` . We took the "config.toml" file and did the changes according to our requirements.
config.toml
[config.txt](https://github.com/influxdata/influxdb/files/13364031/config.txt)
To run this file used this command : `gnmic --config config.toml subscribe` then it prints the std out in the terminal. In the config.toml file what ever the name is mentioned in "[subscriptions.sub1]" that is seen in the influxdb measurements dropdown
Influxdb screenshot:
But couldn't see any things like `in-pkts, out-pkts, in-broadcast, etc..` in the dropdown of Influxdb.
Contributor guide
Research direction
Start with the attached config.txt and the reported gnmic 0.33.0 configuration, then run `gnmic --config config.toml subscribe` while checking the InfluxDB measurements. Compare the subscription output containing interface counters with what appears in the InfluxDB measurement dropdown. Done means identifying why the counter fields are absent and documenting a reproducible resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grafana, linux
- Domain
- databases, observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100