Skip to content

kanshi-dev/agent

Repository files navigation

Kanshi Agent

CI

Kanshi Agent is a small Go service that collects CPU, memory, and disk usage with gopsutil, batches the points in memory, and sends them to Kanshi Core over authenticated gRPC.

collect -> batch -> send -> reconnect and retry when needed

Install

The current stable release is v1.0.0:

curl -fsSL https://kanshi.dev/install.sh |
  KANSHI_VERSION=v1.0.0 sh

Run it with a core address and ingest key:

export KANSHI_CORE_ADDR=your-server:50051
export KANSHI_API_KEY=your-ingest-key
kanshi-agent

For systemd Linux:

curl -fsSL https://kanshi.dev/install.sh |
  sudo KANSHI_VERSION=v1.0.0 \
  KANSHI_CORE_ADDR=your-server:50051 \
  KANSHI_API_KEY=your-ingest-key \
  sh -s -- --systemd

Configuration

Variable Default Description
KANSHI_CORE_ADDR 127.0.0.1:50051 Core gRPC address
KANSHI_API_KEY empty Shared ingest key required by core
KANSHI_INTERVAL 5s Collection cadence
KANSHI_BATCH_MAX 100 Size-triggered flush threshold
KANSHI_FLUSH_EVERY 10s Time-triggered flush
KANSHI_HOST_TAGS empty Comma-separated host tags
KANSHI_LOG_LEVEL info Log level

The agent ID persists in .kanshi-id in the working directory, or in /var/lib/kanshi-agent for the packaged systemd service.

Develop

go run ./cmd/agent
go test ./...
go vet ./...
go build ./...

See the canonical quickstart for the complete stack.

Support and security

Use GitHub issues for public support. Report vulnerabilities through private vulnerability reporting. Kanshi follows semantic versioning from v1.0.0.

About

Lightweight Go agent for Kanshi — collects CPU, memory, and disk metrics and ships them to core over gRPC

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages