GithubHelp home page GithubHelp logo

isabella232 / nodestatus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from varnish/nodestatus

0.0 1.0 0.0 5.31 MB

Lightweight web service to report node status to a load balancer

License: Other

Go 98.83% Makefile 1.17%

nodestatus's Introduction

nodestatus

Lightweight web service with a built in web server to print node status.

Installation

git clone github.com/varnish/nodestatus
cd nodestatus
make build

Running

Standard way of running it:

bin/nodestatus-darwin-amd64

Parameters:

  • --listen-host string: Listen host (default "127.0.0.1")
  • --listen-port int: Listen port (default 8080)
  • --interval int: Number of seconds to use as interval for averages (default 1)
  • --net-dev string: Network interface to read stats from, examples are "eth0" or "bond0" or "all" to show all network interfaces combined (default "all")
  • --net-threshold int: Data gather interval in seconds, examples are "1000", "10 Kbps", "4.5 Gbps" and "0.3 Tbps" (default "800 Mbps")
  • --maintenance string: Path to a file in the file system which indicates maintenance mode (default /etc/varnish/maintenance)

Example output:

$ curl -i http://localhost:8080
HTTP/1.1 200 OK
Cache-Control: max-age=1, stale-while-revalidate=1
Content-Type: application/json
Date: Wed, 19 Jun 2019 11:44:15 GMT
Content-Length: 266

{
    "free": true,
    "reason": "Normal operation",
    "load1": 2.15,
    "load5": 1.83,
    "load15": 1.72,
    "net": "99 Mbps",
    "net-threshold": "1.0 Gbps",
    "net-utilization": 9,
    "time": 1560944655,
    "uptime": 2,
    "hostname": "work-2.local"
}

Explanation:

  • free: true means that the node has available resources to handle more clients.
  • The current transfer rate (99 Mbps) is at 9% (net-utilization) of the threshold (1 Gbps).

nodestatus's People

Contributors

espebra avatar aondio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.