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

Add Timestamp to JSON Output in Pipe Mode #23

Open
cwawak opened this issue Feb 10, 2025 · 1 comment
Open

Add Timestamp to JSON Output in Pipe Mode #23

cwawak opened this issue Feb 10, 2025 · 1 comment

Comments

@cwawak
Copy link

cwawak commented Feb 10, 2025

It would be helpful if macmon pipe included a timestamp in its JSON output. Right now, the output provides various system metrics like CPU temperature, memory usage, and power consumption, but there's no way to know exactly when each data point was recorded. Adding a timestamp would make it easier to correlate these metrics with other logs or time-based analysis.

I'd like to see something added like:

"timestamp": "2025-02-10T18:02:23.000Z"

to each JSON object.

This could helps with log correlation and time-series analysis and makes it easier to debug performance issues by seeing when events happened.

Thank you for considering my request! I'm not skilled at coding, but I am happy to help in any way I can.

@vladkens
Copy link
Owner

Hi @cwawak. I can add a timestamp field to the json object. In general, metrics are executed at the same time when you receive them in pipe mode. Like power metrics are collected in multiple samples during the interval period and ram / etc just before sending the message to pipe.

vladkens added a commit that referenced this issue Feb 24, 2025
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

2 participants