Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT plugin: option to disable unix timestamps on values. #4302

Open
3ricj opened this issue Apr 23, 2024 · 1 comment
Open

MQTT plugin: option to disable unix timestamps on values. #4302

3ricj opened this issue Apr 23, 2024 · 1 comment

Comments

@3ricj
Copy link

3ricj commented Apr 23, 2024

  • Version of collectd: 5.12.0
  • Operating system / distribution: OpenWRT
  • Kernel version (if applicable): N/a

Expected behavior

The MQTT plugin would report data up to the server in friendly way for reduced traffic/storage and easier parsing by industry standard MQTT subscribers. For example:

collectd/bob/memory/memory-wired 1714962432
collectd/bob/memory/memory-active 9526575104

Actual behavior

The MQTT Plugin sends data with a unix timestamp on EVERY value - for complex installs this results in massive overhead, plus most MQTT installs don't use this information and drop it on the floor. In fact, most installs use the time of arrive for most reporting and charting. Additionally, most MQTT tools (eg: MQTT Explorer) are unable to parse this format preventing things like charts from being displayed. I understand this is a common method which collectd uses, but the MQTT world doesn't.

collectd/bob/memory/memory-wired 1448840558.555:1714962432
collectd/bob/memory/memory-active 1448840558.555:9526575104

I would like to propose an option which could be placed in the collectd.conf file which would disable all of these unix timestamps on every value.

Steps to reproduce

  • Setup any MQTT plugin and observe the output.
@3ricj
Copy link
Author

3ricj commented Apr 23, 2024

Additionally: There seems to be an an errant \n at the end of the timestamp value pair. This should also be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant