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

Telegraf Support with Basic Metric Alarms #4515

Open
johnny-de opened this issue Feb 21, 2024 · 3 comments
Open

Telegraf Support with Basic Metric Alarms #4515

johnny-de opened this issue Feb 21, 2024 · 3 comments
Labels
area:monitor Everything related to monitors feature-request Request for new features to be added type:new proposing to add a new monitor

Comments

@johnny-de
Copy link

πŸ“‘ I have found these related issues/pull requests

I checked and didn't find similar feature request.

🏷️ Feature Request Type

New monitor

πŸ”– Feature description

I would like to propose the implementation of Telegraf support and the addition of basic metric alarms for RAM, CPU, and disk space in Uptimekuma. This enhancement aims to simplify monitoring tasks, particularly in home lab environments where existing solutions are very complicated and difficult to implement, especially for beginners. With notifications already in place within Uptimekuma, users can seamlessly manage and respond to alerts without the need for additional tools or configurations.

Proposal:

  • Enable Uptimekuma to receive metrics from Telegraf, a common data collection agent.
  • Configure Telegraf to push metrics to existing Uptimekuma endpoints via HTTP, preferably in JSON format for ease of handling.
  • Provide users with the ability to set alarm limits for RAM, CPU, and disk space metrics.

βœ”οΈ Solution

Getting Telegraf set up is quite easy:
1 β€” Install Telegraf as described on the official website. Select Ubuntu & Debian as platforms.
https://www.influxdata.com/downloads/
2 β€” Open configuration.
sudo nano /etc/telegraf/telegraf.conf
Remove or rename the following lines in the configuration.

metric_buffer_limit = 0
...
hostname = "[IP-ADRESS]"
...
[[outputs.http]]
   url = "[UPTIMEKUMA HTTP ENDPOINT:PORT]"
   data_format = "json"

3 β€” Start telegraph
sudo systemctl start telegraf

Messages will arrive in JSON format. After some formatting it can look like this, where you just have to find the appropriate parameters and use them.
image

❓ Alternatives

I haven't found a solution as simple as Uptimekuma.

πŸ“ Additional Context

Great project. Thank you for all the work everyone is putting in here!

@johnny-de johnny-de added the feature-request Request for new features to be added label Feb 21, 2024
@CommanderStorm CommanderStorm added area:monitor Everything related to monitors type:new proposing to add a new monitor labels Feb 21, 2024
@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Feb 21, 2024

If the service has an API endpoint where these JSON objects can be queried, the json-query-monitor can be used to monitor said API.

If this is not the case, any implementation should likely use the engine from the json-query monitor.
We plan to do some maintenance work in this area, see #3919 for the concrete proposal.

If by "would like to propose the implementation" meant that you'd like to implement this, here is our contribution guide.

@johnny-de johnny-de closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2024
@johnny-de
Copy link
Author

Thanks for clarifying. I mistakenly thought suggesting functions without programming itself was an option, but I understand now. I'll review the source code to see if I can contribute. If I'm up for it, I'll reach out again, but that may take a while. Thanks for the info.

@CommanderStorm
Copy link
Collaborator

Suggesting features without programming itself is one of the options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors feature-request Request for new features to be added type:new proposing to add a new monitor
Projects
None yet
Development

No branches or pull requests

2 participants