Filter data before getting inserted into influxdb

Hi,
Junk values getting inserted in the influxdb measurement, normally 2-3 digit value(24-256) gets inserted but sometimes 13-14 digit junk value(5374782376467388393) getting inserted. Please tell me a way to filter this type of bad values before getting inserted into influxdb.

Thanks in advance

I’m having similar issues with my smart meter readings. I insert the bad readings anyway (1 reading per second) but when I aggregate the values to 5-second values (min/avg/max or whatever makes sense) using continuous queries, I filter out the bad ones using regular WHERE clauses.

Inserted by what, telegraf? If so, there are several telegraf processors that may help you.