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"]]}]}]}

linux下influx客户端使用的更多相关文章

  1. Linux下librdkafka客户端的编译运行

    Linux下librdkafka客户端的编译运行 librdkafka是一个开源的Kafka客户端C/C++实现,提供了Kafka生产者.消费者接口. 由于项目需要,我要将Kafka生产者接口封装起来 ...

  2. Linux 下 简单客户端服务器通讯模型(TCP)

    原文:Linux 下 简单客户端服务器通讯模型(TCP) 服务器端:server.c #include<stdio.h> #include<stdlib.h> #include ...

  3. linux下MongoDB客户端shell基本操作

    MongoDB 是一款NoSql数据库,没有固定的模式,即同一个集合中的不同文档结构可以不同,如:第一条记录{name:”xiaoming”},第二条记录:{name:”xiaoli”,age:15} ...

  4. (转)Linux下 SVN客户端安装

    原地址:http://rtxbc.iteye.com/blog/860092 今天有现场程序连svn服务器一直有异常,于是在现场linux下安装svn client来直接测试,看问题原因: 一:安装s ...

  5. Linux下onvif客户端获取ipc摄像头 GetServices:获取媒体地址(有的h265摄像头必须要这个接口)

    GetServices:获取媒体地址(有些h265的摄像头必须用到这个接口,得到获取能力时没获取到的另一个媒体地址) 鉴权:但是在使用这个接口之前是需要鉴权的.ONVIF协议规定,部分接口需要鉴权,部 ...

  6. Linux下onvif客户端关于ipc摄像头的搜索

    设备搜索:要访问一个IPC摄像头,或者说要调用IPC摄像头提供的WEB服务接口,就要先知道其IP地址,这就是设备发现的过程,或者叫设备搜索的过程.IPC摄像头用的是239.255.255.250(端口 ...

  7. Linux下onvif客户端获取h265 IPC摄像头的RTSP地址

    1. 设备搜索,去获取webserver 的地址 ,目的是在获取能力提供服务地址,demo:https://www.cnblogs.com/croxd/p/10683429.html 2. GetCa ...

  8. Linux下onvif客户端获取ipc摄像头 GetStreamUri:rtsp地址(h264、h265)

    GetStreamUri:rtsp地址 鉴权:但是在使用这个接口之前是需要鉴权的.ONVIF协议规定,部分接口需要鉴权,部分接口不需要鉴权,在调用需要鉴权的接口时不使用鉴权,会导致接口调用失败.实现鉴 ...

  9. Linux下onvif客户端获取ipc摄像头 获取能力:GetCapabilities

    GetCapabilities:获取能力,主要目的获取设备能力信息(获取媒体服务地址) 鉴权:但是在调用获取设备能力之前是需要鉴权的.ONVIF协议规定,部分接口需要鉴权,部分接口不需要鉴权,在调用需 ...

  10. Linux下onvif客户端获取ipc摄像头 GetProfiles:获取h265媒体信息文件

    GetProfiles:获取媒体信息文件 鉴权:但是在使用这个接口之前是需要鉴权的.ONVIF协议规定,部分接口需要鉴权,部分接口不需要鉴权,在调用需要鉴权的接口时不使用鉴权,会导致接口调用失败.实现 ...

随机推荐

  1. sort()排序以及多个属性数组对象排序(按条件排序)

    原生排序 let arr = [5,2,1,4,9,8] for(let i = 0 ; i < arr.length ; i ++) { for(let j = 0 ; j < arr. ...

  2. 有趣的python库-pyttsx3

    pyttsx3-语音播报功能 基本使用: import pyttsx3 px = pyttsx3.init() px.say("hello world") px.runAndWai ...

  3. LG P2617 Dynamic Rankings

    \(\text{Problem}\) 动态区间第 \(k\) 小 Dynamic Rankings \(\text{Analysis}\) 整体二分 原本一个询问可二分,但多个询问效率太低 考虑离线, ...

  4. LeetCode算法训练-回溯 491.递增子序列 46.全排列 47.全排列 II

    欢迎关注个人公众号:爱喝可可牛奶 LeetCode算法训练-回溯 491.递增子序列 46.全排列 47.全排列 II LeetCode 491. 递增子序列 分析 找出并返回所有数组中不同的递增子序 ...

  5. ABP微服务学习系列-修复System.Text.Json不支持序列化Exception

    前面我们已经把服务都启动了,然后我们试试请求API.发现请求出现500 返回错误 System.NotSupportedException: Serialization and deserializa ...

  6. windows-sam文件

    sam文件是账号密码的数据库文件 存放位置C:\Windows\System32\Config\sam

  7. redis-centOS系统的环境安装

    近期要简单汇总一下Redis常用的方法,依赖环境配置,在网上看到一篇比较好的Redis环境搭建博客,分享给大家.因新版本Redis已不支持windowns,环境安装以centOS系统为主. 参考博客地 ...

  8. VMware-查看虚拟机版本

    [root@localhost /]# uname -a Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22: ...

  9. 看了这本基础教程的书籍你还担心你的python学不好吗?

    python基础教程(第二版)PDF高清版免费下载地址: 提取码:chcj 值得花时间阅读的一本书 内容简介  · · · · · · 本书是经典教程的全新改版,作者根据Python 3.0版本的种种 ...

  10. 【Direct3D 12】什么是Direct3D 12

    什么是DirectX? Microsoft DirectX是一套图形API,可以用来创建游戏和高性能的图形应用.DirectX支持2D和3D图形. 什么是Direct3D 12? Direct3D是D ...