Skip to content

greglook/solanum

Repository files navigation

Solanum

CircleCI

Solanum is a simple monitoring daemon which can be configured to collect host-level data from a variety of sources. The results can be printed to the console or sent to a Riemann server. This is primarily intended as a replacement for running a number of independent programs like the riemann-tools daemons.

Solanum is written in Clojure and uses Graal to compile native binaries. These are much simpler to deploy than coordinating Ruby gem installs.

Installation

Releases are published on the GitHub project. The native binaries are self-contained, so to install them simply place them on your path.

Metric Events

Solanum represents each measurement datapoint as an event. Each event must have at minimum a service and metric with the measurement name and value, respectively. Events may also contain other attributes such as a state, ttl, tags, and so on - see the Riemann concepts page for more details.

{:service "cpu usage"
 :metric 0.1875
 :state :ok}

Configuration

Solanum is configured using one or more YAML files. These specify common event attributes, sources, and outputs. Config files are provided as command-line arguments, and merged together in order to collect the configured sources and outputs.

See the example config in this repo for some of the possible config options.

Defaults

The defaults section of the config provides common attributes to apply to every event. This can be used to provide a common TTL, tags, and more.

Note: attributes specified on the command line take precedence over these global defaults. In particular, this means that a custom hostname must be set on the command line to take effect.

Sources

A source is a record which implements a collect-events method to return metric events. Solanum comes with several metric sources built in, including basic host-level monitoring of CPU usage, load, memory, diskstats, network, and more. You can provide your own custom sources, but you'll need to build your own uberjar using this project as a dependency.

See the source docs for information about the available source types and their configuration options.

Outputs

An output is a destination to report the collected events to. The simplest one is the print output, which writes each event to STDOUT. This is useful for debugging, but you probably won't leave it on for deployed daemons.

See the output docs for information about the available output types and their configuration options.

License

This is free and unencumbered software released into the public domain. See the UNLICENSE file for more information.