์ฌ์ค ์ด๊ฑด ๋ฌธ์ ๊น์ง๋ ์๋๊ณ , ์ข ๋ ์์ธํ๊ฒ ์๊ณ ์ถ์๋ค.
์ ๋ฒ ํฌ์คํ ์์๋ mqtt explorer ์ ์ฐ๊ฒฐ์ ํ๋ค.
[MQTT] mqtt client์ connect ์๋๋ ๋ฌธ์
ec2 instance๋ฅผ ์์ฑํ๊ณ mosquitto๋ฅผ ์คํ์์ผฐ๋ค. ๊ทธ๋ฆฌ๊ณ mqtt connection tool๋ฅผ ์ฌ์ฉํ์ฌ ์ฐ๊ฒฐ์ ์๋ํ๋, ์ฐ๊ฒฐ์ด ๋ถ๊ฐ๋ฅํ๋ค Starting in local only mode. Connections will only possible from clients running on this machine.
bonory.tistory.com
์ฐ๊ฒฐ์ ํ๊ณ ๋ณด๋,
๋ ์ฐ๊ฒฐ๋ง ํ๊ณ ์๋ฌด ๊ฒ๋ ์ํ๋๋ฐ ?! ์๊พธ ๋ช์ด ๊ฐ๊ฒฉ์ผ๋ก message๊ฐ ์์ด๋ ๊ฒ ์ฒ๋ผ ์ซ์๊ฐ ๊ณ์ ๋์ด๋ฌ๋ค.
๋ญ์ง ???????
ํ๋ฒ ํ์ธํด๋ณด๋
mqtt explorer๋ก ์ฒ์ ์ฐ๊ฒฐ์ ์๋ํ ๋ ํ๋จ์ ์๋ ADVANCED ๋ฅผ ํด๋ฆญํ๋ฉด
๊ธฐ๋ณธ์ ์ผ๋ก ์ค์ ๋ 2๊ฐ๋ฅผ ํ์ธํ ์ ์๋ค.
(1) # : subscribe to all topics. (๋ชจ๋ topic์ ๋ชจ๋ ๊ตฌ๋ ํ๋ค.)
(2) $SYS/#
(2)์ ๊ดํด์๋
MQTT Status
MQTT Status. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
์๋ฅผ ์ฝ์ด๋ณด๋ฉด ์กฐ๊ธ์ด๋๋ง ์ดํดํ ์ ์๋ค.
Clients can find information about the broker by subscribing to topics in the $SYS hierarchy as follows. Topics marked as static are only sent once per client on subscription. All other topics are updated every sys_interval seconds. If sys_interval is 0, then updates are not sent.
Note that if you are using a command line client to interact with the $SYS topics and your shell interprets $ as an environment variable, you need to place the topic in single quotes '$SYS/...' or to escape the dollar symbol: $SYS/... otherwise the $SYS will be treated as an environment variable.
>> ํด์
ํด๋ผ์ด์ธํธ๋ ๋ค์๊ณผ ๊ฐ์ด $SYS ๊ณ์ธต ๊ตฌ์กฐ์ ํ ํฝ์ ๊ตฌ๋ ํ์ฌ ๋ธ๋ก์ปค์ ๋ํ ์ ๋ณด๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค. ์ ์ ์ผ๋ก ํ์๋ ํ ํฝ์ ๊ตฌ๋ ์ ํด๋ผ์ด์ธํธ๋น ํ ๋ฒ๋ง ๋ฐ์ก๋ฉ๋๋ค. ๋ค๋ฅธ ํ ํฝ์ sys_interval ์ด๋ง๋ค ์ ๋ฐ์ดํธ๋ฉ๋๋ค. sys_interval์ด 0์ด๋ฉด ์ ๋ฐ์ดํธ๊ฐ ์ ์ก๋์ง ์์ต๋๋ค.
๋ช ๋ น์ค ํด๋ผ์ด์ธํธ๋ฅผ ์ฌ์ฉํ์ฌ $SYS ํ ํฝ๊ณผ ์ํธ ์์ฉํ๊ณ ์ ธ์์ $๋ฅผ ํ๊ฒฝ ๋ณ์๋ก ํด์ํ๋ ๊ฒฝ์ฐ ํ ํฝ์ ๋จ์ผ ๋ฐ์ดํ '$SYS/...'๋ก ๋ฐฐ์นํ๊ฑฐ๋ $SYS/...'์์ ๋ฒ์ด๋์ผ ํฉ๋๋ค. ๊ทธ๋ ์ง ์์ผ๋ฉด $SYS๊ฐ ํ๊ฒฝ ๋ณ์๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค.
>> ์์ฝ
์์คํ ๊ณ์ธต ๊ตฌ์กฐ๋ฅผ ๊ตฌ๋ ํ๋ค! ๋ช ์ด๋ง๋ค ์ ๋ฐ์ดํธ๋๋ฉด์ ๊ณ์ ์ ๋ณด๋ฅผ ๋ณด๋ด์ค๋ ๊ฒ์ด๋ค!
๋ณด๊ธฐ์ซ์ผ๋ฉด ์ฐ๊ฒฐํ ๋ $SYS/# ์ญ์ ํ๊ณ ์ฐ๊ฒฐํ๊ธฐ !! (ํน์ sys_interval์ 0์ผ๋ก ์ค์ ํด๋ผ!)
$SYS/#์ ์ญ์ ํ๊ณ ์ฐ๊ฒฐํด๋ณด์
์ฐ์ ๋ค์ ์ฐ๊ฒฐ ์ง์ , advanced์ Subscription ์์ ๊ธฐ์กด์ ์๋ $SYS/# ์ ์ญ์ ํ๋ค.
์๊น์ ๋ค๋ฅด๋ค.
์ ์งํ๋๋์ง ์๋ฒ์์ ํ๋ฒ ๋ฉ์ธ์ง๋ฅผ ๋ณด๋ด๋ดค๋ค.
(test๋ผ๋ topic์ 15:54๋ผ๋ message๋ฅผ ๋์ง)
์ค ์ ๋๋น ใ ๊ตณ ใ
+ ์ถ๊ฐ๋ก ์๋ ์ฝ์ด๋ณด๋ฉด
MQTT Explorer
An all-round MQTT client that provides a structured topic overview
mqtt-explorer.com
It basically sends: app version, processor architecture, operating system, used memory, user interactions and error stacks.
์ ์ผ ์๋์ ์ด๋ฐ ๋ฌธ๊ตฌ๋ฅผ ๋ณผ ์ ์๋ค.
>> ํด์ : ๊ธฐ๋ณธ์ ์ผ๋ก ์ฑ ๋ฒ์ , ํ๋ก์ธ์ ์ํคํ ์ฒ, ์ด์ ์ฒด์ , ์ฌ์ฉ๋ ๋ฉ๋ชจ๋ฆฌ, ์ฌ์ฉ์ ์ํธ ์์ฉ ๋ฐ ์ค๋ฅ ์คํ์ ๋ณด๋ ๋๋ค.
$SYS/# ์ ํด๋นํ๋ ๊ฒ ๊ฐ๋ค.
'๐ database' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
mysql ๋ฐ์ดํฐ ๋ณ๊ฒฝ ์ค์๊ฐ ํ์ธ ์งํ (3) | 2024.10.20 |
---|---|
mysql ๋ฐ์ดํฐ ๋ณ๊ฒฝ ์ค์๊ฐ ํ์ธ (2) | 2024.10.02 |
[MQTT] mqtt client์ connect ์๋๋ ๋ฌธ์ (0) | 2024.03.06 |
[Redis] Redis์ ๋ํ ๊ฐ๋จํ ์ ๋ฆฌ (0) | 2023.12.04 |
[Flower] Monitoring Celery Tasks using Flower (0) | 2022.06.20 |