InfluxDB安装使用
influxdb简介
启动步骤
服务启停:sudo service influxdb start/stop/restart
安装过程:
1.增加yum源
cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo [influxdb] name = InfluxDB Repository - RHEL \$releasever baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable enabled = 1 gpgcheck = 1 gpgkey = https://repos.influxdata.com/influxdb.key EOF
2.安装并启动
sudo yum install influxdb sudo service influxdb start
使用说明
1.命令行,与数据库操作类似
2.http方式
主要概念:
database 与数据库密码
measurement 类似于table
tags 带索引
fields 字段,无索引
查询时指定时区: select * from t_device where device='99000004' and para='10099' AND time >= '2017-07-18T00:00:00Z' tz('Asia/Shanghai')