Linux system metrics collector for statsd written in C++.
Metrics gathered by the application:
- memory (real + virtual) total/usage
- disk space total/usage
- processor usage
- processors count
- network in/out
- disk in/out
- uptime
In statsd they are prefixed with himond.hostname
string (or himond.general_hostname
if the hostname couldn't be retrieved), e.g.:
himond.production.system.uptime:124|c
himond.production.cpu.usage:77|g
System uptime in seconds.
system.uptime
count
Memory statistics in megabytes.
memory.total
gaugememory.used
gaugememory.free
gaugememory.virtual.total
gaugememory.virtual.used
gaugememory.virtual.free
gauge
Disk usage statistics in megabytes, transfer rates in kilobytes per second.
disk.total
gaugedisk.used
gaugedisk.free
gaugedisk.rate.read
countdisk.rate.write
count
Net IO interface transfer rates in kilobytes per second.
net.rate.recv
countnet.rate.send
count
Usage in percent.
cpu.count
countcpu.usage
count
Himond gathers statistics from the local host and sends them to the selected statsd server. It's necessary to provide the server details where the statistics will be sent (host and port).
You can also customize ethernet interface which will be monitored (default eth0
) and the
statistics refresh rate in seconds.
Usage: ./himond <statsd_host> <statsd_port> [<eth_interface>] [<refresh_rate_seconds>]
where: eth_interface - default: eth0
refresh_rate_seconds - default: 1
Example: ./himond 127.0.0.1 8125
Run make
from within the src
directory.
Run make clean
to delete all files generated after a build.
A Vagrantfile
file is attached that allows to run a test linux environment.
It also contains statsd server as a docker container so you can test himond
with statsd server just by running himond 127.0.0.1 8125
.
Run test_client
application to see the metrics on the screen.
Run test_client -h
for usage.
If Vagrant can't mount folders, try running vagrant plugin install vagrant-vbguest as the problem may be caused by updated linux kernel in the guest system.
- show processor usage separately for each core
MIT