How to parse NX-API with telegraf

Hi, I’m doing research on the best telemetry system. Currently, I’m starting from this guide and I would like to replace pipeline with telegraph for more input compatibility. I’ve found this which uses telegraf but its using the yang encoding in the switches instead of nx-api (as in the first guide).
The question is: how can I parse the data in telegfraf from nx-api format before sending them to influxdb like pipeline which is using metrics.json?
Ps: I’m not an expert and this is all new for me (edited)

Hello @stefanoromanello,
Have you had a chance to take a look at the execd processor plugin?
I think that might be helpful to you.

Hi thanks for the answer! Another user in slack suggests me to use telegraf_gnmi and use it also for parsing the data like this:

    addresses = [""]
    username = <redacted>
    password = <redacted>

    ## redial in case of failures after
    redial = "10s"
    tagexclude = ["openconfig-network-instance:/network-instances/network-instance/protocols/protocol/name"]

        origin = "openconfig-interfaces"
        path = "/interfaces/interface"

        subscription_mode = "sample"
        sample_interval = "10s"

        name = "bgp_neighbor"
        origin = "openconfig-network-instance"
        path = "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state"

        subscription_mode = "sample"
        sample_interval = "10s"

Full guide at Monitor Your Network With gNMI, SNMP, and Grafana | The NTC Mag
What do you think?

1 Like

Hello @stefanoromanello,
looks good to me!