Giter Club home page Giter Club logo

librenms_apidoc's Introduction

librenms_apidoc

Create documentation by pulling information from a LibreNMS monitoring system instance, using librenms-handler and API interaction: https://github.com/WhaleJ84/librenms_handler

Project Status: testing

  • Not 10/10 on pylint right now...
  • verify = False ... is SSL cert verify False... you can set to True if you want...

Requirements

  • requires python3
  • requires pip3 install of modules in requirements.txt - recommend run as unpriv user

Introduction

Use this script to output a file using python module tabulate e.g. RST/CSV.

The file is created by the script which queiries your LibreNMS monitoring system instance. It works through LibreNMS device groups, obtaining info for each host in the device group. Therefore its good to have these groupings in order either via GUI or API.

Global variables including the access token are defined in librenms_apidoc_settings.py, by default the output is a pandas dataframe in RST format. You could change that to something else (.e.g CSV).

Additional details

  • You need your LibreNMS URL configured and TOKEN in librenms_apidoc_settings.py
  • A regex in the code stops VMWare serials/macs manifesting in the output, by simply replacing with the word VMWare if found.
  • You can configure groups to exlude in librenms_apidoc_settings.py

Setup

Install pip3 requirements for this project.

pip3 install --user -r requirements.txt

Configure librenms_apidoc_settings.py as mentioned. TOKEN + URL at very least.

Run the script, output is in CWD.

./librenms_apidoc.py

Further setup - Envisaged usage

  • Use a cronjob and/or gitlab CI
  • Upload content automatically to Wiki or internal web server you have control of.

librenms_apidoc's People

Contributors

ds-04 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

librenms_apidoc's Issues

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.