Giter VIP home page Giter VIP logo

thola's Introduction

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!

thola's People

Contributors

babos77 avatar bausphi avatar cmaile avatar lostboi avatar studost avatar thefiremike avatar toberd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thola's Issues

SNMPv1 Support

Hello there,

I am looking to implement support for APC USVs/PDUs. Some of the devices still rely on SNMP v1. Hence, how can I set thola to use SNMP v1, if it is supported?

Many thanks.

Uptime Check

Is it possible to add an uptime check for SNMP devices?

SNMP credentials

Looks very. interesting, but where to configure auth information. (e.g. for. SNMP v1, V2 and V3 credentials)?

Documentation Feature Request

Maybe i'm incapable but i really tried to use the

thola check interface-metrics 127.0.0.1 --snmp-community public --ifDescr-filter 'interface TenGigabitEthernet5/16'

or

thola check interface-metrics 127.0.0.1 --snmp-community public --ifName-filter 'Te5/16'

But i still receive all the other interfaces from the output as hard as i try to filter down to one interface .. maybe i use it wrong is it possible to extend the filter usage with more examples ?

thx in advance

Build fails

I try to build thola.
After git clone https://github.com/inexio/thola.git and cd thola i got an error:

> go build
build github.com/inexio/thola: cannot find module for path embed

SNMPv3 parameters in config.yaml

Hey! First thing first, thanks for thola!

% ./thola --version
v0.3.5

I would like to set my SNMPv3 parameters in the config.yaml file, I tried:

device:
  snmp-communities:
  - mycommunity
  snmp-versions:
  - 2c
  - 3
  snmp-v3-auth-key: <redacted>
  snmp-v3-auth-proto: MD5
  snmp-v3-level: "authPriv"
  snmp-v3-priv-key: <redacted>
  snmp-v3-priv-proto: DES
  snmp-v3-user: <redacted>

but it didn't work: Error: invalid request: no SNMP v3 level provided.

As I'm not very familiar with Golang code, I didn't succeed to spot where the config parsing happen...

Is what I'm trying to do possible? Thanks!

Add parameter for non-standard SNMP-port

THX for releasing this tool!

We have a tool, that "speaks" SNMP-protocol on a different port to not interfere with standard SNMP-daemon on the same machine. It would be great to query and monitor this tool via thola.

Please add a flag for non-standard SNMP port (<> 161).

SNMP v3 support?

Hi,
thank you for this project. Is SNMP v3 support provided? If so, how is it configured? I have not found anything about this in the documentation yet.

32bit version of thola - building fails

It would be great if it would be possible to build a 32 bit version of thola to run it on some older devices.

Currently the build fails with v0.2.3:

env GOARCH=386 /usr/local/go/bin/go build
# github.com/dgraph-io/badger/v2
../../go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:50:5: constant 4294967295 overflows int

Invalid character error thrown in check interface-metrics on Cisco ASA

Hey all! I'm trying to get the interface metrics on my Cisco ASA and it keeps throwing this error:

UNKNOWN: error while adding performance data (error: failed to add performance data point: given performance data point is not valid: metric contains invalid character)

I don't know if it helps, but read interfaces doesn't have the same problem.

Thanks!

Can you add network topology

can you add a network topology option based on IP scan, where devices should display based on toplogycal manner

Include VLAN information in interfaces

Thola looks very promising to replace an ancient PHP tool running in our infrastructure. To fully replace it, we would need VLAN information in the "read interfaces" cmd-call (and maybe some other information as well).

Are there plans/code/ideas on how to implement / add VLAN information? I have not found any VLAN reference in the code besides the IfType, so im guessing it has not been considered at all just yet?

Im might try adding that for Juniper, unless there is already something planned / implemented?

  • Volker

Adding hardware-health check to HP switch

Hello everyone,
Im very interested in using thola to replace our currently used bunch of plugins. So far the development of your plugin looks realy promising.
I tried to create a hardware-health monitoring for the HP ARUBA 5406R zl2. I have extended the procurve.yaml.

name: procurve

config:
  components:
    cpu: true
    memory: true
    hardware_health: true

match:
  logical_operator: "OR"
  conditions:
    - type: SysObjectID
      match_mode: startsWith
      values:
        - ".1.3.6.1.4.1.11.2.3.7.11"

identify:
  properties:
    vendor:
      - detection: constant
        value: "HP ProCurve"
    model:
      - detection: SysDescription
        operators:
          - type: modify
            modify_method: regexSubmatch
            regex: '^HP ([^,]+),'
            format: "$1"
    serial_number:
      - detection: snmpget
        oid: .1.3.6.1.2.1.47.1.1.1.1.11.1001
    os_version:
      - detection: SysDescription
        operators:
          - type: modify
            modify_method: regexSubmatch
            regex: 'revision ([^,]+),'
            format: "$1"

components:
  cpu:
    load:
      - detection: snmpget
        oid: .1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0
  memory:
    usage:
      - detection: snmpget
        oid: .1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.7.1
        operators:
          - type: modify
            modify_method: divide
            value:
              detection: snmpget
              oid: 1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.5.1
              operators:
                - type: modify
                  modify_method: divide
                  value:
                    detection: constant
                    value: 100
  hardware_health:
    environment_monitor_state:
      - detection: snmpget
        oid: .1.3.6.1.4.1.11.2.36.1.1.5.1.1.3.1
    fans:
      detection: snmpwalk
      values:
        description:
          oid: 1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2
        state:
          oid: 1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4
    power_supply:
      detection: snmpwalk
      values:
        description:
          oid: .1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.9
        state:
          oid: .1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.2

In doing so I encountered several problems. When checking the switch I get an error message:

CRITICAL: environment monitor state is critical
error while adding performance data point (error: failed to add performance data point: a performance data point with this metric does already exist)

Here is the read:

HardwareHealthComponent:
  EnvironmentMonitorState: 3
  Fans: [6]
      Description: 0
      State: 5

      Description: 0
      State: 5

      Description: 0
      State: 5

      Description: 0
      State: 5

      Description: 1
      State: 5

      Description: 2
      State: 2


  PowerSupply: [2]
      Description: J9828A
      State: 5

      State: 1

In the source code I saw that for the enviroment monitor state a fixed value is expected.
As a workaround for this I added the following code:

operators:
  - type: switch
    switch_mode: regex
    cases:
      - case: "2|3"
        operators:
          - type: modify
            modify_method: overwrite
            value: "2"
      - case: ".*"
        operators:
          - type: modify
            modify_method: overwrite
            value: "0"

Changing the yaml to:

name: procurve

config:
  components:
    cpu: true
    memory: true
    hardware_health: true

match:
  logical_operator: "OR"
  conditions:
    - type: SysObjectID
      match_mode: startsWith
      values:
        - ".1.3.6.1.4.1.11.2.3.7.11"

identify:
  properties:
    vendor:
      - detection: constant
        value: "HP ProCurve"
    model:
      - detection: SysDescription
        operators:
          - type: modify
            modify_method: regexSubmatch
            regex: '^HP ([^,]+),'
            format: "$1"
    serial_number:
      - detection: snmpget
        oid: .1.3.6.1.2.1.47.1.1.1.1.11.1001
    os_version:
      - detection: SysDescription
        operators:
          - type: modify
            modify_method: regexSubmatch
            regex: 'revision ([^,]+),'
            format: "$1"

components:
  cpu:
    load:
      - detection: snmpget
        oid: .1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0
  memory:
    usage:
      - detection: snmpget
        oid: .1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.7.1
        operators:
          - type: modify
            modify_method: divide
            value:
              detection: snmpget
              oid: 1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.5.1
              operators:
                - type: modify
                  modify_method: divide
                  value:
                    detection: constant
                    value: 100
  hardware_health:
    environment_monitor_state:
      - detection: snmpget
        oid: .1.3.6.1.4.1.11.2.36.1.1.5.1.1.3.1
        operators:
          - type: switch
            switch_mode: regex
            cases:
              - case: "2|3"
                operators:
                  - type: modify
                    modify_method: overwrite
                    value: "2"
              - case: ".*"
                operators:
                  - type: modify
                    modify_method: overwrite
                    value: "0"
    fans:
      detection: snmpwalk
      values:
        description:
          oid: 1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2
        state:
          oid: 1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4
    power_supply:
      detection: snmpwalk
      values:
        description:
          oid: .1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.9
        state:
          oid: .1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.2

But now part of the error remains with:

error while adding performance data point (error: failed to add performance data point: a performance data point with this metric does already exist)

If I understand the source code correctly, it makes a data point for each value depending on the description. For the description I am currently reading out the fan type. Unfortunately, these are not unique.

There is an OID with a list with all descriptions for all components: 1.3.6.1.2.1.47.1.1.1.7

The problem is when I try to use this OID, it assigns the wrong descriptions.

My questions are:

  1. We found the following comment in the source: state 2 only works for oracle-acme sbcs, this needs to be generalized once check hardware health is made for all device classes. When are you planing to extend the hardware-health check to allow other devices?
  2. How are the values interpreted in fans and power_supply? Can I work with --warning and --critical?
  3. Is there a way to map a value based on the OID in a snmpwalk instead the value?
  4. Is there any way to limit the range of OIDs it tries to read or select a starting point?

Here is a anonymized snmprec:

1.3.6.1.2.1.1.1.0|4x|4850204a3938353041205377697463682035343036527a6c322c207265766973696f6e204b422e31362e31302e303031302c20524f4d204b422e31362e30312e3030303620282f77732f73776275696c646d2f72656c5f616a616e74615f71616f66662f636f64652f6275696c642f626f6d2873776275696c646d5f72656c5f616a616e74615f71616f66665f72656c5f616a616e74612929
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.11.2.3.7.11.160
1.3.6.1.2.1.1.3.0|67|7803216
1.3.6.1.2.1.1.4.0|4x|41434d45
1.3.6.1.2.1.1.5.0|4x|536572766572
1.3.6.1.2.1.1.6.0|4x|656d707479
1.3.6.1.2.1.1.7.0|2|74
1.3.6.1.2.1.47.1.1.1.1.7.1|4|Chassis
1.3.6.1.2.1.47.1.1.1.1.7.2|4|Backplane
1.3.6.1.2.1.47.1.1.1.1.7.3|4x|46616e2054726179
1.3.6.1.2.1.47.1.1.1.1.7.4|4x|54656d70657261747572652073656e736f722070736575646f636f6e7461696e6572
1.3.6.1.2.1.47.1.1.1.1.7.5|4x|506f77657220737570706c79206261792070736575646f636f6e7461696e6572
1.3.6.1.2.1.47.1.1.1.1.7.6|4x|4d616e6167656d656e74206d6f64756c652070736575646f636f6e7461696e6572
1.3.6.1.2.1.47.1.1.1.1.7.9|4x|496e74657266616365206d6f64756c652070736575646f636f6e7461696e6572
1.3.6.1.2.1.47.1.1.1.1.7.11|4x|46616e2031
1.3.6.1.2.1.47.1.1.1.1.7.12|4x|46616e2032
1.3.6.1.2.1.47.1.1.1.1.7.13|4x|46616e2033
1.3.6.1.2.1.47.1.1.1.1.7.14|4x|46616e2034
1.3.6.1.2.1.47.1.1.1.1.7.15|4x|46616e2035
1.3.6.1.2.1.47.1.1.1.1.7.16|4x|46616e2036
1.3.6.1.2.1.47.1.1.1.1.7.25|4x|436861737369732054656d7065726174757265
1.3.6.1.2.1.47.1.1.1.1.7.26|4x|506f77657220537570706c79204261792031
1.3.6.1.2.1.47.1.1.1.1.7.27|4x|506f77657220537570706c79204261792032
1.3.6.1.2.1.47.1.1.1.1.7.30|4x|506f77657220537570706c792031
1.3.6.1.2.1.47.1.1.1.1.7.34|4x|537769746368204d616e6167656d656e74204d6f64756c6520536c6f74
1.3.6.1.2.1.47.1.1.1.1.7.35|4x|537769746368204d616e6167656d656e74204d6f64756c6520536c6f74
1.3.6.1.2.1.47.1.1.1.1.7.39|4x|536c6f742041
1.3.6.1.2.1.47.1.1.1.1.7.40|4x|536c6f742042
1.3.6.1.2.1.47.1.1.1.1.7.41|4x|536c6f742043
1.3.6.1.2.1.47.1.1.1.1.7.42|4x|536c6f742044
1.3.6.1.2.1.47.1.1.1.1.7.43|4x|536c6f742045
1.3.6.1.2.1.47.1.1.1.1.7.44|4x|536c6f742046
1.3.6.1.2.1.47.1.1.1.1.7.69|4x|537769746368204d616e6167656d656e74204d6f64756c65
1.3.6.1.2.1.47.1.1.1.1.7.74|4|A
1.3.6.1.2.1.47.1.1.1.1.7.75|4|B
1.3.6.1.2.1.47.1.1.1.1.7.76|4|C
1.3.6.1.2.1.47.1.1.1.1.7.77|4|D
1.3.6.1.2.1.47.1.1.1.1.7.78|4|E
1.3.6.1.2.1.47.1.1.1.1.7.79|4|F
1.3.6.1.2.1.47.1.1.1.1.7.104|4x|506f7274204131
1.3.6.1.2.1.47.1.1.1.1.7.105|4x|506f7274204132
1.3.6.1.2.1.47.1.1.1.1.7.106|4x|506f7274204133
1.3.6.1.2.1.47.1.1.1.1.7.107|4x|506f7274204134
1.3.6.1.2.1.47.1.1.1.1.7.108|4x|506f7274204135
1.3.6.1.2.1.47.1.1.1.1.7.109|4x|506f7274204136
1.3.6.1.2.1.47.1.1.1.1.7.110|4x|506f7274204137
1.3.6.1.2.1.47.1.1.1.1.7.111|4x|506f7274204138
1.3.6.1.2.1.47.1.1.1.1.7.112|4x|506f7274204139
1.3.6.1.2.1.47.1.1.1.1.7.113|4x|506f727420413130
1.3.6.1.2.1.47.1.1.1.1.7.114|4x|506f727420413131
1.3.6.1.2.1.47.1.1.1.1.7.115|4x|506f727420413132
1.3.6.1.2.1.47.1.1.1.1.7.116|4x|506f727420413133
1.3.6.1.2.1.47.1.1.1.1.7.117|4x|506f727420413134
1.3.6.1.2.1.47.1.1.1.1.7.118|4x|506f727420413135
1.3.6.1.2.1.47.1.1.1.1.7.119|4x|506f727420413136
1.3.6.1.2.1.47.1.1.1.1.7.120|4x|506f727420413137
1.3.6.1.2.1.47.1.1.1.1.7.121|4x|506f727420413138
1.3.6.1.2.1.47.1.1.1.1.7.122|4x|506f727420413139
1.3.6.1.2.1.47.1.1.1.1.7.123|4x|506f727420413230
1.3.6.1.2.1.47.1.1.1.1.7.124|4x|506f727420413231
1.3.6.1.2.1.47.1.1.1.1.7.125|4x|506f727420413232
1.3.6.1.2.1.47.1.1.1.1.7.136|4x|506f7274204231
1.3.6.1.2.1.47.1.1.1.1.7.137|4x|506f7274204232
1.3.6.1.2.1.47.1.1.1.1.7.138|4x|506f7274204233
1.3.6.1.2.1.47.1.1.1.1.7.139|4x|506f7274204234
1.3.6.1.2.1.47.1.1.1.1.7.140|4x|506f7274204235
1.3.6.1.2.1.47.1.1.1.1.7.141|4x|506f7274204236
1.3.6.1.2.1.47.1.1.1.1.7.142|4x|506f7274204237
1.3.6.1.2.1.47.1.1.1.1.7.143|4x|506f7274204238
1.3.6.1.2.1.47.1.1.1.1.7.144|4x|506f7274204239
1.3.6.1.2.1.47.1.1.1.1.7.145|4x|506f727420423130
1.3.6.1.2.1.47.1.1.1.1.7.146|4x|506f727420423131
1.3.6.1.2.1.47.1.1.1.1.7.147|4x|506f727420423132
1.3.6.1.2.1.47.1.1.1.1.7.148|4x|506f727420423133
1.3.6.1.2.1.47.1.1.1.1.7.149|4x|506f727420423134
1.3.6.1.2.1.47.1.1.1.1.7.150|4x|506f727420423135
1.3.6.1.2.1.47.1.1.1.1.7.151|4x|506f727420423136
1.3.6.1.2.1.47.1.1.1.1.7.152|4x|506f727420423137
1.3.6.1.2.1.47.1.1.1.1.7.153|4x|506f727420423138
1.3.6.1.2.1.47.1.1.1.1.7.154|4x|506f727420423139
1.3.6.1.2.1.47.1.1.1.1.7.155|4x|506f727420423230
1.3.6.1.2.1.47.1.1.1.1.7.156|4x|506f727420423231
1.3.6.1.2.1.47.1.1.1.1.7.157|4x|506f727420423232
1.3.6.1.2.1.47.1.1.1.1.7.168|4x|506f7274204331
1.3.6.1.2.1.47.1.1.1.1.7.169|4x|506f7274204332
1.3.6.1.2.1.47.1.1.1.1.7.170|4x|506f7274204333
1.3.6.1.2.1.47.1.1.1.1.7.171|4x|506f7274204334
1.3.6.1.2.1.47.1.1.1.1.7.172|4x|506f7274204335
1.3.6.1.2.1.47.1.1.1.1.7.173|4x|506f7274204336
1.3.6.1.2.1.47.1.1.1.1.7.174|4x|506f7274204337
1.3.6.1.2.1.47.1.1.1.1.7.175|4x|506f7274204338
1.3.6.1.2.1.47.1.1.1.1.7.176|4x|506f7274204339
1.3.6.1.2.1.47.1.1.1.1.7.177|4x|506f727420433130
1.3.6.1.2.1.47.1.1.1.1.7.178|4x|506f727420433131
1.3.6.1.2.1.47.1.1.1.1.7.179|4x|506f727420433132
1.3.6.1.2.1.47.1.1.1.1.7.180|4x|506f727420433133
1.3.6.1.2.1.47.1.1.1.1.7.181|4x|506f727420433134
1.3.6.1.2.1.47.1.1.1.1.7.182|4x|506f727420433135
1.3.6.1.2.1.47.1.1.1.1.7.183|4x|506f727420433136
1.3.6.1.2.1.47.1.1.1.1.7.184|4x|506f727420433137
1.3.6.1.2.1.47.1.1.1.1.7.185|4x|506f727420433138
1.3.6.1.2.1.47.1.1.1.1.7.186|4x|506f727420433139
1.3.6.1.2.1.47.1.1.1.1.7.187|4x|506f727420433230
1.3.6.1.2.1.47.1.1.1.1.7.188|4x|506f727420433231
1.3.6.1.2.1.47.1.1.1.1.7.189|4x|506f727420433232
1.3.6.1.2.1.47.1.1.1.1.7.190|4x|506f727420433233
1.3.6.1.2.1.47.1.1.1.1.7.191|4x|506f727420433234
1.3.6.1.2.1.47.1.1.1.1.7.200|4x|506f7274204431
1.3.6.1.2.1.47.1.1.1.1.7.201|4x|506f7274204432
1.3.6.1.2.1.47.1.1.1.1.7.202|4x|506f7274204433
1.3.6.1.2.1.47.1.1.1.1.7.203|4x|506f7274204434
1.3.6.1.2.1.47.1.1.1.1.7.204|4x|506f7274204435
1.3.6.1.2.1.47.1.1.1.1.7.205|4x|506f7274204436
1.3.6.1.2.1.47.1.1.1.1.7.206|4x|506f7274204437
1.3.6.1.2.1.47.1.1.1.1.7.207|4x|506f7274204438
1.3.6.1.2.1.47.1.1.1.1.7.208|4x|506f7274204439
1.3.6.1.2.1.47.1.1.1.1.7.209|4x|506f727420443130
1.3.6.1.2.1.47.1.1.1.1.7.210|4x|506f727420443131
1.3.6.1.2.1.47.1.1.1.1.7.211|4x|506f727420443132
1.3.6.1.2.1.47.1.1.1.1.7.212|4x|506f727420443133
1.3.6.1.2.1.47.1.1.1.1.7.213|4x|506f727420443134
1.3.6.1.2.1.47.1.1.1.1.7.214|4x|506f727420443135
1.3.6.1.2.1.47.1.1.1.1.7.215|4x|506f727420443136
1.3.6.1.2.1.47.1.1.1.1.7.216|4x|506f727420443137
1.3.6.1.2.1.47.1.1.1.1.7.217|4x|506f727420443138
1.3.6.1.2.1.47.1.1.1.1.7.218|4x|506f727420443139
1.3.6.1.2.1.47.1.1.1.1.7.219|4x|506f727420443230
1.3.6.1.2.1.47.1.1.1.1.7.220|4x|506f727420443231
1.3.6.1.2.1.47.1.1.1.1.7.221|4x|506f727420443232
1.3.6.1.2.1.47.1.1.1.1.7.222|4x|506f727420443233
1.3.6.1.2.1.47.1.1.1.1.7.223|4x|506f727420443234
1.3.6.1.2.1.47.1.1.1.1.7.232|4x|506f7274204531
1.3.6.1.2.1.47.1.1.1.1.7.233|4x|506f7274204532
1.3.6.1.2.1.47.1.1.1.1.7.234|4x|506f7274204533
1.3.6.1.2.1.47.1.1.1.1.7.235|4x|506f7274204534
1.3.6.1.2.1.47.1.1.1.1.7.236|4x|506f7274204535
1.3.6.1.2.1.47.1.1.1.1.7.237|4x|506f7274204536
1.3.6.1.2.1.47.1.1.1.1.7.238|4x|506f7274204537
1.3.6.1.2.1.47.1.1.1.1.7.239|4x|506f7274204538
1.3.6.1.2.1.47.1.1.1.1.7.264|4x|506f7274204631
1.3.6.1.2.1.47.1.1.1.1.7.265|4x|506f7274204632
1.3.6.1.2.1.47.1.1.1.1.7.266|4x|506f7274204633
1.3.6.1.2.1.47.1.1.1.1.7.267|4x|506f7274204634
1.3.6.1.2.1.47.1.1.1.1.7.268|4x|506f7274204635
1.3.6.1.2.1.47.1.1.1.1.7.269|4x|506f7274204636
1.3.6.1.2.1.47.1.1.1.1.7.270|4x|506f7274204637
1.3.6.1.2.1.47.1.1.1.1.7.271|4x|506f7274204638
1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.5.1|2|687427584
1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.7.1|2|189125984
1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0|2|69
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2.1|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2.2|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2.3|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2.4|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2.5|2|1
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.2.6|2|2
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.3.1|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.3.2|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.3.3|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.3.4|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.3.5|2|4
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.3.6|2|4
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4.1|2|5
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4.2|2|5
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4.3|2|5
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4.4|2|5
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4.5|2|5
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.4.6|2|2
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.5.1|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.5.2|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.5.3|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.5.4|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.5.5|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.5.6|2|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.6.1|65|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.6.2|65|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.6.3|65|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.6.4|65|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.6.5|65|0
1.3.6.1.4.1.11.2.14.11.5.1.54.2.1.1.6.6|65|0
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.2.1|2|5
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.2.2|2|1
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.3.1|65|0
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.3.2|65|0
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.4.1|2|29
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.4.2|2|0
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.5.1|4x|414320313230562f32343056
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.5.2|4x|2d2d202d2d2d2d2d2d2d2d2d
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.6.1|2|190
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.6.2|2|0
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.7.1|2|700
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.7.2|2|0
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.8.1|65|82308
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.8.2|65|0
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.9.1|4|J9828A
1.3.6.1.4.1.11.2.14.11.5.1.55.1.1.1.9.2|4|
1.3.6.1.4.1.11.2.36.1.1.5.1.1.3.1|2|3

And a interpretation of the variables from a MIB:

hpHttpMgDeviceHealth OBJECT-TYPE
    SYNTAX INTEGER {
           unknown        (1),
           unused         (2),
           ok             (3), -- available for meaningful work
           warning        (4), -- something needs attention
           critical       (5), -- something has failed
           nonrecoverable (6)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Overall health of the device. The goal of this object
         is to be the single poll point to check the status of the
         device."
    ::= { hpHttpMgDeviceEntry 3 }

HpicfDcFanState ::= TEXTUAL-CONVENTION
    STATUS         current
    DESCRIPTION   "An enumerated value which provides an indication of the
                  fan state."
    SYNTAX        INTEGER  {
       failed(0),
       removed(1),
       off(2),
       underspeed(3),
       overspeed(4),
       ok(5),
       maxstate(6)
    }

HpicfDcPsState ::= TEXTUAL-CONVENTION
    STATUS        current
    DESCRIPTION   "An enumerated value which provides the state of the
                  switch power supply entity."
    SYNTAX        INTEGER  {
       psNotPresent(1),
       psNotPlugged(2),
       psPowered(3),
       psFailed(4),
       psPermFailure(5),
       psMax(6),
       psAuxFailure(7),
       psNotPowered(8),
       psAuxNotPowered(9)
    }

Best regards,
Sebastian Grallert

Support for temperature sensors

I would like to read the reading of temperature sensors with Thola. Many devices support specific OIDs for temperature sensors.
Alas the correspondig component ist missing in Thola.

Runtime error while using SNMPv3 without context

I am trying to query SNMPv3 switches with the current version v0.3.2, unfortunately I get the following error after recompiling and starting:

./thola identify  10.201.22.13 --snmp-version 3 --snmp-v3-level authNoPriv --snmp-v3-user XXXX --snmp-v3-auth-key XXXXXX --snmp-v3-auth-proto MD5 --loglevel=trace
11:37AM TRC initialized built-in database request_id=c3cr8p2hbmbbmsu7n7v0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa106e0]

goroutine 78 [running]:
github.com/inexio/thola/internal/network.NewSNMPv3Client(0xe716f8, 0xc0001ae2c0, 0x7ffdd5bec6ff, 0xc, 0xa1, 0x2, 0x0, 0xc00029d040, 0x0, 0xc00029d630, ...)
        /root/thola/internal/network/snmp_client.go:211 +0xc0
github.com/inexio/thola/internal/network.createNewSNMPClientConcurrent(0xe716f8, 0xc0001ae2c0, 0xc00009b020, 0xc00009b080)
        /root/thola/internal/network/snmp_client.go:166 +0x29c
created by github.com/inexio/thola/internal/network.NewSNMPClientByConnectionData
        /root/thola/internal/network/snmp_client.go:108 +0x50e

Support for HP ProCurve HP J9728A 2920-48G

Hi there,
great work so far. From the docs i can't make out how to integrate for instance an HP J9728A 2920-48G switch model.
I assume that no definition exists for this model, but i'm not sure about that either. When trying to identify the switch i just get:

thola identify IP
Device:
Class: generic

Where can i define the folder where the YAML files are situated? And if HP Procurves are not supported yet, what ist the best way to add them and to extend thola?

State of the project

Hello there ๐Ÿ‘‹

I found thola and it looks like a interesting and promising project. Unfortunately the last release was two years ago and the thola.io website is offline.

Is this project still under active development?

Warning and critical values should be included in perfdata string

Currently, perfdata strings do not contain the warning and critical value - e.g. on CPU or Memory Usage checks:

./thola --ip 1.2.3.4 --snmp-community public check memory-usage --critical 50
CRITICAL: memory usage is 55% | 'memory_usage'=55%;;;;

To meet the monitoring plugins development guidelines, perfdata strings should be formatted like below:

label=value[uom];[warn];[crit];[min];[max]

SNMPv3 context mandatory?

Hi,
I'm currently write a new device class, I don't know why --snmp-v3-context is mandatory. Is it possible to have this parameter as an option?
I removed this option inside your code for a test and now thola is able to talk with these devices over SNMPv3.
Thanks a lot for you work!

Error: cannot create any connection to the device

Actually Im getting this error of Connection using Thola to identify a device.

[root@vm-centos8 thola]# ./thola identify vm-centos8
Error: cannot create any connection to the device

I followed the official guide and also I have Golang 1.16 already installed in my system.

go version go1.16.6 linux/amd64

My OS version is CentOS 8:

NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"

Timeout while running tests

Hi,
I tried to enhance a small part of thola and to run the tests afterwards where this error message greeted me.

ok  	github.com/inexio/thola/internal/parser	0.003s
?   	github.com/inexio/thola/internal/request	[no test files]
?   	github.com/inexio/thola/internal/tholaerr	[no test files]
?   	github.com/inexio/thola/internal/utility	[no test files]
?   	github.com/inexio/thola/internal/value	[no test files]
=== RUN   TestIntegration
[1/3] Building up test environment...
    integration_test.go:124:
        	Error Trace:	integration_test.go:124
        	Error:      	Received unexpected error:
        	           	timeout exceeded
        	Test:       	TestIntegration
        	Messages:   	an error occurred while waiting for the test devices being ready
--- FAIL: TestIntegration (195.11s)
FAIL
FAIL	github.com/inexio/thola/test	195.110s
?   	github.com/inexio/thola/test/create_testdata	[no test files]
FAIL

Am I doing something wrong?

--ifDescr-filter filters too far

As an Example let's say you have an output for TenGigabitEthernet1/1 , TenGigabitEthernet1/2 and TenGigabitEthernet1/11
thola check interface-metrics 127.0.0.1 --snmp-community public --ifDescr-filter 'TenGigabitEthernet1/1' --ifDescr-filter 'TenGigabitEthernet1/10'

And you only want to show the Result of TenGigabitEthernet1/11 and TenGigabitEthernet1/2 then TenGigabitEthernet1/11 will be omitted by the regex of --ifDescr-filter 'TenGigabitEthernet1/1' and will not be in the final Result ..

If you have questions you can get in contact with me for further details and explanations.

Levels of loglevel

Hi! i am trying to write my own class. Is it possible to change the loglevel to read the received value? In tshark I see the snmp response, but thola can't do anything with it. Currently I use loglevel=trace

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.