Telegraf External plugins for NATS IO messages. This plugin extends the functionality of nats_consumer plugin on telegraf official repo nats_consumer.
-
adding tags from the subjects e.g.,
subject_tags = {"country": 1, "resourcetype": 4}
to add two tags "country"="us","resourcetype"="memory", for all the data from the subject "country.us.type.memory" or "country..type."
CGO_ENABLE=0 go build
./nats_consumer_ext -config nats_consumer_ext.conf