Cisco_telemetry_mdt input plugin not able to get source IP via tcp.

Hello Team,

Telegraf plugin as been deployed on our system and It has been connected and has been receiving data from several cisco devices using inputs.cisco_telemetry_mdt.

we are able to receive all telemetry related data in tags in a json formate except one key which is a critical key called the source IP.

Telegraf.conf

###############################################################################
#                            INPUT PLUGINS                                   #
###############################################################################

# Cisco model-driven telemetry (MDT) input plugin for IOS XR, IOS XE and NX-OS platforms
[[inputs.cisco_telemetry_mdt]]
  ## Telemetry transport can be "tcp" or "grpc".  TLS is only supported when
  ## using the grpc transport.
  transport = "tcp"

  ## Address and port to host telemetry listener
  service_address = ":XXXX"

  ## Define (for certain nested telemetry measurements with embedded tags) which fields are tags
  embedded_tags = ["Cisco-IOS-XR-qos-ma-oper:qos/interface-table/interface/input/service-policy-names/service-policy-instance/statistics/class-stats/class-name/`"]
  
  ## Define aliases to map telemetry encoding paths to simple measurement names
  [inputs.cisco_telemetry_mdt.aliases]
   ifstats = "ietf-interfaces:interfaces-state/interface/statistics" 

##Define Property Xformation, please refer README and https://pubhub.devnetcloud.com/media/dme-docs-9-3-3/docs/appendix/ for Model details.
[inputs.cisco_telemetry_mdt.dmes]
  ModTs = "ignore"
  CreateTs = "ignore"
  
###############################################################################
#                            OUTPUT PLUGINS                                   #
###############################################################################

# Configuration for the Kafka server to send metrics to
[[outputs.kafka]]
  ## URLs of kafka brkers
  brokers = ["kafka:9092"]
  ## Kafka topic for producer messages
  topic = "telemetry"
  routing_tag = "kafka"
  data_format = "json"

Telegraf sample output contains

“tags”:{“host”:“abcd”,“interface_name”:“XYZ0/0/0/0”,
“path”:“Cisco-IOS-XR-qos-ma-oper:qos/interface-table/interface/input/service-policy-names/service-policy-instance/statistics”,
“source”:“SourceDeviceName”,“subscription”:“subscription”},“timestamp”:12345678}

Not the Source IP.

After going through the code for cisco telemetry mdt. Unfortunaltely, I can’t find any line adding the source IP to the data point.

Could you please suggest a way to get the field source IP via the telegraf output.

Thank you.
Regards!

Hey!

Is the source IP information reported in the message sent to telegraf or are you referring to the sender of the message? In any case, it would be nice to have this in an issue… Can you please open one and let me know!?
If the message contains the address, please add a reference to the issue showing an example and/or the documentation of that message.

Best regards,

Sven

Hello @srebhan,
Good Morning!

I have already open an issue.
The reference for it - Cisco_telemetry_mdt input plugin not able to get source IP via tcp. · Issue #11386 · influxdata/telegraf · GitHub.

example -

{"Source":"172.XX.XXX.X:ABCD"
"Telemetry":
{"node_id_str":"ABCDEFGH"
"subscription_id_str":"subscription"
"encoding_path":"Cisco-IOS-XR-qos-ma-oper:qos/interface-table/interface/output/statistics"
"collection_id":1234
"collection_start_time":0
"Rows":{"Timestamp":11234356
"Keys":{"interface-name":"XYZPQR"}
.
.
Multiple telemetry keys....,
.
.
.,
"state-description":""}}}

Please let me know if you need any other information.
Thank you,
Best Regards,

Kunal Sisodia