I am using this telegraf plugin: “postgresql_extensible.query” to get sensor data from postgressql. My telegraf config looks like
# [[inputs.postgresql_extensible.query]]
# sqlquery="SELECT * FROM pg_stat_database"
# version=901
# withdbname=false
# tagvalue=""
# measurement=""
[[inputs.postgresql_extensible.query]]
sqlquery="select temp from temp_utc where mid = 45 order by utc DESC;"
version=901
withdbname=false
tagvalue=""
timestamp="utc"
My table has 4 columns: id, temperature as temp, timestamp with time zone and unix timestamp in integer form. I am setting the timestamp value in inputs plugin to unix timestamp but it is not picking up the right value of sensor instead it is showing the new timestamp.