• Stars
    star
    288
  • Rank 143,818 (Top 3 %)
  • Language
    Go
  • License
    BSD 2-Clause "Sim...
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tool for monitoring network devices (mainly using SNMP) - monitoring check plugin

Thola

Thola

Go Report Card GitHub code style GitHub license GitHub branch checks state GoDoc doc

Description

A tool for monitoring network devices written in Go. It features a check mode which complies with the monitoring plugins development guidelines and is therefore compatible with Nagios, Icinga, Zabbix, Checkmk, etc.

Installation

You can download the latest compiled version for your platform under the "Releases" tab or build it yourself:

git clone https://github.com/inexio/thola.git
cd thola
go build

Note: This requires Go 1.16 or newer

If you also want to build the client binary, which can be used for sending requests to a running Thola API, use the following build command:

go build --tags client -o thola-client

Features

Thola currently has three main modes of operation with various subcommands:

  • identify automatically identifies the device and outputs its vendor, model and other properties.
  • read reads out values and statistics of the device.
    • read available-components returns the available components for the device.
    • read count-interfaces counts the interfaces.
    • read cpu-load returns the current cpu load of all CPUs.
    • read disk reads storage utilization.
    • read hardware-health reads hardware health information like temperatures and fans.
    • read high-availability reads out the high availability status of a device.
    • read interfaces outputs the interfaces with several values like error counters and statistics.
    • read sbc reads out SBC specific information.
    • read memory-usage reads out the current memory usage.
    • read server outputs server specific information like users and process count.
    • read ups outputs the special values of a UPS device.
  • check performs checks that can be used in monitoring systems. Output is by default in check plugin format.
    • check cpu-load checks the average CPU load of all CPUs against given thresholds and outputs the current load of all CPUs as performance data.
    • check disk checks the free space of storages.
    • check hardware-health checks the hardware-health of a device.
    • check high-availability checks the high availability status of a device.
    • check identify compares the device properties with given expectations.
    • check interface-metrics outputs performance data for the interfaces, including special values based on the interface type (e.g. Radio Interface).
    • check memory-usage checks the current memory usage against given thresholds.
    • check sbc checks an SBC device and outputs metrics for each realm and agent as performance data.
    • check server checks server specific information.
    • check snmp checks SNMP reachability.
    • check ups checks if a UPS device has its main voltage applied and outputs additional performance data like battery capacity or current load, and compares them to optionally given thresholds.
    • check thola-server checks reachability of a Thola API.

Quick Start

Use the identify mode to automatically discover some properties of a network device.

$ thola identify

Usage:
  thola identify [host] [flags]

Specify the address of the network device in the [host] argument. The --format flag modifies the format of the output. --format pretty is set by default and is useful when reading the output manually. Other options are json and xml.

$ thola identify 10.204.2.90

Device: 
  Class: ceraos/ip10
  Properties: 
    Vendor: Ceragon
    Model: IP-10
    SerialNumber: 00:0A:25:25:77:67
    OSVersion: 2.9.25-1

Next we want to print the interfaces of the network device and their relevant data. We use the read interfaces command for this.

$ thola read interfaces 10.204.2.90

Interfaces: [8] 
  IfIndex: 1
  IfDescr: Radio Interface #0
  IfType: sonet
  IfMtu: 2430
  IfSpeed: 367000
  ...
  
  IfIndex: 5001
  IfDescr: Ethernet #7
  IfType: ethernetCsmacd
  IfMtu: 1548
  IfSpeed: 10000000
  IfPhysAddress: 00:0A:25:27:57:1E
  IfAdminStatus: up
  IfOperStatus: down
  ...

API Mode

Thola can be executed as a REST API. You can start the API using the api command:

$ thola api
 ______   __  __     ______     __         ______   
/\__  _\ /\ \_\ \   /\  __ \   /\ \       /\  __ \  
\/_/\ \/ \ \  __ \  \ \ \/\ \  \ \ \____  \ \  __ \ 
   \ \_\  \ \_\ \_\  \ \_____\  \ \_____\  \ \_\ \_\
    \/_/   \/_/\/_/   \/_____/   \/_____/   \/_/\/_/

⇨ http server started on [::]:8237

For sending requests to the Thola API you can use the Thola client. When executing the Thola client you can specify the address of the API with the --target-api flag.

$ thola-client identify 10.204.2.90 --target-api http://192.168.10.20:8237 

Device: 
  Class: ceraos/ip10
    Properties: 
      Vendor: Ceragon
      Model: IP-10
      SerialNumber: 00:0A:25:25:77:67
      OSVersion: 2.9.25-1

You can find the full API documentation on our SwaggerHub.

Supported Devices

We support a lot of different devices and hope for your contributions to grow our device collection. Some examples are:

  • Cisco
  • Juniper
  • Huawei
  • Nokia/ISAM
  • Ceragon
  • Brocade
  • Edgecore
  • ...

Basic interface readout is supported for every device.

Supported Protocols

Currently we mostly work with SNMP, but already provide basic features for HTTP(S). We plan to support more protocols like telnet, SSH and more.

Tests

You can run our test located in the test directory with the go test command if you have Docker and Docker Compose installed.

If you want to add your own devices to the tests you can put your SNMP recordings in the testdata/devices folder. After that you just need to run the script located in create_testdata to create the expectation files and your devices are included in the testsuite!

Contribution

We are always looking forward to your ideas and suggestions.

If you want to help us please make sure that your code is conform to our coding style.

Happy coding!

More Repositories

1

NESi

Network Equipment Simulator (NESi)
Python
31
star
2

angular-build-info

πŸ›  A CLI to generate an easily importable `build.ts` file containing various details about the application build
TypeScript
27
star
3

eve-ng-cli-manager

A tool for using the Eve-NG restAPI via the command line.
Go
15
star
4

snmp-sim-ui

βš—οΈ 2-in-1 Web and Desktop App for Managing and Evaluating Metrics for the SNMP Simulator.
TypeScript
13
star
5

go-monitoringplugin

Golang package for writing monitoring check plugins for nagios, icinga2, zabbix, etc.
Go
12
star
6

eve-ng-restapi-go-client

An API client for eve-ng written in go
Go
8
star
7

thola-nautobot

Thola plugin for Nautobot
Python
8
star
8

cve-alert-manager

Collect security alerts from different sources and provide a normalized API to query
Go
7
star
9

snmpsim-cli-manager

A tool for using the snmpsim and all its features via the command line
Go
7
star
10

jb-fls-check

monitoring plugin for jetbrains floating license server (written in golang)
Go
5
star
11

thola-ansible

Thola collection for Ansible
Python
4
star
12

NESi-UI

πŸ“¦ A Web and Desktop App to manage virtual network devices run by the "NESi" Application.
TypeScript
4
star
13

snmpsim-restapi-go-client

Golang package - client library for the snmpsim REST API
Go
4
star
14

check-eve-ng

monitoring check plugin for the EVE-NG API (written in golang)
Go
2
star
15

matrix-server-version-check

this is a check plugin for the matrix server version written in go
Go
1
star
16

check_domain_whois

Monitoring plugin to monitor your registered domains' values
Python
1
star
17

thola-client-module-python

Thola client module written in Python to connect to a Thola API
Python
1
star
18

matrix-federation-tester-check

this is a monitoring check plugin for matrix-federation-tester written in go
Go
1
star
19

matrix-server-chain-check

this is a chain check to test the connectivity between two matrix servers written in go
Go
1
star