栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Grafana + InfluxDB + Mosquitto

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Grafana + InfluxDB + Mosquitto

这里写自定义目录标题
  • Install services
    • Install grafana
    • Install InfluxDB
    • Install mosquitto
  • Run services
    • mosquitto
    • 运行influxdb
    • 运行grafana
  • 构建应用

Install services Install grafana
$ sudo docker pull grafana/grafana
Install InfluxDB
$  sudo docker pull influxdb
Install mosquitto
$ sudo docker pull eclipse-mosquitto
Run services mosquitto
  1. 运行mosquitto容器
$ sudo docker run -d --name mqtt -p 1883:1883 -p 9002:9001 -v /home/ubuntu/hugh/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto
  1. 设置用户名和密码
  • 进入容器
$ sudo docker exec -it mqtt sh
# /mosquitto # touch pwfile
# /mosquitto # chmod 0777 pwfile
# mosquitto_passwd -b /mosquitto/pwfile hugh 123456
# exit
  • 配置mosquitto.conf
# listener port-number [ip address/host name]
listener 1883
allow_anonymous false
password_file /mosquitto/pwfile

listener 1883, 必须加,否则如下错误

Starting in local only mode. Connections will only be possible from clients running on this machine.
  • 重启容器
$ sudo docker restart d0b2e4122e51
  1. 测试mosquitto
    这里使用的mqtt测试工具为chrome插件mqttbox
  • mqtt配置
  • 测试

    至此mqtt安装结束
运行influxdb
$ sudo docker run -d --name influxdb1  -p 8083:8083 -p 8086:8086 influxdb:1.8.10

最新的版本很难用, 还是用1.8.10的版本.

运行grafana
$ docker run -d --name=grafana -p 3000:3000 grafana/grafana
构建应用

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/613299.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号