Giter Club home page Giter Club logo

snmpexporter's Introduction

Build Status Coverage Status

snmpexporter

SNMP Poller written for DreamHack.

This product was previously called snmpcollector when it was part of the bigger monitoring system called "dhmon". It is nowadays fully standalone and should have very few if any ties back to DreamHack.

What it is

snmpexporter is a software that given a host that speaks SNMP will try to poll it and mangle the data into something more suitable as metrics.

The core feature of the snmpexporter is its annotation feature where it can join different SNMP OIDs together to create something better than what SNMP already has today. It also supports MIBs.

Why snmpexporter

Compared to the official Prometheus SNMP exporter, this exporter is more flexible as it knows how to read MIBs. That's basically it. It has some minor annotation features that might be useful, but nothing extraordinary.

Installation

You can either install it directly or use Docker/Kubernetes to run the exporter.

See Dockerfile for instructions on what dependencies are needed. Something like this (may not be up to date, again - see Dockerfile):

sudo apt-get install libsnmp-dev python3-distutils python3-dev python3-coverage python3-yaml python3-objgraph python3-twisted python3-pip python3-setuptools python3-wheel
pip3 install python3-netsnmp

mkdir -p /var/lib/mibs/std /tmp/librenms
cd /tmp/librenms
wget https://github.com/librenms/librenms/archive/master.zip
unzip master.zip
mv librenms-master/mibs/* /var/lib/mibs/std/

cp etc/snmp.conf /etc/snmp/

make
make install

Run make install to install.

To deploy to Kubernetes, upload the Docker image to a repository and modify snmpexporterd.k8s.yaml.

Running

There are two applications in snmpexporter:

  • snmpexporterd.py

This is an API server capable of doing scrapes via HTTP requests. This is an excellent way to integrate SNMP into Prometheus.

  • snmpexport.py

This is a utility script to test your configuration or debug SNMP polling behaviour. Run it to execute a one-off scraping.

snmpexporter's People

Contributors

bluecmd avatar holmsten avatar nlindblad avatar soundgoof avatar ventris avatar zmegolaz avatar

Stargazers

 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  avatar

snmpexporter's Issues

Question: Missing layer or target parameter

Hello, I am trying to test this but I am not sure what the layer is. I tried to run the manual .py with a target but it depends on the layer which I have no idea what it is.

Debug Juniper Performance

We seem to be walking non-existant OIDs on for example ifType.

Compare snmpwalk on ifType and snmpexporter.

Rework how we gather model number from targets

Currently we have a list of oids that we scrape to get the model for the model specific oids, and the first one that got data will be the one used.

def model(self, target):
model_oids = [
'.1.3.6.1.2.1.47.1.1.1.1.13.1', # Normal switches
'.1.3.6.1.2.1.47.1.1.1.1.13.1001', # Stacked switches
'.1.3.6.1.2.1.47.1.1.1.1.13.10', # Nexus
'.1.3.6.1.2.1.1.1.0', # Other appliances (sysDescr)
]

This is a problem with juniper mx10k routers as they will send its id number on 1.3.6.1.2.1.47.1.1.1.1.13.1 and not the readable model number.
The model number is send by the 1.3.6.1.2.1.1.1.0 oid on those routers and that is last in the current list.

Evaluate if it is possible to change this without breaking all other targets.

Suitable for applications such as LeoFS?

Quite new to snmp things, but is it suitable for LeoFS or the like?

https://leo-project.net/leofs/docs-old/configuration/configuration_4.html
LeoFS is an S3 compatible object storage system, from which I want to gather the data.

The whole thing is, I already have a working TSDB of dalmatinerdb, which by the design has a proxy to scape as prometheus, and I need to gather data from various services such as LeoFS as mentioned above.

I have tried the official snmp_exporter, but it does not compile on SmartOS (like Solaris).

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.