Skip to content

Commit

Permalink
docs: update example
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Nov 14, 2023
1 parent 9716263 commit 84c54a9
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 5 deletions.
10 changes: 6 additions & 4 deletions examples/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@ services:
image: emqx:5
container_name: emqx-demo
ports:
- 18084:18084
- 18083:18083
- 1883:1883
- 8083:8083
- 8084:8084
- 8883:8883
environment:
EMQX_API_KEY__BOOTSTRAP_FILE: '"/opt/emqx/data/bootstrap-api"'
EMQX_DASHBOARD__LISTENERS__HTTPS__BIND: 18084
volumes:
- ./bootstrap-api:/opt/emqx/data/bootstrap-api
healthcheck:
test: ["CMD", "emqx", "ctl", "status"]
test: ["CMD", "emqx", "ping"]
interval: 30s
timeout: 10s
retries: 3

emqx-exporter:
depends_on:
- emqx
image: emqx-exporter
image: emqx/emqx-exporter:0.2.3
container_name: exporter-demo
# ports:
# - 8085:8085
ports:
- 8085:8085
volumes:
- ./emqx-exporter.config.yaml:/usr/local/emqx-exporter/bin/config.yaml

Expand Down
20 changes: 19 additions & 1 deletion examples/docker-compose/emqx-exporter.config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
metrics:
target: emqx-demo:18083
api_key: some_api_key
api_secret: some_api_secret
target: emqx-demo:18084
scheme: https
tls_config:
insecure_skip_verify: true
probes:
- target: emqx-demo:1883
- target: emqx-demo:8883
scheme: tls
client_id: my_demo
username: my_demo
password: my_demo
topic: my_demo
qos: 1
tls_config:
insecure_skip_verify: true
- target: emqx-demo:8083/mqtt
scheme: ws
- target: emqx-demo:8084/mqtt
scheme: wss
tls_config:
insecure_skip_verify: true
39 changes: 39 additions & 0 deletions examples/docker-compose/prometheus-emqx5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,42 @@ scrape_configs:
cluster: test
# fix value, don't modify
from: probe
- job_name: 'mqtts-probe'
metrics_path: '/probe'
params:
target:
- "emqx-demo:8883"
scrape_interval: 5s
static_configs:
- targets: [exporter-demo:8085]
labels:
# label the cluster name of where the metrics data from
cluster: test
# fix value, don't modify
from: probe
- job_name: 'ws-probe'
metrics_path: '/probe'
params:
target:
- "emqx-demo:8083/mqtt"
scrape_interval: 5s
static_configs:
- targets: [exporter-demo:8085]
labels:
# label the cluster name of where the metrics data from
cluster: test
# fix value, don't modify
from: probe
- job_name: 'wss-probe'
metrics_path: '/probe'
params:
target:
- "emqx-demo:8084/mqtt"
scrape_interval: 5s
static_configs:
- targets: [exporter-demo:8085]
labels:
# label the cluster name of where the metrics data from
cluster: test
# fix value, don't modify
from: probe

0 comments on commit 84c54a9

Please sign in to comment.