Skip to main content

MQTToRRD

Like as MQTT2RRD and it’s forks, MQTToRRD create round robin database files from MQTT messages.

Tool daemon is based on poho-mqtt and python-daemon packages. All dependencies are listed in requirements.txt file. As Python 2.x is deprecated, tool is write for Python 3.5 or more only. For example signal.Signals class is use.

Usage

usage: $(prog)s [options] command

Create round robind database files form MQTT.

positional arguments:
  command               Daemon action (start|stop|restart|status)

optional arguments:
  -h, --help            show this help message and exit
  -c <file>, --config <file>
                        Path to config file.
  -f, --foreground      Run as script on foreground

Install

~# pip3 install mqttorrd

Configuration

[daemon]

data_dir:

Directory to store round robin database files. Default value is /var/lib/mqttorrd.

pid_file:

Path of file with pid. Default value is /var/run/mqttorrd.pid.

user:

Daemon user, default nobody.

group:

Daemon group, default nogroup.

Data directory must be writer with user or group as pid file. Each value from MQTT broker is store to it’s rrd file with path from topic. For example: /var/lib/mqttorrd/garden/pool/temperature.rrd.

[logging]

handler:

Python logging handler. Possible values are file or syslog. When tool is run at foreground, stderr handler is use. On UNIX like systems, WatchedFileHandler is used. Defaults to syslog.

syslog:

Syslog connection, /dev/log by default. LOG_DAEMON facility is used.

file:

Path to log file if file handler is used. Defaults to /var/log/mqttorrd.log.

level:

One of Python logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL. Default value is ERROR.

format:

Logging format. Default value is %(asctime)s %(levelname)s: %(name)s: %(message)s "{%(funcName)s():%(lineno)d}.

[mqtt]

client_id:

MQTT client id. If is not defined, it is generate automatically.

hostname:

Broker hostname, localhost by default.

port:

Broker port, 1883 is allways default.

keepalive:

The keepalive timeout value for the client. Defaults to 60 seconds.

tls:

TLS connection, default False.

ca_certs:

Path to the Certificate Authority certificate. If is not set, system certs path is use.

certfile:

Client public certificate file.

keyfile:

Client primary key file.

username:

Client username

password:

Client password

subscriptions:

Coma separated topics to subscribe. Default value is /#.

[/#]

For any topics could be defined own RRD parameters. MQTT characters like # and + could be use. If new topic message was received,first definition, which is matched is used. If database file is exist yet, only value are update. For more information see https://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html.

step:

Round Robin Database step. Defaults to 60 seconds.

DS:

Data source definition. Default value is DS:{topic}:GAUGE:120:U:U, where {topic} is replaced with file name as last topics part.

RRA:

Value archive definition. Default value is

RRA:AVERAGE:0.5:2:30,
RRA:AVERAGE:0.5:5:288,
RRA:AVERAGE:0.5:30:336,
RRA:AVERAGE:0.5:60:1488,
RRA:AVERAGE:0.5:720:744,
RRA:AVERAGE:0.5:1440:265

Metadata

Release files for mqttorrd 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mqttorrd 0.1.0
File Size Uploaded Provenance Actions
mqttorrd-0.1.0.tar.gz 9.0 kB Without provenance Details for mqttorrd-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mqttorrd 0.1.0
File Interpreter ABI Platform Actions
mqttorrd-0.1.0-py3-none-any.whl Python 3 none any Details for mqttorrd-0.1.0-py3-none-any.whl

Total release size: 20.6 kB

Release files / mqttorrd-0.1.0.tar.gz

Download URL mqttorrd-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
941c4afed0e5939771fd08e3d05427d0aeabc0eda5c9e0b0c1f9bfba5e71da47
BLAKE2b-256 checksum
How to use checksums
e173a517fac656626153046d8897da1c64881d4b12ec2ae235e27a5e229c3563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mqttorrd-0.1.0-py3-none-any.whl

Download URL mqttorrd-0.1.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
613d0602797595d70ead1c73a0fb0643f336ed82b9591ffe237580d8c24c67ef
BLAKE2b-256 checksum
How to use checksums
00884f74c47cbf2d4b345f9f56105e0d486a1fe1e422ba4a25d8676e1ca52393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mqttorrd 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page