influxdata/telegraf

Use payload key to define MongoDB Collection for Output

Open

#11.756 aperta il 4 set 2022

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Go (4161 fork)batch import
feature requesthelp wantedsize/m

Metriche repository

Star
 (9892 star)
Metriche merge PR
 (Merge medio 2g 12h) (136 PR mergiate in 30 g)

Descrizione

Use Case

Currently the influxdb_v2 has a configurable "bucket_tag" property in the output configuration which allows for a payload tag to determine the bucket that the data is written to in InfluxDB. We use this tag to isolate metrics for sane retrieval later on.

It would be great if the MongoDB output had the option for a "collection_tag" which would allow for sorting of data into easily retrievable collections, rather than needing to aggregate multiple collections on retrieval.

Expected behavior

"collection_tag" in configuration defines the collection that the data is written to. (same behaviour as the influxdb_v2 bucket_tag)

Actual behavior

Currently the collection name seems to be defined by a key 'device_id' which separates every device into a separate collection making aggregate queries (queries with more than one device) unweildy.

Additional info

I am sure that for a Go programmer this would be a trivial change... but I'm having some difficulties wrapping my head around where the changes need to be made to allow for the change. Otherwise this would be a PR.

Guida contributor