influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
15.58k stars 5.64k forks source link

OPCUA 1s interval randomly missing 1 data point #16748

Open ChenitoAf opened 1 month ago

ChenitoAf commented 1 month ago

Relevant telegraf.conf

# Configuration for telegraf agent
[agent]
  ## Default data collection interval for all inputs
  interval = "1s"
  ## Rounds collection interval to 'interval'
  ## ie, if interval="10s" then always collect on :00, :10, :20, etc.
  round_interval = true

  ## Telegraf will send metrics to outputs in batches of at most
  ## metric_batch_size metrics.
  ## This controls the size of writes that Telegraf sends to output plugins.
  metric_batch_size = 5000

  ## Maximum number of unwritten metrics per output.  Increasing this value
  ## allows for longer periods of output downtime without dropping metrics at the
  ## cost of higher maximum memory usage.
  metric_buffer_limit = 50000

  ## Collection jitter is used to jitter the collection by a random amount.
  ## Each plugin will sleep for a random time within jitter before collecting.
  ## This can be used to avoid many plugins querying things like sysfs at the
  ## same time, which can have a measurable effect on the system.
  collection_jitter = "0s"

  ## Default flushing interval for all outputs. Maximum flush_interval will be
  ## flush_interval + flush_jitter
  flush_interval = "1s"
  ## Jitter the flush interval by a random amount. This is primarily to avoid
  ## large write spikes for users running a large number of telegraf instances.
  ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
  flush_jitter = "0s"

  ## By default or when set to "0s", precision will be set to the same
  ## timestamp order as the collection interval, with the maximum being 1s.
  ##   ie, when interval = "10s", precision will be "1s"
  ##       when interval = "250ms", precision will be "1ms"
  ## Precision will NOT be used for service inputs. It is up to each individual
  ## service input to set the timestamp at the appropriate precision.
  ## Valid time units are "ns", "us" (or "µs"), "ms", "s".
  precision = ""

  ## Log at debug level.
  debug = true
  ## Log only error level messages.
  quiet = false

  ## Log target controls the destination for logs and can be one of "file",
  ## "stderr" or, on Windows, "eventlog".  When set to "file", the output file
  ## is determined by the "logfile" setting.
  logtarget = "file"

  ## Name of the file to be logged to when using the "file" logtarget.  If set to
  ## the empty string then logs are written to stderr.
  logfile = "C:/Users/IPC/Documents/telegraf.log"

  ## The logfile will be rotated after the time interval specified.  When set
  ## to 0 no time based rotation is performed.  Logs are rotated only when
  ## written to, if there is no log activity rotation may be delayed.
  # logfile_rotation_interval = "12h"

  ## The logfile will be rotated when it becomes larger than the specified
  ## size.  When set to 0 no size based rotation is performed.
  logfile_rotation_max_size = "20MB"

  ## Maximum number of rotated archives to keep, any older logs are deleted.
  ## If set to -1, no archives are removed.
  logfile_rotation_max_archives = 5

  ## Pick a timezone to use when logging or type 'local' for local time.
  ## Example: America/Chicago
  # log_with_timezone = ""

  ## Override default hostname, if empty use os.Hostname()
  hostname = ""
  ## If set to true, do no set the "host" tag in the telegraf agent.
  omit_hostname = false

Logs from Telegraf

2025-04-09T09:59:40Z D! [outputs.influxdb_v2] Wrote batch of 4864 metrics in 213.5764ms
2025-04-09T09:59:40Z D! [outputs.influxdb_v2] Buffer fullness: 1860 / 50000 metrics
2025-04-09T09:59:41Z D! [outputs.influxdb_v2] Wrote batch of 4724 metrics in 717.0945ms
2025-04-09T09:59:41Z D! [outputs.influxdb_v2] Buffer fullness: 2919 / 50000 metrics
2025-04-09T09:59:41Z D! [outputs.influxdb_v2] Wrote batch of 4584 metrics in 200.5861ms
2025-04-09T09:59:41Z D! [outputs.influxdb_v2] Buffer fullness: 2000 / 50000 metrics
2025-04-09T09:59:42Z D! [outputs.influxdb_v2] Wrote batch of 4724 metrics in 714.959ms
2025-04-09T09:59:42Z D! [outputs.influxdb_v2] Buffer fullness: 2820 / 50000 metrics
2025-04-09T09:59:42Z D! [outputs.influxdb_v2] Wrote batch of 4829 metrics in 240.495ms
2025-04-09T09:59:42Z D! [outputs.influxdb_v2] Buffer fullness: 2120 / 50000 metrics
2025-04-09T09:59:42Z D! [outputs.influxdb_v2] Wrote batch of 4479 metrics in 519.826ms
2025-04-09T09:59:42Z D! [outputs.influxdb_v2] Buffer fullness: 2654 / 50000 metrics
2025-04-09T09:59:43Z D! [outputs.influxdb_v2] Wrote batch of 4691 metrics in 350.3094ms
2025-04-09T09:59:43Z D! [outputs.influxdb_v2] Buffer fullness: 2804 / 50000 metrics
2025-04-09T09:59:44Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 856.9552ms
2025-04-09T09:59:44Z D! [outputs.influxdb_v2] Buffer fullness: 3548 / 50000 metrics
2025-04-09T09:59:44Z W! [agent] ["outputs.influxdb_v2"] did not complete within its flush interval
2025-04-09T09:59:44Z D! [outputs.influxdb_v2] Buffer fullness: 5087 / 50000 metrics
2025-04-09T09:59:44Z D! [outputs.influxdb_v2] Wrote batch of 4788 metrics in 208.063ms
2025-04-09T09:59:44Z D! [outputs.influxdb_v2] Buffer fullness: 1564 / 50000 metrics
2025-04-09T09:59:44Z D! [outputs.influxdb_v2] Wrote batch of 3558 metrics in 617.9833ms
2025-04-09T09:59:44Z D! [outputs.influxdb_v2] Buffer fullness: 3544 / 50000 metrics
2025-04-09T09:59:45Z D! [outputs.influxdb_v2] Wrote batch of 4593 metrics in 200.287ms
2025-04-09T09:59:45Z D! [outputs.influxdb_v2] Buffer fullness: 1995 / 50000 metrics
2025-04-09T09:59:45Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 445.0477ms
2025-04-09T09:59:45Z D! [outputs.influxdb_v2] Buffer fullness: 3268 / 50000 metrics
2025-04-09T09:59:46Z D! [outputs.influxdb_v2] Wrote batch of 3268 metrics in 311.7246ms
2025-04-09T09:59:46Z D! [outputs.influxdb_v2] Buffer fullness: 414 / 50000 metrics
2025-04-09T09:59:46Z D! [outputs.influxdb_v2] Wrote batch of 4719 metrics in 224.5468ms
2025-04-09T09:59:46Z D! [outputs.influxdb_v2] Buffer fullness: 1961 / 50000 metrics
2025-04-09T09:59:46Z D! [outputs.influxdb_v2] Wrote batch of 2435 metrics in 256.3648ms
2025-04-09T09:59:46Z D! [outputs.influxdb_v2] Buffer fullness: 2289 / 50000 metrics
2025-04-09T09:59:47Z D! [outputs.influxdb_v2] Wrote batch of 4833 metrics in 227.861ms
2025-04-09T09:59:47Z D! [outputs.influxdb_v2] Buffer fullness: 2011 / 50000 metrics
2025-04-09T09:59:47Z D! [outputs.influxdb_v2] Wrote batch of 4724 metrics in 514.7729ms
2025-04-09T09:59:47Z D! [outputs.influxdb_v2] Buffer fullness: 2289 / 50000 metrics
2025-04-09T09:59:48Z D! [outputs.influxdb_v2] Wrote batch of 4836 metrics in 207.1944ms
2025-04-09T09:59:48Z D! [outputs.influxdb_v2] Buffer fullness: 1404 / 50000 metrics
2025-04-09T09:59:48Z D! [outputs.influxdb_v2] Wrote batch of 4949 metrics in 390.9824ms
2025-04-09T09:59:48Z D! [outputs.influxdb_v2] Buffer fullness: 2064 / 50000 metrics
2025-04-09T09:59:49Z D! [outputs.influxdb_v2] Wrote batch of 4508 metrics in 197.5372ms
2025-04-09T09:59:49Z D! [outputs.influxdb_v2] Buffer fullness: 1956 / 50000 metrics
2025-04-09T09:59:49Z D! [outputs.influxdb_v2] Wrote batch of 4499 metrics in 491.1662ms
2025-04-09T09:59:49Z D! [outputs.influxdb_v2] Buffer fullness: 2289 / 50000 metrics
2025-04-09T09:59:50Z D! [outputs.influxdb_v2] Wrote batch of 4719 metrics in 292.092ms
2025-04-09T09:59:50Z D! [outputs.influxdb_v2] Buffer fullness: 2756 / 50000 metrics
2025-04-09T09:59:50Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 501.658ms
2025-04-09T09:59:50Z D! [outputs.influxdb_v2] Buffer fullness: 2013 / 50000 metrics
2025-04-09T09:59:51Z D! [outputs.influxdb_v2] Wrote batch of 2013 metrics in 225.7504ms
2025-04-09T09:59:51Z D! [outputs.influxdb_v2] Buffer fullness: 510 / 50000 metrics
2025-04-09T09:59:51Z D! [outputs.influxdb_v2] Wrote batch of 4840 metrics in 212.7721ms
2025-04-09T09:59:51Z D! [outputs.influxdb_v2] Buffer fullness: 2222 / 50000 metrics
2025-04-09T09:59:51Z D! [outputs.influxdb_v2] Wrote batch of 3133 metrics in 303.0833ms
2025-04-09T09:59:51Z D! [outputs.influxdb_v2] Buffer fullness: 1591 / 50000 metrics
2025-04-09T09:59:52Z D! [outputs.influxdb_v2] Wrote batch of 4608 metrics in 240.2677ms
2025-04-09T09:59:52Z D! [outputs.influxdb_v2] Buffer fullness: 2120 / 50000 metrics
2025-04-09T09:59:53Z W! [agent] ["outputs.influxdb_v2"] did not complete within its flush interval
2025-04-09T09:59:53Z D! [outputs.influxdb_v2] Buffer fullness: 8750 / 50000 metrics
2025-04-09T09:59:53Z D! [outputs.influxdb_v2] Wrote batch of 4939 metrics in 216.1159ms
2025-04-09T09:59:53Z D! [outputs.influxdb_v2] Buffer fullness: 1905 / 50000 metrics
2025-04-09T09:59:53Z D! [outputs.influxdb_v2] Wrote batch of 4467 metrics in 1.0998176s
2025-04-09T09:59:53Z D! [outputs.influxdb_v2] Buffer fullness: 5519 / 50000 metrics
2025-04-09T09:59:54Z D! [outputs.influxdb_v2] Wrote batch of 4509 metrics in 196.2734ms
2025-04-09T09:59:54Z D! [outputs.influxdb_v2] Buffer fullness: 2000 / 50000 metrics
2025-04-09T09:59:54Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 1.3835455s
2025-04-09T09:59:54Z D! [outputs.influxdb_v2] Buffer fullness: 6296 / 50000 metrics
2025-04-09T09:59:55Z W! [agent] ["outputs.influxdb_v2"] did not complete within its flush interval
2025-04-09T09:59:55Z D! [outputs.influxdb_v2] Buffer fullness: 8851 / 50000 metrics
2025-04-09T09:59:55Z D! [outputs.influxdb_v2] Wrote batch of 4726 metrics in 203.0288ms
2025-04-09T09:59:55Z D! [outputs.influxdb_v2] Buffer fullness: 2079 / 50000 metrics
2025-04-09T09:59:55Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 927.5554ms
2025-04-09T09:59:56Z W! [agent] ["outputs.influxdb_v2"] did not complete within its flush interval
2025-04-09T09:59:56Z D! [outputs.influxdb_v2] Buffer fullness: 8455 / 50000 metrics
2025-04-09T09:59:56Z D! [outputs.influxdb_v2] Wrote batch of 4722 metrics in 203.7622ms
2025-04-09T09:59:56Z D! [outputs.influxdb_v2] Buffer fullness: 1961 / 50000 metrics
2025-04-09T09:59:56Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 860.6557ms
2025-04-09T09:59:56Z D! [outputs.influxdb_v2] Buffer fullness: 5744 / 50000 metrics
2025-04-09T09:59:57Z D! [outputs.influxdb_v2] Wrote batch of 4844 metrics in 224.1929ms
2025-04-09T09:59:57Z D! [outputs.influxdb_v2] Buffer fullness: 2000 / 50000 metrics
2025-04-09T09:59:57Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 802.2521ms
2025-04-09T09:59:57Z D! [outputs.influxdb_v2] Buffer fullness: 4235 / 50000 metrics
2025-04-09T09:59:57Z D! [outputs.influxdb_v2] Wrote batch of 4235 metrics in 362.2748ms
2025-04-09T09:59:57Z D! [outputs.influxdb_v2] Buffer fullness: 1233 / 50000 metrics
2025-04-09T09:59:58Z D! [outputs.influxdb_v2] Wrote batch of 1233 metrics in 249.5072ms
2025-04-09T09:59:58Z D! [outputs.influxdb_v2] Buffer fullness: 624 / 50000 metrics
2025-04-09T09:59:58Z D! [outputs.influxdb_v2] Wrote batch of 4939 metrics in 257.765ms
2025-04-09T09:59:58Z D! [outputs.influxdb_v2] Buffer fullness: 2121 / 50000 metrics
2025-04-09T09:59:58Z D! [outputs.influxdb_v2] Wrote batch of 2651 metrics in 308.3059ms
2025-04-09T09:59:58Z D! [outputs.influxdb_v2] Buffer fullness: 2073 / 50000 metrics
2025-04-09T09:59:59Z D! [outputs.influxdb_v2] Wrote batch of 4628 metrics in 209.7273ms
2025-04-09T09:59:59Z D! [outputs.influxdb_v2] Buffer fullness: 1881 / 50000 metrics
2025-04-09T09:59:59Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 413.0157ms
2025-04-09T09:59:59Z D! [outputs.influxdb_v2] Buffer fullness: 1797 / 50000 metrics
2025-04-09T10:00:00Z D! [outputs.influxdb_v2] Wrote batch of 1797 metrics in 269.1628ms
2025-04-09T10:00:00Z D! [outputs.influxdb_v2] Buffer fullness: 724 / 50000 metrics
2025-04-09T10:00:00Z D! [outputs.influxdb_v2] Wrote batch of 4699 metrics in 202.1721ms
2025-04-09T10:00:00Z D! [outputs.influxdb_v2] Buffer fullness: 2070 / 50000 metrics
2025-04-09T10:00:00Z D! [outputs.influxdb_v2] Wrote batch of 3319 metrics in 344.9323ms
2025-04-09T10:00:00Z D! [outputs.influxdb_v2] Buffer fullness: 1405 / 50000 metrics
2025-04-09T10:00:01Z D! [outputs.influxdb_v2] Wrote batch of 4724 metrics in 208.9675ms
2025-04-09T10:00:01Z D! [outputs.influxdb_v2] Buffer fullness: 2229 / 50000 metrics
2025-04-09T10:00:02Z D! [outputs.influxdb_v2] Wrote batch of 4295 metrics in 777.1028ms
2025-04-09T10:00:02Z D! [outputs.influxdb_v2] Buffer fullness: 2104 / 50000 metrics
2025-04-09T10:00:02Z D! [outputs.influxdb_v2] Wrote batch of 3985 metrics in 189.2963ms
2025-04-09T10:00:02Z D! [outputs.influxdb_v2] Buffer fullness: 1059 / 50000 metrics
2025-04-09T10:00:02Z D! [outputs.influxdb_v2] Wrote batch of 3403 metrics in 285.2796ms
2025-04-09T10:00:02Z D! [outputs.influxdb_v2] Buffer fullness: 2567 / 50000 metrics
2025-04-09T10:00:03Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 219.0555ms
2025-04-09T10:00:03Z D! [outputs.influxdb_v2] Buffer fullness: 1529 / 50000 metrics
2025-04-09T10:00:03Z D! [outputs.influxdb_v2] Wrote batch of 1529 metrics in 67.1658ms
2025-04-09T10:00:03Z D! [outputs.influxdb_v2] Buffer fullness: 840 / 50000 metrics
2025-04-09T10:00:04Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 709.8601ms
2025-04-09T10:00:04Z D! [outputs.influxdb_v2] Buffer fullness: 2999 / 50000 metrics
2025-04-09T10:00:04Z D! [outputs.influxdb_v2] Wrote batch of 3564 metrics in 163.8863ms
2025-04-09T10:00:04Z D! [outputs.influxdb_v2] Buffer fullness: 1280 / 50000 metrics
2025-04-09T10:00:04Z W! [agent] ["outputs.influxdb_v2"] did not complete within its flush interval
2025-04-09T10:00:04Z D! [outputs.influxdb_v2] Buffer fullness: 5314 / 50000 metrics
2025-04-09T10:00:04Z D! [outputs.influxdb_v2] Wrote batch of 2999 metrics in 519.1173ms
2025-04-09T10:00:04Z D! [outputs.influxdb_v2] Buffer fullness: 3791 / 50000 metrics
2025-04-09T10:00:05Z D! [outputs.influxdb_v2] Wrote batch of 4724 metrics in 209.5625ms
2025-04-09T10:00:05Z D! [outputs.influxdb_v2] Buffer fullness: 2000 / 50000 metrics
2025-04-09T10:00:05Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 651.7054ms
2025-04-09T10:00:05Z D! [outputs.influxdb_v2] Buffer fullness: 4328 / 50000 metrics
2025-04-09T10:00:06Z D! [outputs.influxdb_v2] Wrote batch of 4328 metrics in 309.4501ms
2025-04-09T10:00:06Z D! [outputs.influxdb_v2] Buffer fullness: 295 / 50000 metrics
2025-04-09T10:00:06Z D! [outputs.influxdb_v2] Wrote batch of 4874 metrics in 432.5993ms
2025-04-09T10:00:06Z D! [outputs.influxdb_v2] Buffer fullness: 3419 / 50000 metrics
2025-04-09T10:00:06Z D! [outputs.influxdb_v2] Wrote batch of 2996 metrics in 277.355ms
2025-04-09T10:00:06Z D! [outputs.influxdb_v2] Buffer fullness: 1728 / 50000 metrics
2025-04-09T10:00:07Z D! [outputs.influxdb_v2] Wrote batch of 4574 metrics in 219.9549ms
2025-04-09T10:00:07Z D! [outputs.influxdb_v2] Buffer fullness: 1961 / 50000 metrics
2025-04-09T10:00:07Z D! [outputs.influxdb_v2] Wrote batch of 4283 metrics in 306.8842ms
2025-04-09T10:00:07Z D! [outputs.influxdb_v2] Buffer fullness: 2169 / 50000 metrics
2025-04-09T10:00:08Z D! [outputs.influxdb_v2] Wrote batch of 4934 metrics in 207.7757ms
2025-04-09T10:00:08Z D! [outputs.influxdb_v2] Buffer fullness: 1625 / 50000 metrics
2025-04-09T10:00:08Z D! [outputs.influxdb_v2] Wrote batch of 4559 metrics in 323.5112ms
2025-04-09T10:00:08Z D! [outputs.influxdb_v2] Buffer fullness: 2334 / 50000 metrics
2025-04-09T10:00:09Z D! [outputs.influxdb_v2] Wrote batch of 4459 metrics in 211.4001ms
2025-04-09T10:00:09Z D! [outputs.influxdb_v2] Buffer fullness: 2055 / 50000 metrics
2025-04-09T10:00:09Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 375.976ms
2025-04-09T10:00:09Z D! [outputs.influxdb_v2] Buffer fullness: 2058 / 50000 metrics
2025-04-09T10:00:10Z D! [outputs.influxdb_v2] Wrote batch of 2058 metrics in 231.1788ms
2025-04-09T10:00:10Z D! [outputs.influxdb_v2] Buffer fullness: 56 / 50000 metrics
2025-04-09T10:00:10Z D! [outputs.influxdb_v2] Wrote batch of 4685 metrics in 204.8115ms
2025-04-09T10:00:10Z D! [outputs.influxdb_v2] Buffer fullness: 2094 / 50000 metrics
2025-04-09T10:00:10Z D! [outputs.influxdb_v2] Wrote batch of 3035 metrics in 299.4959ms
2025-04-09T10:00:10Z D! [outputs.influxdb_v2] Buffer fullness: 1689 / 50000 metrics
2025-04-09T10:00:11Z D! [outputs.influxdb_v2] Wrote batch of 4724 metrics in 210.3101ms
2025-04-09T10:00:11Z D! [outputs.influxdb_v2] Buffer fullness: 2094 / 50000 metrics
2025-04-09T10:00:11Z D! [outputs.influxdb_v2] Wrote batch of 4685 metrics in 345.5319ms
2025-04-09T10:00:11Z D! [outputs.influxdb_v2] Buffer fullness: 1728 / 50000 metrics
2025-04-09T10:00:12Z D! [outputs.influxdb_v2] Wrote batch of 5000 metrics in 228.9775ms
2025-04-09T10:00:12Z D! [outputs.influxdb_v2] Buffer fullness: 2043 / 50000 metrics
2025-04-09T10:00:12Z D! [outputs.influxdb_v2] Wrote batch of 2043 metrics in 90.526ms
2025-04-09T10:00:12Z D! [outputs.influxdb_v2] Buffer fullness: 756 / 50000 metrics
2025-04-09T10:00:12Z D! [outputs.influxdb_v2] Wrote batch of 4427 metrics in 306.9589ms
2025-04-09T10:00:12Z D! [outputs.influxdb_v2] Buffer fullness: 2025 / 50000 metrics
2025-04-09T10:00:13Z D! [outputs.influxdb_v2] Wrote batch of 2742 metrics in 119.1452ms
2025-04-09T10:00:13Z D! [outputs.influxdb_v2] Buffer fullness: 675 / 50000 metrics
2025-04-09T10:00:13Z D! [outputs.influxdb_v2] Wrote batch of 4724 metrics in 332.4418ms
2025-04-09T10:00:13Z D! [outputs.influxdb_v2] Buffer fullness: 2025 / 50000 metrics
2025-04-09T10:00:14Z D! [outputs.influxdb_v2] Wrote batch of 4865 metrics in 210.2661ms
2025-04-09T10:00:14Z D! [outputs.influxdb_v2] Buffer fullness: 1301 / 50000 metrics
2025-04-09T10:00:14Z D! [outputs.influxdb_v2] Wrote batch of 4865 metrics in 355.3996ms
2025-04-09T10:00:14Z D! [outputs.influxdb_v2] Buffer fullness: 1884 / 50000 metrics
2025-04-09T10:00:15Z D! [outputs.influxdb_v2] Wrote batch of 4473 metrics in 194.66ms
2025-04-09T10:00:15Z D! [outputs.influxdb_v2] Buffer fullness: 1385 / 50000 metrics
2025-04-09T10:00:15Z D! [outputs.influxdb_v2] Wrote batch of 4412 metrics in 336.7419ms
2025-04-09T10:00:15Z D! [outputs.influxdb_v2] Buffer fullness: 2196 / 50000 metrics
2025-04-09T10:00:16Z D! [outputs.influxdb_v2] Wrote batch of 4904 metrics in 378.4222ms
2025-04-09T10:00:16Z D! [outputs.influxdb_v2] Buffer fullness: 2668 / 50000 metrics

System info

Telegraf V1.33 on windows

Docker

No response

Steps to reproduce

  1. I need to collect about 5000 data points with 1s interval via OPCUA from a PLC into my InfluxDB. I have split them into over 20 measurements, but in the same bucket.
  2. OPCUA Server up and running
  3. InfluxDB up and running
  4. Telegraf (1s) up and running

Expected behavior

Data comes in every 1s.

Actual behavior

Most of the time, the data comes in every 1s. But randomly, it is missing 1 data point in a random measurement.

Image

Image

Sometimes, 1 data point in measurement 1, sometimes in measuremet 2, very random. Even in the same measurement, sometimes, only part of the values are missing this 1 data point, not all of them. (As show from the stack chart below)

Image

From time to time, you can see in the telegraf log file, it couldn't make it in the flush interval.

Additional info

I have tried to increase metric_batch_size and metric_buffer_limit and raised the flush rate with flush_interval and flush_jitter. But so far, this issue keeps pumping up. As a rough idea, it's missing 2-3 data points every minute.

In other applications where I am collecting 1000-2000 data points withs 1s interval, there's no such issue of a missing data point. Only when I increased the data amount, it appeared.

Could you please help me to take a look.

I am flexiable to test any ideas.

Great thanks.

Saddy96 commented 1 month ago

This might be due to a issue on telegraf. I know it stops reading the data from the OPC server in between all of a sudden. I have raised a similar issue to them. May be it requires some extra module handling inside the connector.

ChenitoAf commented 3 weeks ago

I did some more tests.

Image

As shown, so far I noticed that the longest was 2.9s for telegraf to finish the writing process and from time to time, a record like did not complete within its flush interval.

So, I slightly reduced the metric_batch_size and increased flush_jitter a little bit.

The result:

but somehow, record for input like Previous collection has not completed; scheduled collection skipped appeared more often. Yeah, more failures in collecting the data.