Giter Site home page Giter Site logo

ibm / spectrum-virtualize-exporter Goto Github PK

View Code? Open in Web Editor NEW
10.0 8.0 8.0 1.61 MB

A prometheus.io exporter for IBM Spectrum Virtualize (e.g. FlashSystem 9150) .

License: Apache License 2.0

Dockerfile 0.98% Makefile 0.55% Go 98.47%
prometheus prometheus-exporter monitoring metrics spectrum-visualizer storage-metrics flashsystem9150 fs9150 spectrum-virtualize-exporter ibm-spectrum-virtualize

spectrum-virtualize-exporter's Introduction

spectrum-virtualize-exporter

This Prometheus Exporter collects metrics from storage solutions which are built with the IBM Spectrum Virtualize software. Storage solutions built with the IBM Spectrum Virtualize software are the IBM FlashSystem V9000 system, the IBM SAN Volume Controller and the IBM Storwize Family

Usage

Flag Description Default Value
config.file Path to configuration file spectrumVirtualize.yml
web.metrics-context Context under which to expose metrics /metrics
web.settings-context Context under which to expose setting metrics /settings
web.listen-address Address on which to expose metrics and web interface :9119
web.disable-exporter-metrics Exclude metrics about the exporter itself (promhttp_, process_, go_*) true
--collector.[name] Enable or disable collector. The [name] is in the list "lsmdisk, lsmdiskgrp, lsnodestats, lssystem, lssystemstats, lsvdisk, lsvdiskcopy, lscloudcallhome, lsdrive, lsenclosure, lsenclosurebattery, lsenclosurecanister, lsenclosurepsu, lshost, ip, lsmdisk_s, lsmdiskgrp_s, lsnodecanister, lsportfc" [true|false].
By default enabled collectors: lssystem, lssystemstats, lscloudcallhome, lsdrive, lsenclosure, lsenclosurebattery, lsenclosurecanister, lsenclosurepsu, lshost, ip, lsmdisk_s, lsmdiskgrp_s, lsnodecanister, lsportfc.

Building and running

  • Prerequisites:

    • Go compiler
  • Building:

    • binary

      export GOPATH=your_gopath
      cd your_gopath
      git clone https://github.com/IBM/spectrum-virtualize-exporter.git
      cd spectrum-virtualize-exporter
      make binary
      go install (Optional but recommended. This step will copy spectrum-virtualize-exporter binary package into $GOPATH/bin directory. It will be connvenient to copy the package to Monitoring docker image)
    • docker image

      make docker
  • Running:

    • Run Locally

      ./spectrum-virtualize-exporter --config.file=/etc/spectrumVirtualize/spectrumVirtualize.yml
    • Run as docker image

      docker run -it -d -p 9119:9119 -v /etc/spectrumVirtualize/spectrumVirtualize.yml:/etc/spectrumVirtualize/spectrumVirtualize.yml --name spectrum-virtualize-exporter spectrum-virtualize-exporter --config.file=/etc/spectrumVirtualize/spectrumVirtualize.yml --log.level debug
    • Visit http://localhost:9119/metrics

Configuration

The spectrum-virtualize-exporter loads the ./spectrumVirtualize.yml config file by default.

Required settings

  • targets.[].ipAddress: IP address of the storage device.
  • targets.[].userid: Username to access the storage device.
  • targets.[].password: User password to access the storage device.

Optionally settings

  • extra_labels.[].name: Customized label name adding to metrics.
  • extra_labels.[].value: Value of the customized label.
  • tls_server_config.ca_cert: The CA certificate chain file in pem format for verifying client certificate.
  • tls_server_config.server_cert: The server's certificate chain file in pem format.
  • tls_server_config.server_key: The server's private key file.

Config File Sample

targets:
  - ipAddress: IP address
    userid: user
    password: password
extra_labels:
  - name: pod_name
    value: pod_value
tls_server_config:
  ca_cert: ./certs/ca-root.crt
  server_cert: ./certs/server.crt
  server_key: ./certs/server.key

If any of the "ca_cert", "server_cert" or "server_key" are not provided, the exporter http server will start without https(mTLS) enabled.

Exported Metrics

  • It recommended to scrape every 30 seconds.
RESTful API Description Default Metrics Total number of metrics
- Metrics from the prometheus exporter itself. Disabled List 30
- Metrics from the spectrum exporter itself. Enabled List 4
lssystem Get a detailed view of a clustered system (system). Enabled List 57
lssystemstats Get the most recent values of all node statistics in a system. Enabled List 49
lsnodestats Ge the most recent values of statistics for all nodes. Disabled List 46
lsmdisk Get a detailed view of managed disks (MDisks) visible to the clustered system. Disabled List 1
lsmdiskgrp Get a detailed view of storage pools that are visible to the clustered system. Disabled List 16
lsvdisk Get detailed view of volumes that are recognized by the system. Disabled List 1
lsvdiskcopy Get volume copy information. Disabled List 1

Exported Setting Metrics

  • It recommended to scrape every >15 minutes.
RESTful API Description Default Metrics Total number of metrics
- Metrics from the prometheus exporter itself. Disabled List 30
- Metrics from the spectrum exporter itself. Enabled List 4
lscloudcallhome The status of the Call Home information. Enabled List 1
lsenclosure The summary of the enclosures including canister and PSU. Enabled List 1
lsenclosurebattery The information about the batteries. Enabled List 2
lsenclosurecanister The detailed status of each canister in enclosures. Enabled List 1
lsenclosurepsu The information about each power-supply unit (PSU) in enclosures. Enabled List 1
lsdrive The configuration information and drive vital product data (VPD). Enabled List 3
lshost The concise information about all the hosts visible to the system. Enabled List 1
lsnodecanister The node canisters that are part of the system. Enabled List 1
lsportfc The status and properties of the Fibre Channel (FC) input/output (I/O) ports for the clustered system. Enabled List 1
lsmdisk The info of managed disks (MDisks) visible to the system. Enabled List 1
lsmdiskgrp The info of storage pools that are visible to the system. Enabled List 1
- The connection status of system IPs(PSYS, SSYS, SVC1, SVC2). Enabled List 1

References

Contributing

Third party contributions to this project are welcome!

In order to contribute, create a Git pull request, considering this:

  • Test is required.
  • Each commit should only contain one "logical" change.
  • A "logical" change should be put into one commit, and not split over multiple commits.
  • Large new features should be split into stages.
  • The commit message should not only summarize what you have done, but explain why the change is useful.
  • The commit message must follow the format explained below.

What comprises a "logical" change is subject to sound judgement. Sometimes, it makes sense to produce a set of commits for a feature (even if not large). For example, a first commit may introduce a (presumably) compatible API change without exploitation of that feature. With only this commit applied, it should be demonstrable that everything is still working as before. The next commit may be the exploitation of the feature in other components.

For further discussion of good and bad practices regarding commits, see:

License

The spectrum-virtualize-exporter is licensed under the Apache 2.0 License.

spectrum-virtualize-exporter's People

Contributors

charles1000chen avatar gaelatcheops avatar leopoldjuergen avatar mingxiaguo avatar rightblank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spectrum-virtualize-exporter's Issues

TODOs for publishing to GitHub

List of TODOs for publishing to GitHub (checkmark when done)

  • Add the Apache 2.0 license to source code header.
  • Scan the repo for occurrences of "private", "confidential", "internal" and resolve any occurrences
  • Add LICENSE.md file with Apache 2.0 license text
  • Add DCO document
  • Have "Contributing" section in the documentation that states who can contribute and what the rules are
  • Have make target for generating the documentation
  • Set up Actions workflow for publishing the documentation to github pages
  • Rename github.ibm.com/ZaaS/spectrum-virtualize-exporter/ in all .go files
  • Get manager (Bill's) re-approval

Slow run of lssystem collector on SVC nodes

Hello,

I'm trying out the latest commit of this exporter and lssystem collector is taking more than 20s to execute (average around 22s) while lssystemstats executes in 0,7s.

This collector is slow only on SVC nodes (SV1 nodes with firmware 8.3.1.5). Collecting from Storwize 5020 (2078-224 with firmware 8.2.1.11) works as normally (under 1s response).

If I ssh onto the node and run lssystem, I get the response instantly. Calling lssystem via curl is also fast, so it must be something in the code I guess, but I'm not familiar with Go profiling.

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.