Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
monitors:submqttm [2020/11/13 12:19] – [Installation] wnelis | monitors:submqttm [2020/11/13 12:43] – [Installation] wnelis | ||
---|---|---|---|
Line 19: | Line 19: | ||
=== Client side === | === Client side === | ||
- | The source modules submqttm.py and watchdog.py shown in the next chapter are to be installed in directory / | + | The source modules submqttm.py and watchdog.py shown in the next chapter are to be installed in directory / |
Service submqttm is defined by creating a file named / | Service submqttm is defined by creating a file named / | ||
+ | < | ||
[Unit] | [Unit] | ||
Description=Xymon client with MQTT input | Description=Xymon client with MQTT input | ||
Line 38: | Line 38: | ||
[Install] | [Install] | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
- | + | </ | |
- | Continuously running, as the topics can arrive at any time. | + | |
- | Tests with mode ' | + | Once file submqttm.service is created, the following two commands are needed to activate the script: |
+ | < | ||
+ | sudo systemctl start submqttm | ||
+ | sudo systemctl enable submqttm | ||
+ | </ | ||
+ | |||
+ | Note that though the script is running continuously, | ||
=== Server side === | === Server side === | ||
- | xymonserver.cfg | + | For the initial client, which monitors the throughput of one MQTT broker, two extensions of the xymon server configuration are needed. First, |
- | graphs.cfg | + | |
+ | < | ||
+ | TEST2RRD+=", | ||
+ | GRAPHS_mqtt=" | ||
+ | </ | ||
+ | |||
+ | Secondly, | ||
+ | |||
+ | < | ||
+ | [mqtttm] | ||
+ | TITLE , MQTT message rate | ||
+ | YAXIS Throughput [p/s] | ||
+ | -l 0 | ||
+ | DEF: | ||
+ | DEF: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | |||
+ | [mqttto] | ||
+ | TITLE , MQTT bit rate | ||
+ | YAXIS Throughput [b/s] | ||
+ | -l 0 | ||
+ | DEF: | ||
+ | DEF: | ||
+ | CDEF: | ||
+ | CDEF: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | </ | ||
+ | |||
+ | A small note: typically I'll end each TITLE-line with two spaces. This results in a bigger separation between the title and the date-range, which improves the readability of the top line in the graph. Those two trailing spaces are missing in the above definition of the graphs. | ||
===== Source ===== | ===== Source ===== |