[SOLVED] InfluxDB line protocol: measurements with undescores

influxdb
#1

I have the following problem: I wish to name a measurement 1d_bar.
Using Kapacitor that would be no problem, but the line protocol gives me a headache.

E.g.
POST body: 1d_bar,symbol=“test” o=48.6,h=48.66,l=48.52,c=48.56,v=15826 1504671240
Response: 400 Bad Request
Result: no data inserted/updated

POST body: 1dbar,symbol=“test” o=48.6,h=48.66,l=48.52,c=48.56,v=15940 1504671240
Response: 204 No Content
Result: data is inserted/updated, measurement name is 1dbar

POST body: “1d_bar”,symbol=“test” o=48.6,h=48.66,l=48.52,c=48.56,v=15940 1504671240
Response: 204 No Content
Result: data is inserted/updated, measurement name is “1d_bar”, quotes included

The documentation clearly states that:

  1. Measurements, tag keys, tag values, field keys should never be double quoted (in the case of measurements the quotes become part of the measurement name)
  2. For measurements always use a backslash character \ to escape: commas and spaces
  3. Users do not need to escape all other special characters.

So what’s up with underscore?

#2

Turns out it is not the underscore but a type conflict.

Learned one lesson: always check the body of the responses… :roll_eyes: