Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
ref:mqtt [2022/12/13 22:13] – [Synchronet MQTT Topic Naming and Payload Scheme] digital man | ref:mqtt [2024/01/12 17:30] – [Servers] Add pause and resume server topics 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 " | ||
- | Synchronet message topics start with " | ||
- | All message | + | As enabled and configured in [[util: |
+ | |||
+ | < | ||
+ | ╔══════════════════════════════════════╗ | ||
+ | ║ | ||
+ | ╠══════════════════════════════════════╣ | ||
+ | ║ │Enabled | ||
+ | ║ │Broker Address | ||
+ | ║ │Broker Port | ||
+ | ║ │Username | ||
+ | ║ │Password | ||
+ | ║ │Keep-alive | ||
+ | ║ │Protocol Version | ||
+ | ║ │Publish Verbosity | ||
+ | ║ │Publish QOS 0: At most once ║ | ||
+ | ║ │Subscribe QOS 2: Exactly once ║ | ||
+ | ║ │Log Level | ||
+ | ║ │TLS (encryption) | ||
+ | ╚══════════════════════════════════════╝ | ||
+ | </ | ||
+ | |||
+ | ===== Retention ===== | ||
+ | Most Synchronet MQTT messages are published with the //retain// flag enabled. Retained messages published before a client/ | ||
+ | |||
+ | ===== Topics ===== | ||
+ | Synchronet MQTT message | ||
+ | sbbs/MYBBS = My Brand-new BBS | ||
+ | |||
+ | All leaf topics are published as children of the '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | All MQTT messages published by Synchronet | ||
===== 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 '' |
- | | + | |
- | * node2/ | + | |
- | * node3/ | + | |
- | * node4/ | + | |
- | * node_count | + | |
- | Messages | + | In " |
- | * node#/**status** - tab-delimited node status | + | |
- | * node#/ | + | sbbs/ |
- | * node#/**output** - live output to connected-terminal (for spying) | + | sbbs/ |
- | * node#/**input** - keyboard input to inject into connected-node | + | sbbs/ |
- | * node#/**laston** - tab-delimited details of user to last logoff | + | sbbs/ |
+ | |||
+ | |||
+ | Sub-topics of each '' | ||
+ | |||
+ | * sbbs/+/node/+/**status** - tab-delimited node status | ||
+ | * sbbs/+/node/+/ | ||
+ | * sbbs/+/node/+/**output** - live output to connected-terminal (for spying) | ||
+ | |||
+ | Example: | ||
+ | |||
+ | sbbs/ | ||
+ | sbbs/ | ||
+ | |||
+ | ==== Control ==== | ||
+ | |||
+ | Nodes can be controlled by publishing messages to the following topics: | ||
+ | * sbbs/+/node/+/**input** - keyboard input to inject into connected-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 '' |
- | | + | |
- | | + | |
- | | + | |
- | The control and monitoring | + | The public host name (configured in '' |
- | | + | |
- | * // | + | |
- | * // | + | |
- | * // | + | |
- | * // | + | |
- | * // | + | |
- | * // | + | |
- | Publishing any message to the **recycle** sub-topic of any host topic will initiate a recycling of that host's servers. | + | 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 | ||
===== 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 | ||
+ | |||
+ | The //state// (first field of status) for each server is one of: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | * reloading | ||
+ | * stopping | ||
+ | * disconnected | ||
+ | |||
+ | The server status contains more details/ | ||
Publishing any message to the **recycle** sub-topic of any server topic will initiate a recycling of that server. | Publishing any message to the **recycle** sub-topic of any server topic will initiate a recycling of that server. | ||
+ | Publishing any message to the **pause** sub-topic of any server topic will prevent that server from accepting any new incoming client connections. | ||
+ | Publishing any message to the **resume** sub-topic of any server topic will un-pause that server, returning to the " | ||
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/+/ |
- | * // | + | * sbbs/+/host/+/server/+/**state/#** - server |
- | * //server///**max_clients** | + | * sbbs/ |
- | * //server///**client_count** | + | * sbbs/ |
+ | * sbbs/ | ||
+ | * sbbs/+/host/+/server/+/**served** - total clients served since server was started | ||
+ | * sbbs/+/host/+/server/+/**error_count** - total errors logged since server was started | ||
- | Some servers also track their count of open sockets and running threads (when not 1:1 with their client_count): | + | ==== Logs ==== |
- | * // | + | |
- | * // | + | |
- | ==== Log ==== | + | Each '' |
- | + | ||
- | Each //server// and "event" | + | |
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}} |