GithubHelp home page GithubHelp logo

gd9394 / isilon_data_insights_connector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from isilon/isilon_data_insights_connector

0.0 1.0 0.0 1.61 MB

Connector to fetch stats from OneFS and push them to InfluxDB/Grafana

License: MIT License

Python 99.37% Shell 0.63%

isilon_data_insights_connector's Introduction

Isilon Data Insights Connector

The isi_data_insights_d.py script controls a daemon process that can be used to query multiple OneFS clusters for statistics data via the Isilon OneFS Platform API (PAPI). The collector uses a pluggable module for processing the results of those queries. The provided stats processor defined in influxdb_plugin.py sends query results to an InfluxDB backend. Additionally, several Grafana dashboards are provided to make it easy to monitor the health and status of your Isilon clusters. The Connector now supports running under either Python 2 or Python 3.

Installation Instructions

For detailed instructions on setting up a VM and installing the Connector on the VM refer to:

Keith Anderson's Blog post on configuring the Collector

For a bit less detail, perhaps quicker setup, refer to the instructions below.

It is dangerous and unnecessary to install Python packages as root (sudo pip ...). The data insights collector needs no special privileges and can be installed and run as an unprivileged user. Because of this, the recommended way to install the Connector is via a Python virtual environment. The virtual environment installation installs the required Python dependencies into a Python Virtual Environment. The Connector is then run directly from the source directory.

  • To install the connector in a virtual environment using the default Python interpreter on the system, run:
./setup_venv.sh
  • To explicitly install using "python3" as the interpreter, run
./setup_venv3.sh

Run Instructions

  • Rename or copy the example configuration file, example_isi_data_insights_d.cfg, to isi_data_insights_d.cfg. The path ./isi_data_insights_d.cfg is the default configuration file path for the Connector. If you use that name and run the Connector from the source directory then you don't have to use the --config parameter to specify a different configuration file.
  • Edit isi_data_insights_d.cfg to configure the collector to query the set of Isilon OneFS clusters that you want to monitor. Do this by modifying the config file's clusters parameter.
  • The example configuration file is pre-setup to gather and send several sets of stats to InfluxDB via the influxdb_plugin.py. So if you intend to use the default plugin you will need to install InfluxDB. InfluxDB can be installed locally (i.e on the same system as the Connector) or remotely (i.e. on a different system). For installation instructions for the current (1.7) version of Influxdb, refer to this link
  • If you installed InfluxDB to somewhere other than localhost and/or port 8086 then you'll also need to update the configuration file with the address and port of the InfluxDB.
  • Activate the virtualenv it before running the Connector by running:
. .venv/bin/activate

or, if you installed the Python 3 version, by running:

. .venv3/bin/activate
  • To run the Connector:
./isi_data_insights_d.py start

Grafana Setup

Included with the Connector source code are several Grafana dashboards that make it easy to monitor the health and status of your Isilon clusters. To view the dashboards with Grafana, follow these instructions:

  • Install and configure Grafana to use the InfluxDB as a data source. Note that the provided Grafana dashboards have been tested to work with Grafana versions up to and including 6.5.1. Also, note that the influxdb_plugin.py creates and stores the statistics data in a database named isi_data_insights. You'll need that information when following the instructions for adding a data source to Grafana. Also, be sure to configure the isi_data_insights data source as the default Grafana data source using the Grafana Dashboard Admin web-interface.
  • Import the Grafana dashboards.
    • grafana_cluster_list_dashboard.json Multi-cluster Summary Dashboard Screen Shot
    • grafana_cluster_capacity_utilization_dashboard.json Cluster Capacity Utilization Dashboard Screen Shot
    • grafana_cluster_detail_dashboard.json Cluster Detail Dashboard Screen Shot
    • grafana_cluster_protocol_dashboard.json Cluster Protocol Detail Dashboard Screen Shot

Import (optional) HDFS specific dashboards:

  • grafana_hadoop_home.json Hadoop Home Dashboard Screeenshot

  • grafana_hadoop_datanodes.json Hadoop Home Dashboard Screeenshot

  • If you had previously started the Connector, there should already be data in your database displayed in the dashboards. One common issue that might prevent your dashboards from showing up correctly is if the date/time on your Isilon clusters is not closely enough in-synch with the date/time used by Grafana. Synchronizing the date/time of all the systems to within a few seconds of each other should be enough to fix the issue.

Kapacitor Integration

Kapacitor is an add-on component that, when used in conjunction with the Connector enables flexible, configurable, real-time notifications of alert conditions based off the statistics data streaming into the InfluxDB. For more information on how to integrate the Connector and InfluxDB with Kapacitor refer to:

Kapacitor Integration Instructions

Customizing the Connector

The Connector is designed to allow for customization via a plugin architecture. The default plugin, influxd_plugin.py, is configured via the provided example configuration file. If you would like to process the stats data differently or send them to a different backend than the influxdb_plugin.py you can implement a custom stats processor. Here are the instructions for doing so:

  • Create a file called my_plugin.py, or whatever you want to name it.
  • In the my_plugin.py file define a process(cluster, stats) function that takes as input the name/ip-address of a cluster and a list of stats. The list of stats will contain instances of the isi_sdk_8_0/models/CurrentStatisticsStat class or isi_sdk_7_2/models/CurrenStatisticsStat class, but it makes no difference because the two classes are the same regardless of the version.
  • Optionally define a start(argv) function that takes a list of input args as defined in the config file via the stats_processor_args parameter.
  • Optionally define a stop() function.
  • Put the my_plugin.py file somewhere in your PYTHONPATH (easiest is to put into the same directory as the other Python source code files).
  • Update the isi_data_insights_d.cfg file with the name of your plugin (i.e. 'my_plugin')
  • Restart the isi_data_insights_d.py daemon:
./isi_data_insights_d.py restart

Extending and/or Contributing to the Connector

There are multiple ways for anyone using the Connector to interact with our dev team to request new features or discuss problems.

  • Create a new issue on the Issues tab.
  • Use the discussion capability of the Isilon SDK Info Hub page.

Also, just like an other project on github.com we are entirely open to external code contributions:

  • Fork the project, modify it, then initiate a pull request.

isilon_data_insights_connector's People

Contributors

apecoraro avatar dmoxon avatar mend-bolt-for-github[bot] avatar nickyruggs avatar tenortim avatar tux1337 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.