influxdb-client

通过

sudo apt-cache search influx

找到了一个客户端工具

influxdb-client - command line interface for InfluxDB

直接安装

sudo apt install influxdb-client

influx
Connected to http://localhost:8086 version v2.2.0
InfluxDB shell version: 1.6.7~rc0
> help
Usage:
connect <host:port> connects to another node specified by host:port
auth prompts for username and password
pretty toggles pretty print for the json format
chunked turns on chunked responses from server
chunk size <size> sets the size of the chunked responses. Set to 0 to reset to the default chunked size
use <db_name> sets current database
format <format> specifies the format of the server responses: json, csv, or column
precision <format> specifies the format of the timestamp: rfc3339, h, m, s, ms, u or ns
consistency <level> sets write consistency level: any, one, quorum, or all
history displays command history
settings outputs the current settings for the shell
clear clears settings such as database or retention policy. run 'clear' for help
exit/quit/ctrl+d quits the influx shell show databases show database names
show series show series information
show measurements show measurement information
show tag keys show tag key information
show field keys show field key information A full list of influxql commands can be found at:
https://docs.influxdata.com/influxdb/latest/query_language/spec/
> connect 192.168.0.5:8086
> auth
username: admin
password:
> show databases
name: databases
name
----
mydata
_internal
graphite
> use mydata
Using database mydata
> select time,a0 from data_tt limit 10
name: data_tt
time a0
---- --
0 -0.91
0 -0.91
0 -0.91
0 -1.24
0 -1.24
0 -1.25
0 -1.35
0 -1.35
0 -1.35
0 -1.38

还有一种方法就是在浏览器其直接访问:

http://192.168.0.5:8086/query?db=mydata&q=select a0 from data_tt limit 10

在浏览器内会提示输入用户名称和密码,就可以显示查询到的数据

{"results":[{"statement_id":0,"series":[{"name":"data_tt","columns":["time","a0"],"values":[["1970-01-01T00:00:00Z","-0.91"],["1970-01-01T00:00:00Z","-0.91"],["1970-01-01T00:00:00Z","-0.91"],["1970-01-01T00:00:00Z","-1.24"],["1970-01-01T00:00:00Z","-1.24"],["1970-01-01T00:00:00Z","-1.25"],["1970-01-01T00:00:00Z","-1.35"],["1970-01-01T00:00:00Z","-1.35"],["1970-01-01T00:00:00Z","-1.35"],["1970-01-01T00:00:00Z","-1.38"]]}]}]}

最新文章

  1. ceph hadoop spark 大数据处理
  2. 设计模式之单例模式Singleton(三创建型)
  3. SQL SERVER 2012 从Enterprise Evaluation Edtion 升级到 Standard Edtion SP1
  4. 除了白名单外的IP每秒最多处理 8 个请求 limit_conn_zone
  5. Android FM模块学习之四源码学习(2)
  6. zabbix网络发现
  7. NoSQL数据库有哪些
  8. 批处理脚本修改hosts文件指定域名解析IP
  9. Setting Up the ADT Bundle
  10. JAVA Timer定时器使用方法(二)
  11. MyBatis-进阶2
  12. 【BZOJ4025】二分图
  13. selenium java maven自动化测试环境搭建
  14. mysql数据安装问题汇总
  15. 文本相似度分析(基于jieba和gensim)
  16. SqlServer代理(已禁用代理xp)
  17. 解决方案:System.InvalidOperationException: 此实现不是 Windows 平台 FIPS 验证的加密算法的一部分。
  18. BZOJ 2530 Poi2011 Party 【枚举】
  19. 解决区间第K大的问题的各种方法
  20. Loadrunner Analysis之Web Page Diagnostics

热门文章

  1. 教你快速做一个自己的“ChatGPT”
  2. hdfs file system shell的简单使用
  3. C语言数据结构串的表示与操作的实现
  4. js控制关闭layui的switch开关
  5. cximage菜单(Mirror)
  6. vue动态绑定类名
  7. C#获取enum描述信息
  8. springbooot 序列化对象配置
  9. web实践4
  10. 使用elemeng-plus控制台报错:$weight