telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Multiple instances of plugin mixing values

Open klashagel opened this issue 8 years ago • 1 comments

I have multiple instances of same plugin running , each polling the data from a separate controller. When i have only one instance the system is working fine, but when i add additional instances the values written to Influxdb are randomly getting mixed up when save. I had all initially all values going to the same measurement and have also tried different measurement with same result. I thought it could be a timing issue overwriting the values so i set precision to "1ns" but still same issue. If i do a single shot with telegraf the values are read correctly but it seems they are mixed up when flushed to influxdb. Any help or ideas would be appreciated

Ex [[inputs.bpi]] ipaddress ="192.168.0.10:503 name_override ="A1" [inputs.bpi.tags] ctype ="CON1" field = "A1"

[[inputs.bpi]] ipaddress ="192.168.0.20:503 name_override ="A2" [inputs.bpi.tags] ctype ="CON2" field = "A2"

EDIT Added a jitter of 1s which seems to have solved the issue. Still don't understand how values can be mixed up between the plugins when written to influxdb. Polling each controller with plugin takes about 30ms but with a precision set to 1ns the readings should have different timestamps

klashagel avatar Oct 19 '18 09:10 klashagel

Make sure it isn't using any shared package level variables that might be inadvertently shared when ran concurrently. I might be able to say more if I saw the code for this plugin.

danielnelson avatar Oct 19 '18 18:10 danielnelson