oneuptime/InfrastructureAgent
Tony An c77cb8cd19 ⬆️ Update dependencies and bump Go version
Updated various dependencies in `go.mod` and `go.sum` to their latest versions, including `golang.org/x/sys`, `github.com/go-co-op/gocron`, and more. Increased the Go version to 1.23.0 and added toolchain specification for Go 1.24.0. These updates improve compatibility, security, and maintainability.
2025-02-27 08:54:28 -06:00
..
model chore: Add CPU core count to CPUMetrics 2024-07-02 13:54:04 +01:00
utils feat: add proxy configuration support to agent and update related functions 2025-01-03 14:55:16 +00:00
windows feat: remove redundant MYENVVAR environment variable from installer templates 2025-01-06 12:39:17 +00:00
.gitignore ♻️ remove the nodejs version agent, rewrite in Golang 2024-05-10 19:37:40 -05:00
.goreleaser.yaml Update GoReleaser to v6.1.0 and increment version in configuration 2024-12-19 20:14:30 +00:00
agent.go feat: improve error logging for secret key validation and add proxy support for HTTP requests 2025-01-03 15:22:35 +00:00
build-msi.sh Fix path separators in build-msi.sh for consistency across platforms 2024-12-23 20:19:11 +00:00
config.go feat: enhance agent configuration logging and save proxy URL 2025-01-03 15:08:57 +00:00
go.mod ⬆️ Update dependencies and bump Go version 2025-02-27 08:54:28 -06:00
go.sum ⬆️ Update dependencies and bump Go version 2025-02-27 08:54:28 -06:00
LICENSE ♻️ remove the nodejs version agent, rewrite in Golang 2024-05-10 19:37:40 -05:00
main.go 🗑️ Refactor service structure for improved code clarity 2025-02-27 08:52:46 -06:00
README.md chore: update README for build instructions and remove unused dependency 2025-01-03 10:04:11 +00:00
shutdown.go Refactor package names and imports in InfrastructureAgent code files 2024-05-13 20:37:27 +01:00

OneUptime Infrastructure Agent

The OneUptime Infrastructure Agent is a lightweight, open-source agent that collects system metrics and sends them to the OneUptime platform. It is designed to be easy to install and use, and to be extensible.

Installation

curl -s https://oneuptime.com/docs/static/scripts/infrastructure-agent/install.sh | bash

Configure the agent

Configure the agent as a system service

  • You can change the host to your own host if you're self hosting the OneUptime platform.
  • You can find the secret key on OneUptime Dashboard. Click on "View Monitor" and go to "Settings" tab.
oneuptime-infrastructure-agent configure --secret-key=YOUR_SECRET_KEY --oneuptime-url=https://oneuptime.com

Starting the agent

oneuptime-infrastructure-agent start

Once its up and running you should see the metrics on the OneUptime Dashboard.

Stopping the agent

oneuptime-infrastructure-agent stop

Restarting the agent

oneuptime-infrastructure-agent restart

Uninstalling the agent

oneuptime-infrastructure-agent uninstall && rm -rf /usr/bin/oneuptime-infrastructure-agent

Supported Platforms

  • Linux
  • MacOS
  • Windows

Development

This section is for developers who want to contribute to the agent. The agent is written in Go.

Building the agent

go mod tidy
go install
go build

Configure the agent

sudo ./oneuptime-infrastructure-agent configure --secret-key=YOUR_SECRET_KEY --oneuptime-url=https://localhost

Starting the agent

sudo ./oneuptime-infrastructure-agent start

Stopping the agent

sudo ./oneuptime-infrastructure-agent stop