Skip to content

Commit

Permalink
docs: update monitor task
Browse files Browse the repository at this point in the history
  • Loading branch information
logo306142054 authored and Rory-Z committed Apr 25, 2023
1 parent ecb96dd commit 6e806a4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 29 deletions.
31 changes: 17 additions & 14 deletions docs/en_US/tasks/configure-emqx-prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ EMQX supports exposing indicators through the http interface. For all statistica

```yaml
apiVersion: apps.emqx.io/v1beta4
kind: EmqxPlugin
metadata:
name: emqx-prometheus
spec:
selector:
# EMQX pod labels
apps.emqx.io/instance: emqx-ee
apps.emqx.io/managed-by: emqx-operator
# enable plugin emqx_prometheus
pluginName: emqx_prometheus
---
apiVersion: apps.emqx.io/v1beta4
kind: EmqxEnterprise
metadata:
name: emqx-ee
Expand Down Expand Up @@ -106,6 +94,21 @@ NAME STATUS AGE
emqx-ee Running 8m33s
```

If you are deploying EMQX 4.4 open-source, you need to enable plugin `emqx_prometheus` by `EmqxPlugin` CRD:

```shell
cat << "EOF" | kubectl apply -f -
apiVersion: apps.emqx.io/v1beta4
kind: EmqxPlugin
metadata:
name: emqx-prometheus
spec:
selector:
# EMQX pod labels
${replace_with_your_emqx_pod_label} : label_value
pluginName: emqx_prometheus
```

:::
::::

Expand Down Expand Up @@ -155,8 +158,8 @@ spec:
image: emqx-exporter:latest
imagePullPolicy: IfNotPresent
args:
# "emqx-dashboard" is the default service name that creating by operator for exposing 18083 port
- --emqx.nodes=emqx-dashboard:18083
# "emqx-dashboard-service-name" is the service name that creating by operator for exposing 18083 port
- --emqx.nodes=${emqx-dashboard-service-name}:18083
- --emqx.auth-username=${paste_your_new_api_key_here}
- --emqx.auth-password=${paste_your_new_secret_here}
securityContext:
Expand Down
32 changes: 17 additions & 15 deletions docs/zh_CN/tasks/configure-emqx-prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,8 @@ emqx emqx:5.0 Running 10m
::: tab v1beta4

EMQX 支持通过 http 接口对外暴露指标,集群下所有统计指标数据可以参考文档:[HTTP API](https://www.emqx.io/docs/zh/v4.4/advanced/http-api.html#%E7%BB%9F%E8%AE%A1%E6%8C%87%E6%A0%87)

```yaml
apiVersion: apps.emqx.io/v1beta4
kind: EmqxPlugin
metadata:
name: emqx-prometheus
spec:
selector:
# EMQX pod labels
apps.emqx.io/instance: emqx-ee
apps.emqx.io/managed-by: emqx-operator
# enable plugin emqx_prometheus
pluginName: emqx_prometheus
---
apiVersion: apps.emqx.io/v1beta4
kind: EmqxEnterprise
metadata:
name: emqx-ee
Expand Down Expand Up @@ -106,6 +93,21 @@ NAME STATUS AGE
emqx-ee Running 8m33s
```

如果你部署的是 EMQX 4.4 开源版, 则需要通过 `EmqxPlugin` CRD 开启`emqx_prometheus` 插件:

```shell
cat << "EOF" | kubectl apply -f -
apiVersion: apps.emqx.io/v1beta4
kind: EmqxPlugin
metadata:
name: emqx-prometheus
spec:
selector:
# EMQX pod labels
${replace_with_your_emqx_pod_label} : label_value
pluginName: emqx_prometheus
```

:::
::::

Expand Down Expand Up @@ -155,8 +157,8 @@ spec:
image: emqx-exporter:latest
imagePullPolicy: IfNotPresent
args:
# "emqx-dashboard" is the default service name that creating by operator for exposing 18083 port
- --emqx.nodes=emqx-dashboard:18083
# "emqx-dashboard-service-name" is the service name that creating by operator for exposing 18083 port
- --emqx.nodes=${emqx-dashboard-service-name}:18083
- --emqx.auth-username=${paste_your_new_api_key_here}
- --emqx.auth-password=${paste_your_new_secret_here}
securityContext:
Expand Down

0 comments on commit 6e806a4

Please sign in to comment.