Giter Site home page Giter Site logo

snmp-grapher's Introduction

Overview

snmp_grapher is a Python tool that automatically creates RRDs with rrdtool and updates them with values queried from an SNMP agent of your choice, it also renders a simple HTML page where you can watch your RRD graphs (they update in real-time too!)

Installation

snmp_grapher requires you to have a working Python 3 interpreter and the pip package manager, you also need a working net-snmp installation and the rrdtool software package.

To install all the dependencies on Ubuntu (assuming you already have a working net-snmp installation)

sudo apt install python3 python3-pip libsnmp-dev librrd-dev rrdtool
pip3 install jinja2 easysnmp rrdtool pyyaml

Usage

usage: python3 main.py [-h] [-v] [-f] configname

optional arguments:
  -h, --help  show this help message and exit
  -v          Enable verbose mode
  -f          Force replacement of existing RRDs

configname is the name (with the .yaml extension omitted) of a YAML file inside the hostsconfig folder, such config file tells snmp_grapher what RRDs to create, with what values they should be updated, and what graphs should be rendered.

example.yaml is an example config file, it creates two RRDs measuring the inbound and outbound bytes (measured in megabits) from the network interface with interface index 2 and renders 3 graphs, one showing outbound bytes only, one showing inbound bytes and only, and the last one showing both the inbounds and outbounds measurements.

You can check these graphs by running python3 main.py example and opening the automatically generated example.html file in your browser.

snmp-grapher's People

Contributors

rasoini avatar

Watchers

 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.