Skip to content

imidevops/hp-ilo-exporter-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hp-ilo-exporter-prometheus

Imran's ILO Exporter for HP servers

iLO Exporter

iLO Exporter is a simple Flask-based API that executes a shell script (ilo_exporter.sh) to query hardware metrics (via SNMP/iLO) and exposes them in a Prometheus-compatible format. This iLO Exporter is designed to work with HP servers, providing seamless monitoring and metrics integration.

🚀 Features

  • Disk health status
  • Disk temperature
  • Smart storage values
  • Power supply status
  • RAID status
  • Prometheus /metrics endpoint

📂 Project Structure

ilo-exporter/
├── app/
│ ├── main.py # Flask API exposing /metrics
│ ├── requirements.txt # Python dependencies
│ ├── ilo_exporter.sh # Script to fetch iLO metrics
├── Grafana/
│ ├── dashboard.json # Flask API exposing /metrics
├── Dockerfile # Container build file
└── README.md # Project documentation

🔧 Requirements

  • Python 3.12+
  • Flask
  • SNMP utilities (snmp, snmptrapd)
  • ipmitool (if needed)

If running in Docker, these are already installed.

Run Locally (without Docker)

Install Python deps:

apt install snmp snmptrapd
pip install -r app/requirements.txt

Start the app:

python app/main.py

Test:

curl "http://localhost:8000/metrics?host=hostname"

🐳 Running with Docker

Build:

docker build -t ilo-exporter .

Run (recommended: host networking for SNMP reachability):

docker run -d --name ilo-exporter --network host -p 8000:8000 ilo-exporter

Test:

curl "http://localhost:8000/metrics?host=hostname"

Prometheus Configuration

Example job (scraping exporter at 192.168.1.2:8000 for iLO host 192.168.1.23 ). Add to prometheus.yml:

scrape_configs:
  - job_name: 'host_192.168.1.23'
    metrics_path: '/metrics'
    params:
      host: ['192.168.1.23']
    static_configs:
      - targets: ['192.168.1.2:8000']
        labels:
          instance: '192.168.1.2'

Grafana Dashboard

Import the provided dashboard:

  • File: Grafana/dashboard.json
  • In Grafana: Dashboards → Import → Upload JSON → select your Prometheus datasource → Import
image image

The dashboard includes panels for:

  • Disk health
  • Disk temperature
  • Smart storage values
  • Power supply status
  • RAID status

Key Words:

  • HP iLO exporter
  • Prometheus exporter
  • Grafana dashboard
  • hardware monitoring

About

Imran's ILO Exporter for HP servers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published