Telegraf/InfluxDB - Split integer into boolean/bit values

Hi everybody!
I’ve the following situation: I’m using Telegraf to get data from ModBUS and store into InfluxDB.
One metric is a Integer number that they are really boolean/bit values all together.
For example, int 9 are true (1), false (0), false (0) and true (1) values.
Which is the best aproach to get that Integer, and save it againt into InfluxDB as separate bit/boolean values?
Installed tools are Telegraf, InfluxDB and Kapacitor. Also it have Grafana but would nice to have a post-processed boolean values saved into InfluxDB for later analytics with another tools.
Thanks in advance!!

Yes that is possible in Telegraf.
And I would also definitely do this in Telegraf before it ends up in InfluxDB!

You need a processor plugin for that.

Unfortunately, afaik with the standard plugins this should not be possible.
I would solve it with a processors.starlark or processors.execd plugin.

1 Like

Thanks Franky! I’ll check your recommendations and see what I could do.

I’ll update the thread with news.

Hello. Did you succeed in splitting integer into bits using Telegraf?