Giter VIP home page Giter VIP logo

opennms-ksc-to-grafana's Introduction

CircleCI

OpenNMS-KSC-To-Grafana

Convert OpenNMS KSC Reports to Grafana Dashboards.

Tested against Grafana 4.x, 5.x and 6.x; although the tool provides information about the generated dashboard on the standard output only on Grafana 5.x or newer.

It won't generate the graphs exactly as they are displayed by RRDtool or Backshift, as Grafana works on a different way, but the resulting charts should look very similar.

Installation

It is recommended to use NodeJS version 8 or greater with this project, as the code uses several ES6/ES7 features.

npm install
npm link

To run the tests:

npm test

Usage

$ ksc2grafana 

  Usage: ksc2grafana [options] <ksc_reports_config_file>

  Convert OpenNMS KSC Reports to Grafana Dashboards

  Options:

    -V, --version                          output the version number
    -h, --onms_url <onms_url>              OpenNMS IP or Hostname (default: http://localhost:8980/opennms)
    -u, --onms_user <onms_user>            OpenNMS ReST API user name (default: admin)
    -p, --onms_passwd <onms_passwd>        OpenNMS ReST API user password (default: admin)
    -H, --grafana_url <grafana_url>        Grafana IP or Hostname (default: http://localhost:3000)
    -U, --grafana_user <grafana_user>      Grafana ReST API user name (default: admin)
    -P, --grafana_passwd <grafana_passwd>  Grafana ReST API user password (default: admin)
    -h, --help                             output usage information

There is one mandatory argument, the full path to the KSC report configuration file $OPENNMS_HOME/etc/ksc-performance-reports.xml.

All the options are optional, and they have to be overriden if the script is executed outside the OpenNMS server, and when Grafana is running on a different server.

Future enhancements

  • Use the information available on the template model to add the title for the Y-Axis, the colors for the series, and the series type (line, area, etc.)
  • Verify if there is a Dashboard with the same name, if so, show an error and exit.
  • Add a flag to override the content of the Dashboard if there is one with the same name.

opennms-ksc-to-grafana's People

Contributors

agalue avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

willyd61

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.