Skip to content

Commit 4fbf556

Browse files
committed
Update documentation
1 parent 715649f commit 4fbf556

File tree

4 files changed

+76
-90
lines changed

4 files changed

+76
-90
lines changed

README.rst

Lines changed: 51 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -56,51 +56,37 @@ A picture says a thousand words.
5656
:target: #
5757

5858

59-
Coverage
60-
========
59+
Notification service coverage
60+
=============================
6161

6262
*mqttwarn* comes with **over 70 notification handler plugins** for a wide
6363
range of notification services and is very open to further contributions.
64-
You can enjoy the alphabetical list of plugins at `mqttwarn notification
65-
services`_.
64+
You can enjoy the alphabetical list of plugins on the `mqttwarn notifier
65+
catalog`_ page.
6666

6767
On top of that, it integrates with the excellent `Apprise`_ notification
6868
library. `Apprise notification services`_ has a complete list of the **80+
6969
notification services** supported by Apprise.
7070

7171

72-
Details
73-
=======
74-
75-
The program, running as a service, subscribes to any number of MQTT topics
76-
(including wildcards) and publishes received payloads to one or more notification
77-
services, including support for notifying more than one distinct service
78-
for the same message.
79-
80-
Notifications are transmitted to the appropriate service via plugins.
81-
*mqttwarn* provides built-in plugins for a number of services and you
82-
can easily add your own.
83-
84-
A more detailed blog post about what mqttwarn can be used for is available
85-
at `How do your servers talk to you?`_.
86-
87-
For example, you may wish to submit an alarm published as text to the
88-
MQTT topic ``home/monitoring/+`` as notification via *e-mail* and *Pushover*.
89-
90-
9172

9273
*************
9374
Documentation
9475
*************
9576

96-
The `handbook`_ is the right place to read all about *mqttwarn*'s features and
97-
service plugins.
77+
The `mqttwarn documentation`_ is the right place to read all about *mqttwarn*'s
78+
features and integrations, and how you can leverage all its framework components
79+
for building custom applications. Its service plugins can be inspected on the
80+
`mqttwarn notifier catalog`_ page.
9881

9982

10083
************
10184
Installation
10285
************
10386

87+
Using pip
88+
=========
89+
10490
Synopsis::
10591

10692
pip install --upgrade mqttwarn
@@ -113,14 +99,10 @@ You can also add support for multiple services, all at once::
11399

114100
pip install --upgrade 'mqttwarn[apprise,asterisk,nsca,desktopnotify,tootpaste,xmpp]'
115101

116-
.. seealso::
117-
118-
:ref:`using-pip`.
119-
102+
See also: `Installing mqttwarn with pip`_.
120103

121-
***************
122-
Container image
123-
***************
104+
OCI container image
105+
===================
124106

125107
For running ``mqttwarn`` on a container infrastructure like Docker or
126108
Kubernetes, corresponding images are automatically published to the
@@ -129,16 +111,16 @@ GitHub Container Registry (GHCR).
129111
- ``ghcr.io/jpmens/mqttwarn-standard:latest``
130112
- ``ghcr.io/jpmens/mqttwarn-full:latest``
131113

132-
To learn more about this topic, please follow up reading the `Docker handbook`_.
114+
To learn more about this topic, please follow up reading the `Using the OCI image
115+
with Docker or Podman`_ documentation section.
133116

134117

135118
*************
136119
Configuration
137120
*************
138121

139-
.. seealso::
140-
141-
:ref:`configure`.
122+
In order to learn how to configure mqttwarn, please head over to the documentation
123+
section about the `mqttwarn configuration`_.
142124

143125

144126
*****
@@ -206,20 +188,17 @@ path to a configuration file.
206188

207189
Running as system daemon
208190
========================
209-
- We recommend to use Supervisor_ for running *mqttwarn* as a service, see also `supervisor.ini`_.
210-
- Alternatively, have a look at `mqttwarn.service`_, the systemd unit configuration file for *mqttwarn*.
211191

192+
There are different ways to run mqttwarn as a system daemon. There are examples
193+
for systemd, traditional init, OpenRC, and Supervisor_ in the ``etc`` directory
194+
of this repository, for example `supervisor.ini`_ (Supervisor) and
195+
`mqttwarn.service`_ (systemd).
212196

213197
Running in a development sandbox
214198
================================
215-
For hacking_ on mqttwarn, please install it in development mode.
216199

217-
218-
****************
219-
Acknowledgements
220-
****************
221-
Thanks to all the contributors of *mqttwarn* who got their hands dirty with it
222-
and helped to co-create and conceive it in one way or another. You know who you are.
200+
For hacking on mqttwarn, please install it in development mode, using a
201+
`mqttwarn development sandbox`_ installation.
223202

224203

225204
*******************
@@ -232,37 +211,36 @@ These links will guide you to the source code of *mqttwarn* and its documentatio
232211

233212
- `mqttwarn on GitHub <https://github.com/jpmens/mqttwarn>`_
234213
- `mqttwarn on the Python Package Index (PyPI) <https://pypi.org/project/mqttwarn/>`_
235-
- `mqttwarn documentation <https://github.com/jpmens/mqttwarn/tree/main/doc>`_
214+
- `mqttwarn documentation <https://mqttwarn.readthedocs.io/>`_
236215

237216

238217
Requirements
239218
============
240219
You will need at least the following components:
241220

242221
* Python 3.x or PyPy 3.x.
243-
* An MQTT broker. We recommend Mosquitto_.
244-
* Some more Python modules to satisfy service dependencies defined in the ``setup.py`` file.
222+
* An MQTT broker. We recommend `Mosquitto`_.
223+
* For invoking specific service plugins, additional Python modules may be required.
224+
See ``setup.py`` file.
245225

246226

247227
Contributing
248228
============
229+
249230
We are always happy to receive code contributions, ideas, suggestions
250231
and problem reports from the community.
251232

252-
So, if you'd like to contribute you're most welcome.
233+
So, if you would like to contribute, you are most welcome.
253234
Spend some time taking a look around, locate a bug, design issue or
254-
spelling mistake and then send us a pull request or create an `issue`_.
235+
spelling mistake, and then send us a pull request or create an `issue`_.
255236

256-
Thanks in advance for your efforts, we really appreciate any help or feedback.
237+
Thank you in advance for your efforts, we really appreciate any help or feedback.
257238

258-
There are also some extensions to mqttwarn not included in the core package.
259-
Yet, they are bundled into another package, ``mqttwarn-contrib``, see also
260-
`community contributions to mqttwarn`_.
261239

240+
License
241+
=======
262242

263-
Licenses
264-
========
265-
This software is copyright © 2014-2023 Jan-Piet Mens and contributors. All
243+
mqttwarn is copyright © 2014-2023 Jan-Piet Mens and contributors. All
266244
rights reserved.
267245

268246
It is and will always be **free and open source software**.
@@ -275,26 +253,25 @@ licenses of third-party components.
275253
***************
276254
Troubleshooting
277255
***************
256+
278257
If you encounter any problems during setup or operations or if you have further
279258
suggestions, please let us know by `opening an issue on GitHub`_. Thank you
280259
already.
281260

282261

283-
*************
284-
Miscellaneous
285-
*************
286-
287-
288-
Press
289-
=====
290-
* The article `MQTTwarn: Ein Rundum-Sorglos-Notifier`_ in German at JAXenter.
291-
* The folks of the Berlin-based beekeeper collective Hiveeyes_ are monitoring their beehives and use *mqttwarn*
292-
as a building block for their alert notification system, enjoy reading `Schwarmalarm using mqttwarn`_.
262+
************
263+
Attributions
264+
************
293265

266+
Acknowledgements
267+
================
268+
Thanks to all the contributors of *mqttwarn* who helped to conceive it in one
269+
way or another. You know who you are.
294270

295271
Legal stuff
296272
===========
297-
"MQTT" is a trademark of the OASIS open standards consortium, which publishes the MQTT specifications.
273+
"MQTT" is a trademark of the OASIS open standards consortium, which publishes
274+
the MQTT specifications.
298275

299276

300277
----
@@ -305,20 +282,21 @@ Have fun!
305282
.. _Apprise: https://github.com/caronc/apprise
306283
.. _Apprise notification services: https://github.com/caronc/apprise/wiki#notification-services
307284
.. _backlog: https://github.com/jpmens/mqttwarn/blob/main/doc/backlog.rst
308-
.. _community contributions to mqttwarn: https://pypi.org/project/mqttwarn-contrib/
309-
.. _Docker handbook: https://github.com/jpmens/mqttwarn/blob/main/DOCKER.md
310285
.. _EPL-2.0: https://www.eclipse.org/legal/epl-2.0/
311286
.. _hacking: https://github.com/jpmens/mqttwarn/blob/main/doc/hacking.rst
312-
.. _handbook: https://github.com/jpmens/mqttwarn/blob/main/HANDBOOK.md
313-
.. _Hiveeyes: https://hiveeyes.org/
314287
.. _How do your servers talk to you?: https://jpmens.net/2014/04/03/how-do-your-servers-talk-to-you/
288+
.. _Installing mqttwarn with pip: https://mqttwarn.readthedocs.io/en/latest/usage/pip.html
315289
.. _issue: https://github.com/jpmens/mqttwarn/issues/new
316290
.. _LICENSE: https://github.com/jpmens/mqttwarn/blob/main/LICENSE
317291
.. _Mosquitto: https://mosquitto.org
318292
.. _MQTTwarn\: Ein Rundum-Sorglos-Notifier: https://web.archive.org/web/20140611040637/http://jaxenter.de/news/MQTTwarn-Ein-Rundum-Sorglos-Notifier-171312
319-
.. _mqttwarn notification services: https://github.com/jpmens/mqttwarn/blob/main/HANDBOOK.md#supported-notification-services
293+
.. _mqttwarn configuration: https://mqttwarn.readthedocs.io/en/latest/configure/
294+
.. _mqttwarn development sandbox: https://mqttwarn.readthedocs.io/en/latest/workbench/sandbox.html
295+
.. _mqttwarn documentation: https://mqttwarn.readthedocs.io/
296+
.. _mqttwarn notifier catalog: https://mqttwarn.readthedocs.io/en/latest/notifier-catalog.html
320297
.. _mqttwarn.service: https://github.com/jpmens/mqttwarn/blob/main/etc/mqttwarn.service
321298
.. _opening an issue on GitHub: https://github.com/jpmens/mqttwarn/issues/new
322299
.. _Schwarmalarm using mqttwarn: https://hiveeyes.org/docs/system/schwarmalarm-mqttwarn.html
323300
.. _Supervisor: https://jpmens.net/2014/02/13/in-my-toolbox-supervisord/
324301
.. _supervisor.ini: https://github.com/jpmens/mqttwarn/blob/main/etc/supervisor.ini
302+
.. _Using the OCI image with Docker or Podman: https://mqttwarn.readthedocs.io/en/latest/usage/oci.html

docs/configure/topic.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ more meaningful example in this regard.
155155
The [](#processing-frigate-events) tutorial used a configuration snippet like this.
156156
```ini
157157
[frigate/cam1/goat/snapshot]
158-
targets = store-jpeg:cam1-goat
158+
targets = store-image:cam1-goat
159159
[frigate/cam2/squirrel/snapshot]
160-
targets = store-jpeg:cam2-squirrel
160+
targets = store-image:cam2-squirrel
161161
```
162162

163163
Using [](#templated-targets), this can be condensed like this, not needing to
@@ -166,7 +166,7 @@ repeat each and every slot to be addressed. Of course, it needs a corresponding
166166
transformation data.
167167
```ini
168168
[frigate/+/+/snapshot]
169-
targets = store-jpeg:{camera}-{label}
169+
targets = store-image:{camera}-{label}
170170
```
171171

172172

docs/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ What others are saying about mqttwarn, or what they are using it for.
9393
- `How do your servers talk to you?`_
9494
- `Alerting or notifying on SSH logins`_
9595
- `MQTTwarn\: Ein Rundum-Sorglos-Notifier`_ article in German at JAXenter.
96-
- `Schwarmalarm using mqttwarn`_.
96+
- The folks of the Berlin-based beekeeper collective `Hiveeyes`_ are monitoring
97+
their beehives and use *mqttwarn* as a building block for their alert
98+
notification system, enjoy reading `Schwarmalarm using mqttwarn`_.
9799

98100

99101
*****
@@ -146,6 +148,7 @@ the MQTT specifications.
146148
.. _Alerting or notifying on SSH logins: https://jpmens.net/2018/03/25/alerting-on-ssh-logins/
147149
.. _Apprise: https://github.com/caronc/apprise
148150
.. _Apprise notification services: https://github.com/caronc/apprise/wiki#notification-services
151+
.. _Hiveeyes: https://hiveeyes.org/
149152
.. _How do your servers talk to you?: https://jpmens.net/2014/04/03/how-do-your-servers-talk-to-you/
150153
.. _Introducing mqttwarn\: a pluggable MQTT notifier: https://jpmens.net/2014/02/17/introducing-mqttwarn-a-pluggable-mqtt-notifier/
151154
.. _JP: https://jpmens.net/pages/about/

docs/workbench/backlog.rst

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ Iteration +1
99

1010
Bugs
1111
====
12-
- [o] ``--config-file`` option does not work
1312
- [o] Documentation vs. code: Clarify and/or fix logic of "filter" function
1413
https://github.com/jpmens/mqttwarn/issues/637
15-
- [o] Fallback for ``mqttwarn make-samplefuncs``
1614

1715
Features
1816
========
19-
- [o] ntfy: Encode HTTP headers with RFC 2047
20-
- [o] ntfy: https://docs.ntfy.sh/publish/#access-tokens
21-
- [o] ntfy: https://docs.ntfy.sh/publish/#list-of-all-parameters
2217
- [o] Start even when MQTT broker is not available
18+
19+
Maintenance
20+
===========
21+
- [o] mqttwarn/util.py:5: DeprecationWarning: the imp module is deprecated in favour of importlib
22+
- [o] pytest-mqtt: Truncate message output
2323
- [o] Remove deprecated ``mqttwarn.services.apprise``
2424

2525
Documentation » Tech
@@ -70,12 +70,15 @@ Documentation » Content
7070
- [o] Add documentation snippet to ntfy, à la https://docs.ntfy.sh/examples/#traccar, but for OwnTracks
7171
- [o] Tutorial: MQTT topic rewriting with mqttwarn
7272
- [o] Tutorial: Periodic MOTD notifier with ntfy
73+
- [o] Document ``mqttwarn.util``, like ``load_file()``
74+
- [o] Refactor "README » Running as system daemon" into documentation.
75+
- [o] Re-add::
76+
77+
There are also some extensions to mqttwarn not included in the core package.
78+
Instead, they are bundled into another package, ``mqttwarn-contrib``, see also
79+
`community contributions to mqttwarn`_.
7380

74-
Frigate example
75-
===============
76-
- [x] Improve topic decoding
77-
``frigate/cam1/goat/snapshot`` should be decoded like ``frigate/<camera>/<label>/snapshot``
78-
- [o] Rename ``frigate.{py,ini}`` to ``mqttwarn-frigate.{py,ini}``?
81+
.. _community contributions to mqttwarn: https://pypi.org/project/mqttwarn-contrib/
7982

8083

8184
************
@@ -91,6 +94,8 @@ Iteration +2
9194
- The path to the "templates" folder must be specified using command line argument or environment variable.
9295
Otherwise, look nearby the configuration file /path/to/mqttwarn.ini, so use /path/to/templates.
9396
- Integrate existing template .j2 files into example folder?
97+
- [o] Think about introducing mqttwarn "applications", made of user-defined function files,
98+
and corresponding configurations.
9499
- [o] Add some entrypoints
95100

96101
- Wire ``contrib/amqp-puka-get.py`` to ``mqttwarn --plugin=amqp --command=subscribe``
@@ -173,6 +178,6 @@ Goals for 2.0.0
173178
- [o] Configuration and source tree file watcher like ``pserve ... --reload``
174179

175180

176-
.. _autoconf: http://guide.munin-monitoring.org/en/latest/develop/plugins/plugin-concise.html#autoconf
177-
.. _Munin: http://munin-monitoring.org/
178-
.. _suggest: http://guide.munin-monitoring.org/en/latest/develop/plugins/plugin-concise.html#suggest
181+
.. _autoconf: https://guide.munin-monitoring.org/en/latest/develop/plugins/plugin-concise.html#autoconf
182+
.. _Munin: https://munin-monitoring.org/
183+
.. _suggest: https://guide.munin-monitoring.org/en/latest/develop/plugins/plugin-concise.html#suggest

0 commit comments

Comments
 (0)