EMQX¶
EMQX collection、topics、subsriptions、message、packet 관련 메트릭 정보를 수집합니다.
설치 및 설정¶
EMQX 메트릭¶
EMQX 기본 노출 메트릭 포트는 18083이며, 브라우저에서 메트릭 관련 정보를 확인할 수 있습니다: http://clientIP:18083/api/v5/prometheus/stats.
DataKit 수집기 설정¶
EMQX는 metrics URL을 직접 노출하므로 prom 수집기로 바로 수집할 수 있습니다.
조정 내용은 다음과 같습니다:
[[inputs.prom]]
## Exporter URLs.
urls = ["http://clientIP:18083/api/v5/prometheus/stats"]
source = "emqx"
keep_exist_metric_name = true
## Customize tags.
[inputs.prom.tags]
job = "emqx"
...
문서에 따라 위의 매개변수를 조정합니다.
DataKit 다시 시작¶
메트릭¶
메트릭 세트 emqx¶
통계¶
| 메트릭 | 설명 |
|---|---|
| emqx_connections_count | 현재 연결 수 |
| emqx_topics_count | 현재 토픽 수 |
emqx_suboptions_count |
즉 subscriptions_count |
| emqx_subscribers_count | 현재 구독자 수 |
| emqx_cluster_nodes_running | 클러스터 running 상태의 node |
| emqx_cluster_nodes_stopped | 클러스터 stop 상태의 node |
메시지 (PUBLISH 패킷)¶
| 메트릭 | 설명 |
|---|---|
| emqx_messages_received | 클라이언트로부터 수신한 메시지 수이며, messages.qos0.received, messages.qos1.received 및 messages.qos2.received의 합과 같습니다 |
| emqx_messages_sent | 클라이언트로 전송한 메시지 수이며, messages.qos0.sent, messages.qos1.sent 및 messages.qos2.sent의 합과 같습니다 |
| emqx_messages_dropped | EMQX 내부에서 구독 프로세스로 전달되기 전에 버려진 메시지 총수 |
바이트 (Bytes)¶
| 메트릭 | 설명 |
|---|---|
| emqx_bytes_received | 수신한 바이트 수 |
| emqx_bytes_sent | 전송한 바이트 수 |
패킷 (Packets)¶
| 메트릭 | 설명 |
|---|---|
| emqx_packets_connect | 수신한 CONNECT 패킷 수 |
| emqx_packets_connack_sent | 전송한 CONNACK 패킷 수 |
| emqx_packets_connack_error | 원인 코드가 0x00이 아닌 CONNACK 패킷 수이며, 이 지표의 값은 packets_connack_auth_error 값보다 크거나 같습니다 |
| emqx_packets_connack_auth_error | 원인 코드가 0x86 및 0x87인 CONNACK 패킷 수 |
| emqx_packets_disconnect_sent | 전송한 DISCONNECT 패킷 수 |
| emqx_packets_disconnect_received | 수신한 DISCONNECT 패킷 수 |
| emqx_packets_publish_received | 수신한 PUBLISH 패킷 수 |
| emqx_packets_publish_sent | 전송한 PUBLISH 패킷 수 |
| emqx_packets_publish_error | 수신한, 발행할 수 없는 PUBLISH 패킷 수 |
| emqx_packets_publish_dropped | 수신 제한을 초과해 버려진 PUBLISH 패킷 수 |
| emqx_packets_subscribe_received | 수신한 SUBSCRIBE 패킷 수 |
| emqx_packets_subscribe_error | 수신한 구독 실패 SUBSCRIBE 패킷 수 |
emqx_packets_suback_sent |
전송한 SUBACK 패킷 수 |
| emqx_packets_unsubscribe_received | 수신한 UNSUBSCRIBE 패킷 수 |
| emqx_packets_unsubscribe_error | 수신한 구독 취소 실패 UNSUBSCRIBE 패킷 수 |
자세한 메트릭 정보는 공식 문서를 참고하세요