MCPcopy Index your code
hub / github.com/9corp/9volt

github.com/9corp/9volt @v0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1 ↗ · + Follow
472 symbols 1,054 edges 126 files 89 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

9volt

Build Status Go Report Card

A modern, distributed monitoring system written in Go.

Another monitoring system? Why?

While there are a bunch of solutions for monitoring and alerting using time series data, there aren't many (or any?) modern solutions for 'regular'/'old-skool' remote monitoring similar to Nagios and Icinga.

9volt offers the following things out of the box:

  • Single binary deploy
  • Fully distributed
  • Incredibly easy to scale to hundreds of thousands of checks
  • Uses etcd for all configuration
  • Real-time configuration pick-up (update etcd - 9volt immediately picks up the change)
  • Interval based monitoring (ie. run check XYZ every 1s, 1y, 1d or even 1ms)
  • Natively supported monitors:
    • TCP
    • HTTP
    • Exec
  • Natively supported alerters:
    • Slack
    • Pagerduty
    • Email
  • RESTful API for querying current monitoring state and loaded configuration
  • Comes bundled with a web app for a quick visual view of the cluster:
    • ./9volt-web -s 9volt-server-1.example.com, 9volt-server-2.example.com
  • Comes bundled with a binary tool to parse YAML based configs and push/sync them to etcd

Usage

  • Install/setup etcd
  • Download latest 9volt release
  • For first time setup, run ./scripts/setup.sh
  • Start server: ./9volt -e http://etcd-server-1.example.com:2379 http://etcd-server-2.example.com:2379 http://etcd-server-3.example.com:2379
  • Optional: add 9volt to be managed by supervisord, upstart or some other process manager

H/A and scaling

Scaling 9volt is incredibly simple. Launch another 9volt service on a separate host and point it to the same etcd hosts as the main 9volt service.

Your main 9volt node will produce output similar to this when it detects a node join:

node join

Checks will be automatically divided between the all 9volt instances.

If one of the nodes were to go down, a new leader will be elected (if the node that went down was the previous leader) and checks will be redistributed among the remaining nodes.

This will produce output similar to this (and will be also available in the event stream via the API and UI):

node-leave

API

API documentation can be found here.

Minimum requirements (can handle ~1,000-3,000 <10s interval checks)

  • 1 x 9volt instance (1 core, 256MB RAM)
  • 1 x etcd node (1 core, 256MB RAM)

Note In the minimum configuration, you could run both 9volt and etcd on the same node.

Recommended (production) requirements (can handle 10,000+ <10s interval checks)

  • 3 x 9volt instances (2+ cores, 512MB RAM)
  • 3 x etcd nodes (2+ cores, 1GB RAM)

Docs

Read through the docs dir.

Suggestions/ideas

Got a suggestion/idea? Something that is preventing you from using 9volt over another monitoring system because of a missing feature? Submit an issue and we'll see what we can do!

Extension points exported contracts — how you extend this code

IDirector (Interface)
(no doc) [9 implementers]
director/director.go
IAlerter (Interface)
(no doc) [3 implementers]
alerter/alerter.go
ICheckExecutor (Interface)
(no doc) [3 implementers]
check/check.go
IDal (Interface)
(no doc) [2 implementers]
dal/dal.go
ICluster (Interface)
(no doc) [1 implementers]
cluster/cluster.go
IMonitor (Interface)
(no doc)
monitor/monitor.go
ICheck (Interface)
(no doc) [1 implementers]
check/check.go

Core symbols most depended-on inside this repo

push
called by 79
9volt-cfg/dal/dal.go
String
called by 31
util/util.go
start
called by 30
monitor/monitor.go
callback
called by 30
ui/semantic/src/definitions/modules/search.js
Handle
called by 28
monitor/monitor.go
guard
called by 22
dal/dalfakes/fake_idal.go
remove
called by 20
9volt-cfg/dal/dal.go
AddWithErrorLog
called by 20
event/event.go

Shape

Method 302
Function 108
Struct 43
Class 8
Interface 7
TypeAlias 4

Languages

Go83%
TypeScript17%

Modules by API surface

dal/dalfakes/fake_idal.go85 symbols
dal/dal.go44 symbols
cluster/cluster.go33 symbols
director/director.go17 symbols
monitor/monitor.go16 symbols
check/check.go14 symbols
alerter/alerter.go13 symbols
9volt-cfg/dal/dal.go12 symbols
9volt-cfg/config/config.go10 symbols
util/util.go9 symbols
event/event.go9 symbols
ui/semantic/tasks/admin/distributions/init.js7 symbols

For agents

$ claude mcp add 9volt \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact