Skip to content

exporter to get metrics from redfish based hardware such as lenovo/dell/superc servers

License

Notifications You must be signed in to change notification settings

mjavier2k/redfish_exporter

 
 

Repository files navigation

redfish_exporter

A prometheus exporter to get metrics from redfish based servers such as lenovo/dell/Supermicro servers.

Configuration

Configuration for hostname supports regex matching for servers with the same naming convention.

An example configure given as an example:

hosts:
  10.36.48.24:
    username: admin
    password: pass
  serv.+:
    username: admin
    password: pass
  default:
    username: admin
    password: pass

Note that the default entry is useful as it avoids an error condition that is discussed in this issue.

Building

To build the redfish_exporter executable run the command:

make build

or build in centos 7 docker image

make docker-build-centos7

or build in centos 8 docker image

make docker-build-centos8

Running

To run redfish_exporter do something like:

redfish_exporter --config.file=redfish_exporter.yml

and run

redfish_exporter -h

for more options.

Scraping

We can get the metrics via

curl http://<redfish_exporter host>:9610/redfish?target=10.36.48.24

or by pointing your favourite browser at this URL.

prometheus configuration

You can then setup Prometheus to scrape the target using something like this in your Prometheus configuration files:

  - job_name: 'redfish-exporter'

    # metrics_path defaults to '/metrics'
    metrics_path: /redfish

    # scheme defaults to 'http'.

    static_configs:
    - targets:
       - 10.36.48.24
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: localhost:9610  ### the address of the redfish-exporter address

Note that port 9610 has been reserved for the redfish_exporter.

Supported Devices (tested)

  • Lenovo ThinkSystem SR850 (BMC 2.1/2.42)
  • Lenovo ThinkSystem SR650 (BMC 2.50)

Acknowledgement

  • gofish provides the underlying library to interact servers

About

exporter to get metrics from redfish based hardware such as lenovo/dell/superc servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.3%
  • Makefile 3.0%
  • Shell 0.7%