Drop measurement?

Hello,

I have a situation where I started to graph some SNMP inputs. After review I choose the wrong OID, so I changed the value, but now on influxDB i got a data type issue :

2024-11-04T13:34:35Z E! [outputs.influxdb] E! [outputs.influxdb] Failed to write metric (will be dropped: 400 Bad Request): partial write: field type conflict: input field “socket_connections” on measurement “snmp” is type string, already exists as type integer dropped=1

Indeed initial snmp oid was integer, now I am using an OID which is STRING.

In this scenario, I would like to drop the old measurement is this doable ? Or the other solution is to change the name of the snmp input, but this seems like not good to me.

thank you

You have 3 options

  • Delete the data points in the interested time range
  • drop the measurement… quite extreme as you will lose all the data in there but also quick and clean
  • wait for a new shard to be created, datatypes are consistent per shard (shard duration is specified in the retention policy)
    this means old and new data will have a datatype mismatch
1 Like