Giter Site home page Giter Site logo

make-alex / docker-secg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ninoabbate/docker-secg

0.0 0.0 0.0 82 KB

Prometheus SNMP exporter configuration generator in a docker container

License: Apache License 2.0

Shell 58.30% Dockerfile 41.70%

docker-secg's Introduction

SNMP exporter config generator

The config generator uses NetSNMP to parse MIBs, and generates configs for the Prometheus snmp_exporter using them. This is a docker container built to facilitate the config generation, it is built from scratch starting from Alpine Linux and SNMP exporter config generator source code SNMP exporter config generator.

Requirements

  • docker
  • your device MIBs

How to run it

For demo purposes I've added the Palo Alto firewall mibs to this repo.

  • Clone this repo
  • Run the aabbate/secg container mounting the MIBs directory, the generator.yml file and the empty snmp.yml file
$  docker run --rm -v "$PWD/mibs:/root/.snmp/mibs" \
	-v "$PWD/generator.yml:/root/go/src/github.com/prometheus/snmp_exporter/generator/generator.yml" \
	-v "$PWD/snmp.yml:/root/go/src/github.com/prometheus/snmp_exporter/generator/snmp.yml" aabbate/secg
  • Once completed, you will find the generated configuration on the snmp.yml file, which can be used on your SNMP-exporter installation.

Volumes mounts

In order to generate the configuration you need to set the following mounts:

  • the MIBS volume: where you will put your mibs
    • bind your directory with /root/.snmp/mibs
  • the generator.yml file: where the generator will get the OIDs to walk
    • bind your file with /root/go/src/github.com/prometheus/snmp_exporter/generator/generator.yml
  • the snmp.yml file: where you will find the generated configuration for SNMP-exporter
    • bind your file with /root/go/src/github.com/prometheus/snmp_exporter/generator/snmp.yml

Container tags

The aabbate/secg container follows the snmp_exporter tag/release naming convention. The tag latest is the latest tag version released on snmp_exporter repository.

To generate your custom configuration:

  • Execute a snmpwalk on your device in order to get the right OIDs
  • Clone this repo
  • Edit the generator.yml adding your OIDs
  • Copy your MIBs files on mibs directory
  • Run the aabbate/secg container mounting:
    • the mibs directory to /root/.snmp/mibs
    • the empty snmp.yml to /root/go/src/github.com/prometheus/snmp_exporter/generator/snmp.yml
    • your custom generator.yml file to /root/go/src/github.com/prometheus/snmp_exporter/generator/generator.yml
  • Get the configuration from the updated snmp.yml file.

docker-secg's People

Contributors

ninoabbate avatar make-alex avatar

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.