Is it possible to INSERT
data into series / measurements using the SQL-like interface on InfluxDB?
Asked
Active
Viewed 2.6k times
8

Ryan Leach
- 4,262
- 5
- 34
- 71
1 Answers
8
Yes, you can simply INSERT
a Line Protocol string.
An example from Getting Started:
INSERT cpu,host=serverA,region=us_west value=0.64
A point with the measurement name of cpu
and tags host
and region
has now been written to the database, with the measured value
of 0.64
.
-
2Since "value" a keyword, I think it would be clearer if it were uppercased in this example (to show newbies that it's not just another tag name) – Ben Slade Dec 28 '18 at 18:39
-
1Can i insert multiple values like value=0.64, value1=100?? – Hacker Apr 29 '19 at 16:23
-
@BenSlade `value` is not a keyword. It's the name of your "field". (`cpu` is the "measurement".) You can name your fields whatever you like, e.g. `temp`. @Hacker yes you can have many, e.g. `load_avg=0.64,temp=90`. – Paul A Jungwirth Oct 13 '20 at 21:12