Skip to content

Create documentation by pulling information from a LibreNMS monitoring system instance using librenms-handler/API

License

Notifications You must be signed in to change notification settings

ds-04/librenms_apidoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Create documentation by pulling information from a LibreNMS monitoring system instance using librenms-handler/API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages