Použití
https://docs.influxdata.com/influxdb/v1.6/introduction/getting-started/https://docs.influxdata.com/influxdb/v1.6/guides/writing_data/
Docker
https://hub.docker.com/_/influxdb/Na serveru docker2 v aplikaci Mikrocount
docker2:~# docker exec -it mikrocount_influxdb_1 influxVýpis databází
> show DATABASESname: databases
name
----
mikrocount
_internal
Použití databáze
use microcountWalliVýpis tabulek
> show measurementsPokud není žádná tabulka, tak nic nevrátí
Vložení záznamu
INSERT <measurement>[,<tag-key>=<tag-value>...] <field-key>=<field-value>[,<field2-key>=<field2-value>...] [unix-nano-timestamp]
time (a timestamp)
measurement (“cpu_load”, for example
time (a timestamp)
measurement (“cpu_load”, for example
at least one key-value field (the measured value itself, e.g. “value=0.64”, or “temperature=21.2”), and zero to many key-value tags containing any metadata about the value (e.g. “host=server01”, “region=EMEA”, “dc=Frankfurt”).
measurement ... as an SQL table,
time ... the primary index
tags and fields are effectively columns in the table
tags are indexed
fields are not indexed
The difference is that, with InfluxDB, you can have millions of measurements, you don’t have to define schemas up-front, and null values aren’t stored.
The difference is that, with InfluxDB, you can have millions of measurements, you don’t have to define schemas up-front, and null values aren’t stored.
> show measurements
name: measurements
------------------
name
temperature
Výpis obsahu
> SELECT * FROM "temperature"name: temperature
-----------------
time external internal machine type
1548426441483846755 25 37 unit42 assembly
Žádné komentáře:
Okomentovat