Reputation: 1
I have recently tried changing the precision setting in Telegraf to seconds, in order to improve the performance of Influx when storing data. The configuration I used is this: `
/etc/telegraf/telegraf.conf
[global_tags]
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 100000
collection_jitter = "10s"
flush_interval = "10s"
flush_jitter = "10s"
precision = "1s"
debug = false
quiet = false
logfile = ""
hostname = ""
omit_hostname = false
[[outputs.influxdb]]
urls = ["http://192.168.10.9:8086"]
database = "monitoring_v1"
tagexclude = ["influxdb_database"]
[outputs.influxdb.tagpass]
influxdb_database = ["monitoring"]
[[inputs.socket_listener]]
service_address = "udp://0.0.0.0:8094"
data_format = "influx"
content_encoding = "identity"
[inputs.socket_listener.tags]
influxdb_database = "monitoring"
but when it came to checking if the metrics were written in influx I had this error:
2024-04-23T14:11:34Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"2f437ce63472", Flush Interval:10s
2024-04-23T14:11:34Z I! [inputs.socket_listener] Listening on udp://[::]:8094
2024-04-23T14:14:44Z E! [outputs.influxdb] E! [outputs.influxdb] Failed to write metric (will be dropped: 400 Bad Request): partial write: points beyond retention policy dropped=20
The metric format I am using for telegraph is this:
measurement,tag,tag,tag,tag,tag,tag,tag field,field,field,field,field timestamp in seconds (for example 1713874904)
and the retention policies of influx are:
> show retention policies
name duration shardGroupDuration replicaN default
---- -------- ------------------ -------- -------
rp_3d 72h0m0s 24h0m0s 1 true
rp_1w 168h0m0s 24h0m0s 1 false
rp_inf 5376h0m0s 168h0m0s 1 false
rp_infinite 0s 168h0m0s 1 false
Has anyone had the same problem? I must have some configuration wrong in telegraph but I can't find it. thank you!!
Upvotes: 0
Views: 154