The Shelby Cobra is an iconic sportscar as well as a monitoring agent monitoring agent for your unix system, written in Rust. Sends json metrics suitable for ingestion by numbat.
cargo build
Shelby accepts one config option, passed in via the METRICS
env var. This is the location of the numbat collector to send metrics to.
METRICS=tcp://127.0.0.1:1337 shelby
All metrics sent are in the following form:
{
"host": "example.com",
"name": "host.start",
"time": 1486585740403,
"value": 1
}
Sends:
{
"value": 0.33
"name": "host.memory"
}
Sends two metrics, one for each mount point:
{
"host": "example.com",
"name": "host.disk-usage./",
"time": 1486587398361,
"value": 0.8535458850761212
}, {
"host": "example.com",
"name": "host.inode-usage./",
"time": 1486587398361,
"value": 0.0009513050355418086
}
The value is capacity used. (Multiply by 100 if you need a percentage used.) Mount points are hard-coded right now as /
and /mnt
.
A pulse from the host; value always 1.
{
"host": "example.com",
"name": "host.heartbeat",
"time": 1486587398361,
"value": 1
}
Sends 15, 5, and 1 minute load averages.
{ "host": "example.com",
"name": "host.load-average.1",
"time": 1486587398362,
"value": 2.69189453125 },
{ "host": "example.com",
"name": "host.load-average.5",
"time": 1486587398362,
"value": 3.35546875 },
{ "host": "example.com",
"name": "host.load-average.15",
"time": 1486587398363,
"value": 3.2265625 }
Sends one metric for each of the following:
sockets.ESTABLISHED
sockets.SYN_SENT
sockets.SYN_RECV
sockets.FIN_WAIT1
sockets.FIN_WAIT2
sockets.TIME_WAIT
sockets.CLOSE
sockets.CLOSE_WAIT
sockets.LAST_ACK
sockets.LISTEN
sockets.CLOSING
shelby
is released under the MIT license. See the LICENSE
file for more information.