Skip to content

bluewave-labs/capture

Repository files navigation

github-license github-repo-size github-commit-activity github-last-commit-data github-languages github-issues-and-prs github-issues go-reference github-actions-lint

An open source hardware monitoring agent

Capture is a hardware monitoring agent that collects hardware information from the host machine and exposes it through a RESTful API. The agent is designed to be lightweight and easy to use.

Capture is only available for Linux.

Docker Installation

Docker installation is recommended for running the Capture. Please see the Docker run flags section for more information.

Pull the image from the registry and then run it with one command.

docker run -v /etc/os-release:/etc/os-release:ro \
    -p 59232:59232 \
    -e API_SECRET=REPLACE_WITH_YOUR_SECRET \
    -d \
    ghcr.io/bluewave-labs/capture:latest

If you don't want to pull the image, you can build and run it locally.

docker buildx build -f Dockerfile -t capture .
docker run -v /etc/os-release:/etc/os-release:ro \
    -p 59232:59232 \
    -e API_SECRET=REPLACE_WITH_YOUR_SECRET \
    -d \
    capture:latest

Docker run flags

Before running the container, please make sure to replace the REPLACE_WITH_YOUR_SECRET with your own secret.

! You need to put this secret to Checkmate's infrastructure monitoring dashboard

  • -v /etc/os-release:/etc/os-release:ro to get platform information correctly
  • -p 59232:59232 to expose the port 59232
  • -d to run the container in detached mode
  • -e API_SECRET=REPLACE_WITH_YOUR_SECRET to set the API secret
  • (optional) -e GIN_MODE=release/debug to switch between release and debug mode
docker run -v /etc/os-release:/etc/os-release:ro \
    -p 59232:59232 \
    -e API_SECRET=REPLACE_WITH_YOUR_SECRET \
    -d \
    ghcr.io/bluewave-labs/capture:latest

System Installation

Pre-built Binaries

You can download the pre-built binaries from the GitHub Releases page.

Go Package

You can install the Capture using the go install command.

go install github.com/bluewave-labs/capture/cmd/capture@latest

Build from Source

You can build the Capture from the source code.

Prerequisites

  • Git is essential for cloning the repository.
  • Go is required to build the project.
  • Just is optional but recommended for building the project with pre-defined commands.

Steps

  1. Clone the repository

    git clone git@github.com:bluewave-labs/capture
  2. Change the directory

    cd capture
  3. Build the Capture

    just build

    or

    go build -o dist/capture ./cmd/capture/
  4. Run the Capture

    ./dist/capture

Environment Variables

Configure the capture with the following environment variables:

Variable Description Required/Optional
PORT The port that the Capture listens on Optional
API_SECRET The secret key for the API Required
GIN_MODE The mode of the Gin framework Optional

Example

Please make sure to replace the default your_secret with your own secret.

! You need to put this secret to Checkmate's infrastructure monitoring dashboard

PORT = your_port
API_SECRET = your_secret
GIN_MODE = release/debug
# API_SECRET is required
API_SECRET=your_secret GIN_MODE=release ./capture

# Minimal required configuration
API_SECRET=your_secret ./dist/capture

API Documentation

Our API is documented in accordance with the OpenAPI spec.

You can find the OpenAPI specifications here

License

Capture is licensed under AGPLv3. You can find the license here