Git Product home page Git Product logo

hpraid_exporter's Introduction

Prometheus exporter for HP RAID controllers

This exporter for the Prometheus monitoring system calls into the ssacli utility to provide metrics for errors reported by HP RAID hardware. Under the hood, it invokes the following command when being scraped:

ssacli ctrl all diag file=/tmp/...

This command generates a ZIP file containing a diagnostic report. The exporter opens the ZIP file and extracts the ADUReport.xml file. It then reports all of the active error conditions from all of the <Errors/> blocks.

There are at least two other Prometheus metrics exporters for HP RAID controllers (1, 2). Both these exporters are built around the idea of parsing the utility's user-readable output using regular expressions, as opposed to relying on the utility's XML output. This makes them a lot more brittle.

Though this exporter only provide metrics for errors for the time being (hpraid_errors), it should be fairly easy to extend it to expose other attributes. All of those metrics should already be part of the ADUReport.xml file that is used by this exporter.

Building this exporter

The exporter can be built using Bazel:

bazel build //...

Using this exporter

The following command will start the exporter, causing it to listen on TCP port 9423:

./hpraid_exporter

Do note that it expects ssacli to be in $PATH. It also needs to run as a user that is capable of running this command successfully (root).

Example metrics output:

# HELP hpraid_errors Errors in the diagnostic report reported by the RAID controller.
# TYPE hpraid_errors gauge
hpraid_errors{device="ArrayController=Smart Array P410i in Embedded Slot",message="The cache is temporarily disabled.",severity="Warning"} 1
# HELP hpraid_scrape_success Whether scraping the HP RAID controller stats was successful.
# TYPE hpraid_scrape_success gauge
hpraid_scrape_success 1

hpraid_exporter's People

Contributors

hoffie avatar edschouten avatar

Stargazers

Robin Klussmann 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.