Skip to content
Snippets Groups Projects
Commit 38f13b10 authored by Christian Elberfeld's avatar Christian Elberfeld
Browse files

mqtt explorer

parent 2a6a7164
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,7 @@ alert: ...@@ -61,6 +61,7 @@ alert:
- { name: "homeassistant-app-1" } - { name: "homeassistant-app-1" }
- { name: "homeassistant-influxdb-1" } - { name: "homeassistant-influxdb-1" }
- { name: "mqtt-app-1" } - { name: "mqtt-app-1" }
- { name: "mqtt-explorer-1" }
- { name: "mqtt-influxdb-1" } - { name: "mqtt-influxdb-1" }
- { name: "mqtt-tgbinary-1" } - { name: "mqtt-tgbinary-1" }
- { name: "mqtt-tgfloat-1" } - { name: "mqtt-tgfloat-1" }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
with_items: with_items:
- docker-compose.yml - docker-compose.yml
- mosquitto.conf - mosquitto.conf
- settings.json
- telegraf_binary.conf - telegraf_binary.conf
- telegraf_float.conf - telegraf_float.conf
register: config_files register: config_files
......
...@@ -10,6 +10,27 @@ services: ...@@ -10,6 +10,27 @@ services:
- {{ basedir }}/mosquitto.conf:/mosquitto/config/mosquitto.conf - {{ basedir }}/mosquitto.conf:/mosquitto/config/mosquitto.conf
- {{ basedir }}/data:/mosquitto/data - {{ basedir }}/data:/mosquitto/data
- {{ basedir }}/log:/mosquitto/log - {{ basedir }}/log:/mosquitto/log
networks:
- default
explorer:
image: smeagolworms4/mqtt-explorer
restart: always
volumes:
- {{ basedir }}/settings.json:/mqtt-explorer/config/settings.json:ro
environment:
HTTP_PORT: 8080
CONFIG_PATH: "/mqtt-explorer/config"
labels:
- traefik.enable=true
- traefik.http.routers.{{ servicename }}.rule=Host(`{{ domain }}`)
- traefik.http.routers.{{ servicename }}.entrypoints=websecure
- traefik.http.services.{{ servicename }}.loadbalancer.server.port=8080
networks:
- default
- web
influxdb: influxdb:
...@@ -28,6 +49,8 @@ services: ...@@ -28,6 +49,8 @@ services:
DOCKER_INFLUXDB_INIT_ORG: mqtt DOCKER_INFLUXDB_INIT_ORG: mqtt
DOCKER_INFLUXDB_INIT_BUCKET: mqtt DOCKER_INFLUXDB_INIT_BUCKET: mqtt
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: {{ influxdb_token }} DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: {{ influxdb_token }}
networks:
- default
tgbinary: tgbinary:
...@@ -39,6 +62,8 @@ services: ...@@ -39,6 +62,8 @@ services:
- influxdb - influxdb
volumes: volumes:
- "{{ basedir }}/telegraf_binary.conf:/etc/telegraf/telegraf.conf:ro" - "{{ basedir }}/telegraf_binary.conf:/etc/telegraf/telegraf.conf:ro"
networks:
- default
tgfloat: tgfloat:
...@@ -50,3 +75,10 @@ services: ...@@ -50,3 +75,10 @@ services:
- influxdb - influxdb
volumes: volumes:
- "{{ basedir }}/telegraf_float.conf:/etc/telegraf/telegraf.conf:ro" - "{{ basedir }}/telegraf_float.conf:/etc/telegraf/telegraf.conf:ro"
networks:
- default
networks:
web:
external: true
{
"ConnectionManager_connections": {
"mqtt-local": {
"configVersion": 1,
"certValidation": true,
"clientId": "mqtt-explorer",
"id": "mqtt-local",
"name": "MQTT",
"encryption": false,
"subscriptions": [
{
"topic": "#",
"qos": 0
},
{
"topic": "$SYS/#",
"qos": 0
}
],
"type": "mqtt",
"host": "app",
"port": 1883,
"protocol": "mqtt"
}
}
}
...@@ -203,6 +203,7 @@ ...@@ -203,6 +203,7 @@
role: intern/docker_mqtt, tags: [ mqtt, docker_services ], role: intern/docker_mqtt, tags: [ mqtt, docker_services ],
servicename: mqtt, servicename: mqtt,
basedir: /srv/mqtt, basedir: /srv/mqtt,
domain: "mqtt.warpzone.lan",
mqtt_port: 1883, mqtt_port: 1883,
influxdb_port: 18086 influxdb_port: 18086
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment