Skip to content

Simple loadavg agent/server that produce a static HTML page on daily timeframe.

License

Notifications You must be signed in to change notification settings

drumbsd/loadavg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loadavg

  1. 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

  2. What is needed to build?

    • go-lang

    • git

    • A redis server reachable from both agent and parser component.

  3. Where it works?

    Has been tested on Linux,OpenBSD and FreeBSD.

  4. 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

Examples

Follow these steps:
  1. Clone the repository

  2. Enter this command to build both agent and parser component

    # go build loadavg_get.go
    # go build loadavg_put.go
  3. Copy the loadavg_put binary on servers that you want to monitor

  4. Execute the binary:

    # nohup ./loadavg_put -redis=foo.bar.com &
  5. 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.
  1. Run parser component to get data from redis and produce HTML.

    # ./loadavg_get -redis=foo.bar.com
  2. Open loadavg.html file with your browser

How to read data
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.

ScreenShot

example
Figure 1. Sample

About

Simple loadavg agent/server that produce a static HTML page on daily timeframe.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages