Hello,
I try to make Telegraf export multiple counters, which arrive at the same time interval and don’t have unique tags. By default, this makes Telegraf to overwrite all counters with the last one.
This is from a raw capture, e.g. “infront of” Telegraf. It show the number of unique counters in a batch. The file is also attached here.
$ grep counter-name -A 4 np_stats_raw.txt | sed "/}\|{\|name\|--/d" | sort | uniq | wc -l 76
The unmodified understanding of Telegraf for tags/fields. This combination of tags is not unique across the different counters in the same batch.
{"fields":{"nodes/node/nps/np/counters/np_counter/counter_index":2046,"nodes/node/nps/np/counters/np_counter/counter_name":"UNKNOWN_L2_ON_L3_DISCARD","nodes/node/nps/np/counters/np_counter/counter_type":"FWD","nodes/node/nps/np/counters/np_counter/counter_value":108,"nodes/node/nps/np/counters/np_counter/rate":0},"name":"np_stats",
"tags":{“host”:“prod-lab-jump02”,“node_name”:“0/0/CPU0”,“np_name”:“np0”,“path”:“Cisco-IOS-XR-asr9k-np-oper:/hardware-module-np/nodes/node/nps/np/counters”,“source”:“asr-1”},"timestamp":1589291734}
Adopting a unique field as a tag: This, unfortunately, doesn’t change anything, the export includes only the last counter’s data.
{"fields":{"nodes/node/nps/np/counters/np_counter/counter_index":2046,"nodes/node/nps/np/counters/np_counter/counter_type":"FWD","nodes/node/nps/np/counters/np_counter/counter_value":108,"nodes/node/nps/np/counters/np_counter/rate":0},"name":"np_stats",
"tags":{“host”:“prod-lab-jump02”,“node_name”:“0/0/CPU0”,“nodes/node/nps/np/counters/np_counter/counter_name”:“UNKNOWN_L2_ON_L3_DISCARD”,“np_name”:“np0”,“path”:“Cisco-IOS-XR-asr9k-np-oper:/hardware-module-np/nodes/node/nps/np/counters”,“source”:“asr-1”},"timestamp":1589348462}
Can you help me understand, what I miss here, please?
np_stats_raw.txt.gz (42.5 KB)