-
What is LoadAvg?
Is a simple go program with agent and a html generator to produce a static HTML file of a normalized load average server group
-
What is needed to build?
-
go-lang
-
git
-
A redis server reachable from both agent and parser component.
-
-
Where it works?
Has been tested on Linux,OpenBSD and FreeBSD.
-
How it works?
Agent component send to redis server the normalized loadaverage calculated on 5 minutes timeframe. Parser component, that needs to be executed manually or by cron, fetch data from redis and produce a file called loadavg.html
-
Clone the repository
-
Enter this command to build both agent and parser component
# go build loadavg_get.go # go build loadavg_put.go
-
Copy the loadavg_put binary on servers that you want to monitor
-
Execute the binary:
# nohup ./loadavg_put -redis=foo.bar.com &
-
or, still better:
# cp loadavg_put.service /lib/systemd/system # vim /lib/systemd/system/loadavg_put.service # Edit the $REDIS variable. # systemctl daemon-reload # systemctl enable loadavg_put.service # systemctl start loadavg_put.service
Important
|
Don’t forget to edit $REDIS variable inside loadavg_put.service before to start it. |
-
Run parser component to get data from redis and produce HTML.
# ./loadavg_get -redis=foo.bar.com
-
Open loadavg.html file with your browser
- A -1 with green background
-
Means that no data has been retrieved for that server in that particular timeframe
- A >= 1 with red background
-
Means that normalized loadaverage is >=1, so all your core are currently busy.
- A 0 with white background
-
Means that load average is between 0 and 1, so it’s all ok.