Giter VIP home page Giter VIP logo

svc2influxdb's Introduction

SVC 2 InfluxDB

A simple storage metrics collector (written in Python) from IBM SVC equipments whose inject them into a InfluxDB database.

Works with all IBM kind of hardware running SVC (FlashSystem V9000, V840, ...)

Requirements

This script use python 3 and modules like 'paramiko', 'requests' and 'influxdb'. You can install them by using this command line:

$ pip install -r requirements.txt

Usage

$ svc2influxdb.py your_config.file [--fixed]

The only required argument is the configuration file.

The --fixed option can be used to force the script to use the same timestamp for the metrics collect from your equipments. It can be helpful to "synchronize" all the metrics collected during a same batch to facilitate the visualization (with Grafana for example).

The time precision used is the millisecond. The capacity values shown in the measurements are in bytes (think to adjust your data type in Grafana if you use it).

Configuration

The configuration file use a .ini syntax.

Declare your InfluxDB database

[INFLUXDB]
    address = localhost
    username = youruser
    password = yourpassword
    database = svc2influxdb

The INFLUXDB section let you describe the location of your database. The address field is required (can be a name or an IP address).

The fields username and password can be let blank if your database accept anonymous connections.

The database field can be blank. In this case the default database name svc2influxdb will be used. In all cases, the database will be created if it doesn't exists.

Add IBM SVC informations

[YOUR_SVC_NAME]
    address = localhost
    username = your_user
    password = your_password

    tag_name1 = value1
    tag_name2 = value2

You can add any SVC sections you need. The script will be collect the metrics in a sequential mode.

A SVC section use the name of your SVC equipment (a short name or a nickname why not).

The fields address, username and password are required. It's the same informations you use for a SSH connection.

You can also add tags if you need it. These tags are used to described some informations to enrich your time series. For example you can specify if this SVC is used in a production environment or it's location. Example :

    datacenter = Paris
    room = AB3

The key/value pair doesn't matter. The informations can be used in your InfluxQL requests.

InfluxDB results

The names of the measurements are the same labels shown while you using CLI commands like 'lsvdisk' or 'lsmdiskgrp' (prefixed by 'pool_' or 'volume_' ). Please refer to the IBM online help to get the exact signification of all of them.

List of the measurements:

List of measurements

Example of data visualization with Grafana

Example of visualization with Grafana

TODO

Pull requests are welcome ! ๐Ÿ˜ƒ

  1. Change the sequential mode to asynchronous mode with the asyncio module
  2. Collect not only the storage metrics but also performance metrics

Miscellaneous

The only commands send to your IBM SVC by this software are :

  • lsmdiskgrp
  • lsvdisk
  • lsvdisk VDISK_ID

License

This source code is under GNU GPL3 license.

svc2influxdb's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

svc2influxdb's Issues

script fails with below error.

See below. Am I missing any modules for this?

./svc2influxdb.py svc2influxdb.conf

Traceback (most recent call last):
File "./svc2influxdb.py", line 242, in
series += svc_volume.collect()
File "./svc2influxdb.py", line 210, in collect
return [self._builder.parse(line, 'volume') for line in volume_details]
File "./svc2influxdb.py", line 210, in
return [self._builder.parse(line, 'volume') for line in volume_details]
File "./svc2influxdb.py", line 105, in parse
prefix=prefix))
File "./svc2influxdb.py", line 82, in _build_series
'fields': {'value': int(value)}}
ValueError: invalid literal for int() with base 10: ''

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.