influxdata/telegraf

Variable schema for postgressql output plugin

オープン

#16,747 opened on 2025/04/09

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)Go (5,837 件のフォーク)batch import
feature requesthelp wantedsize/s

Repository metrics

Stars
 (17,764 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Use Case

I have a PostgresSQL DB with several schemas. schemaA, schemaB, etc., in which I feed data from sensors through the mqtt_consumer plugin.

After a bit of processing, the measurement names look like "correspondingSchema_sensorName"

Expected behavior

I would like to be able to set the schema-name from a tag, which I would drop afterwards.

Actual behavior

Right now I have to define several outputs, one for each schema:

[[outputs.postgresql]]
namepass = ["schemaA_*"]
schema = "schemaA"

[[outputs.postgresql]]
namepass = ["schemaB_*"]
schema = "schemaB"

Additional info

No response

コントリビューターガイド