# Install EMQX plugin (eg. install emqx_prometheus
plugin)
# Requirements
- Install EMQX Operator successfully
- Install EMQX CR successfully
# Configure emqx_prometheus
plugin
cat << "EOF" | kubectl apply -f -
apiVersion: apps.emqx.io/v1beta3
kind: EmqxPlugin
metadata:
name: emqx-prometheus
namespace: default
spec:
selector:
"foo": "bar"
pluginName: emqx_prometheus
config:
"prometheus.push.gateway.server": "http://prometheus-pushgateway.prom.svc.cluster.local:9091"
EOF
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# Check status for emqx_prometheus
plugin
kubectl get emqxplugins.apps.emqx.io | grep prometheus
emqx-prometheus 2m37s
1
2
2
# Check status in EMQX instance
kubectl exec -it emqx-0 -- emqx_ctl plugins list | grep prometheus
Plugin(emqx_prometheus, description=Prometheus for EMQ X, active=true)
1
2
2