Skip to content

Commit

Permalink
Merge pull request #501 from stackhpc/feature/yoga/redfish-exporter
Browse files Browse the repository at this point in the history
Adds seed_redfish_exporter_container
  • Loading branch information
markgoddard committed Jul 16, 2024
2 parents d6b1b3a + bac0dc7 commit 1df10c3
Show file tree
Hide file tree
Showing 10 changed files with 829 additions and 1,114 deletions.
34 changes: 34 additions & 0 deletions doc/source/configuration/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,37 @@ customer. The following are key considerations for that conversation:
e.g. bond0 on a controller has eth0 and eth1 as members. bond1 on a compute
uses eth0 and eth1 as members. This is not problematic as it is only
the bond itself that is relabelled.

Redfish exporter
================

Redfish exporter will query the overcloud BMCs via their redfish interfaces
to produce various metrics relating to the hardware, and system health.

To configure the exporter, adjust the variables in
``$KAYOBE_CONFIG_PATH/stackhpc-monitoring.yml`` to use appropriate values:

.. code-block:: yaml
# Whether the redfish exporter is enabled.
stackhpc_enable_redfish_exporter: true
# Redfish exporter credentials
redfish_exporter_default_username: "{{ ipmi_username }}"
redfish_exporter_default_password: "{{ ipmi_password }}"
# The address of the BMC that is queried by redfish exporter for metrics.
redfish_exporter_target_address: "{{ ipmi_address }}"
Deploy the exporter on the seed:

.. code-block:: console
kayobe seed service deploy -t seed-deploy-containers -kt none
It is required that you re-configure the Prometheus, Grafana
services following deployment, to do this run the following Kayobe command.

.. code-block:: console
kayobe overcloud service reconfigure -kt grafana,prometheus
6 changes: 6 additions & 0 deletions etc/kayobe/containers/redfish_exporter/post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Restart redfish exporter container if config changed
become: true
command: docker kill -s SIGHUP redfish_exporter
when:
- redfish_exporter_config is changed
16 changes: 16 additions & 0 deletions etc/kayobe/containers/redfish_exporter/pre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

- name: Ensure /opt/kayobe/containers/redfish_exporter exists
file:
path: "/opt/kayobe/containers/redfish_exporter"
state: directory
mode: 0770
become: true

- name: Template redfish exporter configuration file
template:
src: "{{ kayobe_config_path }}/containers/redfish_exporter/redfish_exporter.yml"
dest: /opt/kayobe/containers/redfish_exporter/
mode: 0660
become: true
register: redfish_exporter_config
5 changes: 5 additions & 0 deletions etc/kayobe/containers/redfish_exporter/redfish_exporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
hosts:
default:
username: "{{ redfish_exporter_default_username }}"
password: "{{ redfish_exporter_default_password }}"
6 changes: 6 additions & 0 deletions etc/kayobe/inventory/groups
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,9 @@ rgws

[cis-hardening:children]
overcloud

###############################################################################
# Monitoring groups.

[redfish_exporter_targets:children]
overcloud
Loading

0 comments on commit 1df10c3

Please sign in to comment.