Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tiny service health dashboard written in Go

License

NotificationsYou must be signed in to change notification settings

mtojek/greenwall

Repository files navigation

Logo of GreenWall

Status:Done (waiting for feedback)

Build Status

Description

GreenWall is a tiny service health dashboard written in Go (with frontend prepared in Bootstrap). The aim of this project is to develop a small web application that can be run as a live dashboard, which presents health statuses of specified server nodes.

The app can be installed in a couple of seconds thus do not hesitate to run this on your operational wall screens!

Screenshots

Desktop view

Screenshot Desktop

Mobile view

Screenshot Mobile

Features

  • web live dashboard based on Bootstrap
  • easily resizeable dashboard (wall, desktop, mobile screens)
  • definition of monitored hosts in a YAML file
  • HTTP endpoint can be used as source of health information
  • HTTP basic access authentication
  • search for "healthy" phrases in HTTP responses
  • ICMP ping
  • check expired SSL certificates with TLS health check
  • pluggable health checks (waiting for TCP, DNS, REST, SOAP and others!)
  • install and run in a few seconds!

Quickstart

Download and install GreenWall:

go get github.com/mtojek/greenwall

Prepare a YAML file (config.yaml) with definitions of monitored hosts:

---general:healthcheckEvery:15shttpClientTimeout:5srefreshDashboardEvery:10sgroups:  -name:Frontend Nodes (us-east-1)nodes:      -name:front-1endpoint:https://httpbin.org/basic-auth/username/passwordtype:http_checkparameters:expectedPattern:"\"authenticated\": true"basicAuthUsername:usernamebasicAuthPassword:password      -name:front-2endpoint:https://www.example.com/type:http_checkparameters:expectedPattern:WillNotFindThis  -name:Middleware Nodes (us-west-2)nodes:      -name:middleware-1 with a really long nameendpoint:https://www.example.com/type:http_check      -name:middleware-2endpoint:https://www.example.com/type:http_check  -name:Backend Nodes (us-west-2)nodes:      -name:backend-1endpoint:https://www.example.com/type:http_check      -name:backend-2endpoint:https://www.example.com/type:http_check      -name:backend-3endpoint:https://www.example.com/type:http_check      -name:backend-4endpoint:https://1234567890.example.com/type:http_check      -name:backend-5endpoint:https://www.example.com/type:http_check

Run the application:

greenwall -staticDir$GOPATH/src/github.com/mtojek/greenwall/frontend

Go to the live dashboard:

http://localhost:9001

Running in cloud - Heroku, Cloud Foundry, etc.

As an alternative to command line arguments, GreenWall can also read primary configuration (host, port, config file, static path, etc.) from environment variables. Names of variables can be listed with a-help switch.

Sample command:

PORT=9001 CONFIG=config.yaml STATIC_DIR=frontend greenwall

Building

The project may be rebuilt using a single command -make. This includes downloading dependencies, formatting, building code and testing.

The building process may require higher user permission:

--- PASS: TestLint (8.93s)PASSok      github.com/greenwall    8.932s?       github.com/greenwall/middleware/application     [notest files]?       github.com/greenwall/middleware/healthcheck     [notest files]?       github.com/greenwall/middleware/httpserver      [notest files]?       github.com/greenwall/middleware/monitoring      [notest files]gotest -race  -i ./...go install runtime/internal/sys: open /usr/lib/golang/pkg/linux_amd64_race/runtime/internal/sys.a: permission deniedmake:*** [test] Error 1[me@centos7t01 greenwall]$

To resolve this issue, please elevate user permissions withsudo or use local Go installation.

Creating own, pluggable health check

The author is welcome to any contributions to this project, especially new health check types. To create a new plugin, please look at first into sample implementation ofSampleCheck. This check is responsible for comparing the current day with a "green day" provided in configuration.

See:sample_check.go

High priority health check plugins:

  • TCP
  • DNS
  • REST
  • SOAP

Please open a PR once you finish the implementation. Don't worry - I'll help you in pushing your change to the repository!

Dist

It is possible to build a GreenWall distribution (dist.zip), which can be easily installed on the target host. Firstly, prepare a distribution:

make dist

Then copy thedist.zip file to the target host and unzip it. Please remember also to provide aconfig.yaml file before running the./greenwall binary.

Contact

Please feel free to leave any comment or feedback by opening a new issue or contacting me directly viaemail. Thank you.

License

MIT License, seeLICENSE file.

About

Tiny service health dashboard written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp