yt-snmp-go-poller

module
v0.0.0-...-e369597 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2023 License: MIT

README

Yet another librenms go poller

Inspired by https://github.com/geordish/librenms-go-poller, however we decided to implement queueing within the poller, to avoid additional dependencies.

Destination for the metrics is going to be Clickhouse, however any other transport can be easily plugged in via corresponding storer.

The idea is to get the devices via sql from LibreNMS database, poll them for interface statistics and any other SNMP metrics that we need. Flattened metrics will be sent to Clickhouse in bulk uploads.

Config

Query will require the exact fields, otherwise the model won't unmarshal.

export DB_USERNAME=librenms
export DB_PASSWORD=foo
export DB_HOST=localhost
export DB_PORT=3306
export DB_NAME=librenms
export QUERY="SELECT device_id, hostname, sysName, community, authlevel, authname, authpass, authalgo, cryptopass, cryptoalgo, snmpver, port, transport,  bgpLocalAs, sysObjectID, sysDescr, sysContact, version, hardware, features, os, status from devices"

Running

The code is WIP/POC, so run at your own risk cd cmd/poller go run .

Directories

Path Synopsis
cmd
sql
internal
lgr

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL