Bigbroproject BigBro Save

A light-weight monitoring tool with UI for user defined services and protocols.

Project README

BigBro

Build Status MIT License made-with-Go made-with-Go GitHub go.mod Go version of a Go module GitHub Release

An extensible monitoring tool for user defined services and protocols, all wrote in GoLang and VueJS 3, made with BigBro core.

Project status

  • This project is in BETA stage
  • Go version : 1.15
  • Vue version : 3.0
  • BigBro core version: GitHub Release

Introduction

BigBro is a lightweight monitoring software tool that offers a lightweight User Interface to monitor the services and protocols defined by users.

The software also can be used only via CLI interface

The entire software is based on one configuration file where it is possible define a list of services that would be monitor.

Compatibility

Operative Systems

BigBro was compiled and tested on Debian and RHEL Linux distribution families.

Hardware

BigBro was develop to run in any kind of computer or embedded system and was tested on:

  • General Personal Computer (x86_64)
  • Raspberry 3 B+
  • Orange Pi Zero

Defaults Protocols implemented

The default protocols are based on default protocols from BigBro Core, nevertheless new or custom protocols can be implemented in BigBro as in BigBro Core.

  • http
  • https (with ssl)
  • icmp
  • icmp6

Configuration file

In the configuration file will must be defined all services and protocol to be monitor. The format type of the file is YAML as follows:

services:
  - name: Facebook (ssl)
    protocols:
      - type: https
        port: 443
        server: facebook.com
        interval : 1000
  - name: Google
    protocols:
      - type: http
        server: google.com
        interval : 1000
  - name: Google DNS
    protocols:
      - type: icmp
        server: 8.8.8.8
        interval : 1000
  - name: Google DNS6
    protocols:
      - type: icmp6
        server: 2a00:1450:400a:804::2004
        interval : 5000
      - type: ftp
        server: 1.1.1.1
        interval : 1000
        customs :
          user : uss
          password : passwd
  ...
  • name : Name of the service
  • protocols: List of protocols that would be monitored
    • type: name of registered protocol
    • server: IP or dns of service
    • interval: interval time between check (in milliseconds)
    • port: (optional) port of service
    • customs: (optional) list of custom filed for custom implementation of protocols

Usage Example

From Binary File

Basically BigBro can be downloaded from releases section with a pre-compiled binary file.

Releases Page | Last release:

GitHub Release

From Source Code

Requirements

  • Debian or RHEL Linux distribution family
  • NodeJS >= v12.10.1 (it is used to compile the user interface)
  • Go Version >= v1.15 (developed with this version)
  • $GOPATH variable set and included in $PATH ( export PATH=$PATH:$GO:$GOPATH/bin )
  • Git installed

Firstly, before the usage of this library you must clone this repository:

git clone github.com/bigbroproject/bigbro

Secondly, the installation of libraries and dependencies is required:

cd bigbro && make install-dep

After the installation of dependencies, you can proceed to build BigBro:

make build          #for your architecture
make build-x64      #for 64 bit architecture
make build-x86      #for 32 bit architecture
make build-arm      #for ARM 7 architecture
make build-arm5     #for ARM 5 architecture
make build-all      #to build all solutions

Customisation of the code

Before the build phase you can edit the main code, registering new protocols or handlers:

package main

import (
	"github.com/bigbroproject/bigbrocore/core"
	"github.com/bigbroproject/bigbrocore/protocols"
	"github.com/bigbroproject/bigbrocore/responsehandlers"
)

func main() {


	//log.SetFlags(log.LstdFlags | log.Lshortfile)
	system.PrintSystemInfo()
	ws := webserver.NewWebServer("config/serverconfig.yml")
	ws.Start()

	regProtocolInterfaces, regResponseHandlerInterfaces := core.Initialize("config/config.yml")

	// Register custom protocols
	//protocols.RegisterProtocolInterface(&regProtocolInterfaces, "ftp", protocols.FTP{})

	// Register Response Handlers
	responsehandlers.RegisterResponseHandlerInterface(&regResponseHandlerInterfaces, "webServerHandler", responsehandler.WebServerRespHandler{OutputChannel: ws.InputChannel})

    // Register custom handlers
	//responsehandlers.RegisterResponseHandlerInterface(&regResponseHandlerInterfaces, "console", responsehandlers.ConsoleHandler{})
	responsehandlers.RegisterResponseHandlerInterface(&regResponseHandlerInterfaces, "consoleMemory", responsehandlers.ConsoleHandlerWithMemory{})

	// Start monitoring
	core.Start(regProtocolInterfaces, regResponseHandlerInterfaces)

}

In this example we Initialize the entire module with a given configuration file path (you can manage this as a first input in your command line, for instance). Secondly, you must define and register a ResponseHandler to manage the Responses from service checks (otherwise you cannot log or see anything) and then register a custom protocol, if needed.

Finally, you can over your project main with the Start of the module.

Struct of the Core and implementation of custom protocols and handlers

For more information about the implementation of new protocols and handlers read the documentation of BigBro core.


Made with ❤️ by Asdrubbalo, filirnd and fedyfausto

Open Source Agenda is not affiliated with "Bigbroproject BigBro" Project. README Source: bigbroproject/BigBro
Stars
36
Open Issues
0
Last Commit
3 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating