Giter Site home page Giter Site logo

vast-exporter's Introduction

VAST Prometheus Exporter

The Prometheus exporter connects to VMS and leverages its REST API to extract state and metric information. It listens to port 8000 by default. This can be changed using the --port parameter.

Content

  1. Cluster capacity and states.
  2. Physical component states (NIC, node, drive, etc').
  3. Logical objects: view, quota, replication targets, etc'.
  4. Performance metrics (BW/IOPS/latency/etc') for cluster, nodes, views and top users.

Pre-requisities

Cluster of version 4.2 and up.

Docker Installation

# build a local docker image
$ ./build.sh
# run a docker container in the background
$ ./run.sh --user=<USER> --password=<PASSWORD> --address=<ADDRESS>

Python Installation

$ pip install -r requirements.txt
$ ./vast_exporter.py --user=<USER> --password=<PASSWORD> --address=<ADDRESS>

Usage

Beyond the user/password/address parameters which are required there are optional parameters. Optional features inlude specifying a custom SSL certificate and collection of top user performance data. Run the exporter with --help to see a description.

Testing

To run the exporter once and make sure no errors are raised run the following:

$ ./vast_exporter.py --user=<USER> --password=<PASSWORD> --address=<ADDRESS> --test
2022-04-28 11:36:47,045 MainThread INFO: VAST Exporter started running. Listening on port 8001
2022-04-28 11:36:58,658 MainThread INFO: Collection is successful!

To run the exporter forever remove the --test parameter and get the output using curl:

$ curl http://localhost:8000 | grep vast_collector
# HELP vast_collector_latency Total collection time
# TYPE vast_collector_latency summary
vast_collector_latency_count 1.0
vast_collector_latency_sum 7.011876339
...

Monitoring

Besides the obious stdout output where errors will land, the following metric will be incremeneted upon an error:

vast_collector_errors_total

Prometheus Config

Full explanation of Prometheus configuration here: https://prometheus.io/docs/prometheus/latest/configuration/configuration/

The following snippet shows how to add the VAST exporter to Prometheus:

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "vast"

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.
    scrape_interval: 1m
    scrape_timeout: 50s
    
    static_configs:
      - targets: ["<EXPORTER HOST>:8000"]

How to run Prometheus using docker:

docker run -p 9090:9090 -v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

vast-exporter's People

Contributors

alonho avatar idanhaim avatar kaputya avatar

Watchers

James Cloos 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.