We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[agent] hostname = "telegraf-01" debug = true [[inputs.gnmi]] addresses = ["xx:5909"] username = "${GNMI_USERNAME}" password = "${GNMI_PASSWORD}" ## redial in case of failures after redial = "10s" dump_responses = true yang_model_paths = [ "/etc/telegraf/openconfig/release/models/", "/etc/telegraf/openconfig/third_party/ietf/", ] [inputs.gnmi.tags] device = "xx" serial_number = "xx" model_name = "DCS-7050CX3-32S" [[inputs.gnmi.subscription]] name = "state" origin = "openconfig" path = "/components/component/state" subscription_mode = "on_change" [[inputs.gnmi.subscription]] name = "cpu" origin = "openconfig" path = "/components/component/cpu/utilization/state" subscription_mode = "on_change" [[inputs.gnmi.subscription]] name = "psu" origin = "openconfig" path = "/components/component/power-supply/state" subscription_mode = "on_change" [[inputs.gnmi.subscription]] name = "fan" origin = "openconfig" path = "/components/component/fan/state" subscription_mode = "on_change" [[inputs.gnmi.subscription]] name = "ifcounters" origin = "openconfig" path = "/interfaces/interface/state/counters" subscription_mode = "on_change" [[outputs.file]] files = ["stdout"] [[outputs.influxdb]] # destination influxdb xxx urls = ["https://xx"] database = "ARISTA_SWITCHING" retention_policy = "" username = "xx" password = "xx" write_consistency = "any" timeout = "5s" ssl_ca = "" ssl_cert = "" ssl_key = "" insecure_skip_verify = true
2025-01-03T16:49:41Z D! [inputs.gnmi] Got update_1735922981156731216: {"update":{"timestamp":"1735922981156731216","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply2"}},{"name":"power-supply"},{"name":"state"},{"name":"input-current"}]},"val":{"bytesVal":"Po8AAA=="}}]}} 2025-01-03T16:49:41Z D! [inputs.gnmi] Got update_1735922981156821374: {"update":{"timestamp":"1735922981156821374","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply2"}},{"name":"power-supply"},{"name":"state"},{"name":"output-power"}]},"val":{"bytesVal":"QjIAAA=="}}]}} 2025-01-03T16:49:41Z D! [inputs.gnmi] Got update_1735922981483943425: {"update":{"timestamp":"1735922981483943425","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply1"}},{"name":"power-supply"},{"name":"state"},{"name":"output-power"}]},"val":{"bytesVal":"QlBAAA=="}}]}} 2025-01-03T16:49:46Z D! [inputs.gnmi] Got update_1735922986368663745: {"update":{"timestamp":"1735922986368663745","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply2"}},{"name":"power-supply"},{"name":"state"},{"name":"input-current"}]},"val":{"bytesVal":"Po4AAA=="}}]}} 2025-01-03T16:49:46Z D! [inputs.gnmi] Got update_1735922986368737133: {"update":{"timestamp":"1735922986368737133","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply2"}},{"name":"power-supply"},{"name":"state"},{"name":"output-current"}]},"val":{"bytesVal":"QHGAAA=="}}]}} 2025-01-03T16:49:46Z D! [inputs.gnmi] Got update_1735922986368762428: {"update":{"timestamp":"1735922986368762428","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply2"}},{"name":"power-supply"},{"name":"state"},{"name":"output-voltage"}]},"val":{"bytesVal":"QT/4AA=="}}]}} 2025-01-03T16:49:46Z D! [inputs.gnmi] Got update_1735922986368776845: {"update":{"timestamp":"1735922986368776845","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply2"}},{"name":"power-supply"},{"name":"state"},{"name":"output-power"}]},"val":{"bytesVal":"QjUAAA=="}}]}} 2025-01-03T16:49:46Z D! [inputs.gnmi] Got update_1735922986697451141: {"update":{"timestamp":"1735922986697451141","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply1"}},{"name":"power-supply"},{"name":"state"},{"name":"output-current"}]},"val":{"bytesVal":"QIkAAA=="}}]}} 2025-01-03T16:49:46Z D! [inputs.gnmi] Got update_1735922986697531925: {"update":{"timestamp":"1735922986697531925","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply1"}},{"name":"power-supply"},{"name":"state"},{"name":"output-voltage"}]},"val":{"bytesVal":"QUBoAA=="}}]}} 2025-01-03T16:49:46Z D! [inputs.gnmi] Got update_1735922986697545778: {"update":{"timestamp":"1735922986697545778","update":[{"path":{"elem":[{"name":"components"},{"name":"component","key":{"name":"PowerSupply1"}},{"name":"power-supply"},{"name":"state"},{"name":"output-power"}]},"val":{"bytesVal":"Qk2AAA=="}}]}} psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply2,serial_number=xx,source=172.25.8.33 input_current=">�" 1735922981156731216 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply2,serial_number=xx,source=172.25.8.33 output_power="B2" 1735922981156821374 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply1,serial_number=xx,source=172.25.8.33 output_power="BP@" 1735922981483943425 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply2,serial_number=xx,source=172.25.8.33 input_current=">�" 1735922986368663745 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply2,serial_number=xx,source=172.25.8.33 output_current="@q�" 1735922986368737133 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply2,serial_number=xx,source=172.25.8.33 output_voltage="A?�" 1735922986368762428 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply2,serial_number=xx,source=172.25.8.33 output_power="B5" 1735922986368776845 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply1,serial_number=xx,source=172.25.8.33 output_current="@�" 1735922986697451141 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply1,serial_number=xx,source=172.25.8.33 output_voltage="A@h" 1735922986697531925 psu,device=xx,host=telegraf-01,model_name=DCS-7050CX3-32S,name=PowerSupply1,serial_number=xx,source=172.25.8.33 output_power="BM�" 1735922986697545778
Telegraf 1.33.0 Docker
services: telegraf: image: telegraf:latest container_name: telegraf-01 restart: unless-stopped environment: - GNMI_USERNAME=${GNMI_USERNAME} - GNMI_PASSWORD=${GNMI_PASSWORD} networks: - monitoring volumes: - /root/telegraf-01-config.conf:/etc/telegraf/telegraf.conf:ro - /root/openconfig:/etc/telegraf/openconfig:ro - /root/arista-yang:/etc/telegraf/arista-yang:ro networks: monitoring: external: true
Telegraf to convert the bytesVal into human readable.
gNMI response from yangsuite is:
update { path { elem { name: "components" } elem { name: "component" key { key: "name" value: "PowerSupply1" } } elem { name: "power-supply" } elem { name: "state" } } val { json_ietf_val: "{"openconfig-platform-psu:capacity":"Q/oAAA==","openconfig-platform-psu:input-current":"PqQAAA==","openconfig-platform-psu:input-voltage":"Q22AAA==","openconfig-platform-psu:output-current":"QIrAAA==","openconfig-platform-psu:output-power":"Qk3AAA==","openconfig-platform-psu:output-voltage":"QUAwAA=="}" } } update { path { elem { name: "components" } elem { name: "component" key { key: "name" value: "PowerSupply2" } } elem { name: "power-supply" } elem { name: "state" } } val { json_ietf_val: "{"openconfig-platform-psu:capacity":"Q/oAAA==","openconfig-platform-psu:input-current":"Po0AAA==","openconfig-platform-psu:input-voltage":"Q2PAAA==","openconfig-platform-psu:output-current":"QHGAAA==","openconfig-platform-psu:output-power":"QjUAAA==","openconfig-platform-psu:output-voltage":"QUAwAA=="}" } } }
It converts it to garbage
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.33.0 Docker
Docker
services:
telegraf:
image: telegraf:latest
container_name: telegraf-01
restart: unless-stopped
environment:
- GNMI_USERNAME=${GNMI_USERNAME}
- GNMI_PASSWORD=${GNMI_PASSWORD}
networks:
- monitoring
volumes:
- /root/telegraf-01-config.conf:/etc/telegraf/telegraf.conf:ro
- /root/openconfig:/etc/telegraf/openconfig:ro
- /root/arista-yang:/etc/telegraf/arista-yang:ro
networks:
monitoring:
external: true
Steps to reproduce
...
Expected behavior
Telegraf to convert the bytesVal into human readable.
gNMI response from yangsuite is:
update { path { elem { name: "components" } elem { name: "component" key { key: "name" value: "PowerSupply1" } } elem { name: "power-supply" } elem { name: "state" } } val { json_ietf_val: "{"openconfig-platform-psu:capacity":"Q/oAAA==","openconfig-platform-psu:input-current":"PqQAAA==","openconfig-platform-psu:input-voltage":"Q22AAA==","openconfig-platform-psu:output-current":"QIrAAA==","openconfig-platform-psu:output-power":"Qk3AAA==","openconfig-platform-psu:output-voltage":"QUAwAA=="}" } } update { path { elem { name: "components" } elem { name: "component" key { key: "name" value: "PowerSupply2" } } elem { name: "power-supply" } elem { name: "state" } } val { json_ietf_val: "{"openconfig-platform-psu:capacity":"Q/oAAA==","openconfig-platform-psu:input-current":"Po0AAA==","openconfig-platform-psu:input-voltage":"Q2PAAA==","openconfig-platform-psu:output-current":"QHGAAA==","openconfig-platform-psu:output-power":"QjUAAA==","openconfig-platform-psu:output-voltage":"QUAwAA=="}" } } }
Actual behavior
It converts it to garbage
Additional info
No response
The text was updated successfully, but these errors were encountered: