Influxdb Analysis in go Monitoring Scheme
This article introduces the relevant knowledge of "influxdb analysis in go monitoring scheme". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
influxdb
InfluxDB is an open-source time-series database developed in GO language, especially suitable for processing and analyzing time-series related data such as resource monitoring data.
name: census-----------------time butterflies honeybees location scientist2015-08-18T00:00:00Z 1 30 1 Perpetua structure timestamp timestamp
Since it is a time series database, the data of influxdb has a column named time, which stores UTC timestamp.
The time of each data record is also the main index automatically generated by the database.
If no timestamp is provided for a point, InfluxDB assigns a local current timestamp when the point is fetched.
field key, field value, field set
FluxDB consists of field key and field value.
The set of field key and field value pairs is called a field set.
In influxdb, fields must be present.
Note that fields have no index. If you use fields as query criteria, all field values that meet the query criteria will be scanned, and the performance is not as good as tag. For example, fields are SQL columns without indexes.
tag key, tag value, tag set tag
Tag consists of tag key and tag value.
tag key and tag value pairs form a tag set
tags are optional,
However, it is strongly recommended that you use it, because tags are indexed, and tags are equivalent to indexed columns in SQL.
tag value can only be string type measurement
Measurement is a container for fields, tags, and time columns, equivalent to tables in SQL.
select
Database names are used. Double quotes are used when connecting queries, not normally required
select * from "counter.count""influxdb analysis in go monitoring scheme" is introduced here. Thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!