Duplicate metrics when inserting into InfluxDB

Hello All,

how do I approach if I have a line in the Line Protocol format, want to insert it into InfluxDB, but do not know if these values are already in the database?

Do I first need to query if the metrics already exist (how exactly do I do that)?

Or do I just send my line to the database and if that exact combination of tags, fields and timestamp already exists, it will just be ignored?

Please excuse me if this is a silly question, but I have not been able to find an answer!

Best,
conne914

a point key is made of:

  • timestamp
  • Tag keys AND values
  • field keys

If all of the above already exists an update will happen

Thanks, Giovanni!

I understand it like this: if these three things are identical, no duplicate is inserted, but the existing data point in the database is replaced?! This is exactly the behavior that is favorable for me! :+1: Excellent!

Best,
conne914