rabbitmq 설치되어 있다는 가정하에
플러그인 먼저 리스트 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
[root@controller ~]# rabbitmq-plugins list Listing plugins with pattern ".*" ... Configured: E = explicitly enabled; e = implicitly enabled | Status: * = running on rabbit@controller |/ [ ] rabbitmq_amqp1_0 3.9.21 [ ] rabbitmq_auth_backend_cache 3.9.21 [ ] rabbitmq_auth_backend_http 3.9.21 [ ] rabbitmq_auth_backend_ldap 3.9.21 [ ] rabbitmq_auth_backend_oauth2 3.9.21 [ ] rabbitmq_auth_mechanism_ssl 3.9.21 [ ] rabbitmq_consistent_hash_exchange 3.9.21 [ ] rabbitmq_event_exchange 3.9.21 [ ] rabbitmq_federation 3.9.21 [ ] rabbitmq_federation_management 3.9.21 [ ] rabbitmq_jms_topic_exchange 3.9.21 [E*] rabbitmq_management 3.9.21 [e*] rabbitmq_management_agent 3.9.21 [ ] rabbitmq_mqtt 3.9.21 [ ] rabbitmq_peer_discovery_aws 3.9.21 [ ] rabbitmq_peer_discovery_common 3.9.21 [ ] rabbitmq_peer_discovery_consul 3.9.21 [ ] rabbitmq_peer_discovery_etcd 3.9.21 [ ] rabbitmq_peer_discovery_k8s 3.9.21 [ ] rabbitmq_prometheus 3.9.21 [ ] rabbitmq_random_exchange 3.9.21 [ ] rabbitmq_recent_history_exchange 3.9.21 [ ] rabbitmq_sharding 3.9.21 [ ] rabbitmq_shovel 3.9.21 [ ] rabbitmq_shovel_management 3.9.21 [ ] rabbitmq_stomp 3.9.21 [ ] rabbitmq_stream 3.9.21 [ ] rabbitmq_stream_management 3.9.21 [ ] rabbitmq_top 3.9.21 [ ] rabbitmq_tracing 3.9.21 [ ] rabbitmq_trust_store 3.9.21 [e*] rabbitmq_web_dispatch 3.9.21 [ ] rabbitmq_web_mqtt 3.9.21 [ ] rabbitmq_web_mqtt_examples 3.9.21 [ ] rabbitmq_web_stomp 3.9.21 [ ] rabbitmq_web_stomp_examples 3.9.21 |
prometheus 플러그인 설치
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@controller ~]# rabbitmq-plugins enable rabbitmq_prometheus Enabling plugins on node rabbit@controller: rabbitmq_prometheus The following plugins have been configured: rabbitmq_management rabbitmq_management_agent rabbitmq_prometheus rabbitmq_web_dispatch Applying plugin configuration to rabbit@controller... The following plugins have been enabled: rabbitmq_prometheus started 1 plugins. |
확인 정상적으로 운영이 된다면 포트 15692 포트 사용
1 2 |
[root@controller ~]# netstat -anp | grep 15692 tcp 0 0 0.0.0.0:15692 0.0.0.0:* LISTEN 1419/beam.smp |
rabbitmq 재시작
1 |
[root@controller ~]# systemctl restart rabbitmq-server.service |
prometheus 추가 및 서비스 재시작
1 2 3 4 5 6 7 |
[root@nas1 ~]# vi /usr/local/prometheus/prometheus.yml - job_name: "rabbitmq" static_configs: - targets: ["10.0.0.11:15692"] [root@nas1 ~]# systemctl restart prometheus.service |
grafana 대시보드 추가
https://grafana.com/grafana/dashboards/10991-rabbitmq-overview/