Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ref:mqtt [2023/01/04 16:05] – updates for the new nodes/ topic hierarchy digital man | ref:mqtt [2024/07/11 18:37] (current) – [Servers] Add server/+/highwater topic digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== MQTT Topic Naming and Payload Scheme ====== |
Synchronet v3.20 can publish and subscribe to message " | Synchronet v3.20 can publish and subscribe to message " | ||
+ | |||
+ | As enabled and configured in [[util: | ||
< | < | ||
Line 22: | Line 24: | ||
</ | </ | ||
- | Synchronet MQTT message topics start with "sbbs///BBS-ID///" | + | ===== Retention ===== |
+ | Most Synchronet MQTT messages are published | ||
- | All MQTT messages published by Synchronet contain just plain text (US-ASCII characters), | + | ===== Topics ===== |
+ | Synchronet MQTT message topics start with '' | ||
+ | sbbs/MYBBS = My Brand-new BBS | ||
+ | |||
+ | All leaf topics are published as children of the '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | All MQTT messages published by Synchronet contain just plain text (US-ASCII characters), | ||
===== Nodes ===== | ===== Nodes ===== | ||
- | BBS terminal server nodes can be monitored and controlled via MQTT. | + | The BBS's [[server:terminal]] server nodes (servicing terminal connections via Telnet, SSH, RLogin, Raw TCP) can be monitored and controlled via MQTT. |
- | Under the sbbs/// | + | Under the '' |
- | | + | sbbs/MYBBS/node = 4 total |
- | * sbbs/ | + | |
- | * sbbs/ | + | |
- | * sbbs/ | + | |
- | * sbbs/ | + | |
- | In " | + | In " |
- | | + | sbbs/MYBBS/node/1 = Bubbaboy at external program menu via telnet |
- | | + | sbbs/MYBBS/node/2 = At login prompt via telnet |
- | | + | sbbs/MYBBS/node/3 = At login prompt via telnet |
- | | + | sbbs/MYBBS/node/4 = Waiting for connection |
- | Sub-topics of each nodes/+ topic include: | + | Sub-topics of each '' |
- | * sbbs/+/nodes/ | + | * sbbs/+/node/ |
- | * sbbs/+/nodes/ | + | * sbbs/+/node/ |
- | * sbbs/+/nodes/ | + | * sbbs/+/node/ |
- | * sbbs/+/nodes/ | + | |
- | * sbbs/+/nodes/+/**laston** - tab-delimited details of user to last logoff | + | Example: |
+ | |||
+ | sbbs/ | ||
+ | sbbs/ | ||
+ | |||
+ | ==== Control ==== | ||
+ | |||
+ | Nodes can be controlled by publishing messages to the following topics: | ||
+ | * sbbs/+/node/ | ||
+ | * sbbs/+/node/+/**msg** - send a short text message to the node (message should be terminated with a newline character) | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/+/node/ | ||
+ | * sbbs/ | ||
===== Hosts ===== | ===== Hosts ===== | ||
- | A single Synchronet BBS can be split across multiple instances running on separate inter-networked host computers. Each host will be represented with its own sub-topic of the "sbbs/// | + | A single Synchronet BBS can be split across multiple instances running on separate inter-networked host computers. Each host will be represented with its own sub-topic of the '' |
+ | |||
+ | sbbs/ | ||
+ | sbbs/ | ||
+ | sbbs/ | ||
- | * myWindowsPC/ | + | The public host name (configured in '' |
- | | + | |
- | * ubuntu/ | + | |
The control and monitoring of a specific Synchronet instance is done through this "host sub-topic" | The control and monitoring of a specific Synchronet instance is done through this "host sub-topic" | ||
- | Publishing any message to the **recycle** sub-topic of any host topic will initiate a recycling of that host's servers (all of them). | + | ^ Host sub-topic ^ Description |
+ | | recycle | ||
+ | | pause | Publishing any message to the **pause** sub-topic of any host topic will initiate pause that host's servers (all of them), preventing the acceptance of any new incoming client connections. | | ||
+ | | resume | ||
===== Servers ===== | ===== Servers ===== | ||
- | Each Synchronet instance (host) contains the following servers, each represented by its own sub-topic: | + | Each Synchronet instance (host) contains the following servers, each represented by its own sub-topic |
- | * // | + | * sbbs/+/host/+/server/**term** - Terminal Server |
- | * // | + | * sbbs/+/host/+/server/**mail** - Mail Server |
- | * // | + | * sbbs/+/host/+/server/**ftp** - FTP Server |
- | * // | + | * sbbs/+/host/+/server/**web** - Web Server |
- | * // | + | * sbbs/+/host/+/server/**srvc** - Services |
- | Additionally, timed events run by the Terminal Server are represented in the //host///**event/** sub-topic. | + | The //status// of each server is published to its server topic, for example: |
+ | sbbs/MYBBS/host/MYCOMPUTER/server/term = ready 1/5 clients | ||
- | Publishing any message to the **recycle** sub-topic of any server topic will initiate a recycling of that server. | + | The //state// (first field of status) for each server is one of: |
+ | * stopped | ||
+ | * initializing | ||
+ | * ready | ||
+ | * paused | ||
+ | * reloading | ||
+ | * stopping | ||
+ | * disconnected | ||
+ | |||
+ | The server status contains more details/ | ||
+ | |||
+ | ^ Server sub-topic ^ Description | ||
+ | | recycle | ||
+ | | pause | Publishing any message to the **pause** sub-topic of any server topic will prevent that server from accepting any new incoming client connections. | | ||
+ | | resume | ||
Each server topic has the following sub-topics for status reporting: | Each server topic has the following sub-topics for status reporting: | ||
- | * //server/// | + | * sbbs/+/host/+/server/+/ |
- | * //server/// | + | * sbbs/+/host/+/server/+/**state/#** - server |
- | * //server///**max_clients** - maximum number of concurrent clients supported by this server | + | * sbbs/+/host/+/server/+/**client** - current count of connected clients and maximum number of concurrent clients supported by this server |
- | * //server///**served** - total clients | + | * sbbs/+/host/+/server/+/**client/list** - tab-delimited details of all connected |
- | * //server///**error** - last logged error message | + | * sbbs/+/host/+/server/+/**client/ |
- | * //server///**error_count** - total errors logged | + | * sbbs/+/host/+/server/+/**served** - total clients served |
- | * //server///**client_count** - current | + | * sbbs/+/host/+/server/+/**highwater** - highest concurrent client |
- | * //server///**client_list** - tab-delimited details of all connected clients, one client per line | + | * sbbs/+/host/+/server/+/**error_count** - total errors logged since server was started |
- | ==== Log ==== | + | ==== Logs ==== |
- | Each //server// and "event" | + | Each '' |
Log messages published directly to the " | Log messages published directly to the " | ||
- | * //server/// | + | * sbbs/+/host/+/server/+/**log** |
- | * // | + | * sbbs/+/host/+/server/+/**log/#** |
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | |||
+ | ===== Actions ===== | ||
+ | |||
+ | Client actions are published to the following BBS-wide topics: | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | |||
+ | Fields are tab-delimited and begin with a date/time stamp in ISO-8601 format. | ||
+ | |||
+ | ===== Triggers ===== | ||
+ | |||
+ | The Terminal Server' | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
===== See Also ===== | ===== See Also ===== | ||
* [[:ref:|ref index]] | * [[:ref:|ref index]] | ||
+ | * [[: | ||
- | {{tag>}} | + | {{tag>mqtt}} |