Skip to content

Commit

Permalink
Fix up the Prometheus monitoring docs
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Jun 24, 2023
1 parent 7626c6b commit ea23bb1
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions source/how-tos/monitoring/prometheus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Dependencies:
Install via RPM
--------------------------

For RHEL/CentOS 7 and RHEL/Rocky 8 systems the `ondemand_exporter`_ can be installed via RPM.
For yum/dnf based systems the `ondemand_exporter`_ can be installed via RPM.

.. code-block:: sh
Expand All @@ -34,22 +34,24 @@ For RHEL/CentOS 7 and RHEL/Rocky 8 systems the `ondemand_exporter`_ can be insta
The RPM will install the following files that should work out of the box:

- **RHEL/CentOS 7 only**: /opt/rh/httpd24/root/etc/httpd/conf.d/ondemand_exporter.conf
- **RHEL/Rocky 8 only**: /etc/httpd/conf.d/ondemand_exporter.conf
- **RHEL/Rocky/AlmaLinux 8 & 9 only**: /etc/httpd/conf.d/ondemand_exporter.conf
- /etc/sudoers.d/ondemand_exporter

Ensure that the new Apache configuration is loaded by restarting Apache

RHEL/CentOS 7
.. tabs::

.. code-block:: sh
.. tab:: RHEL/CentOS 7

sudo systemctl restart httpd24-httpd
.. code-block:: sh
RHEL/Rocky 8
sudo systemctl restart httpd24-httpd
.. code-block:: sh
.. tab:: RHEL/Rocky/Alma Linux 8 & 9

sudo systemctl restart httpd
.. code-block:: sh
sudo systemctl restart httpd
Start the service

Expand All @@ -69,7 +71,7 @@ Check for the `ondemand_exporter Latest Release`_ version number. Replace ``VER

.. code-block:: sh
VERSION="0.8.0"
VERSION="0.10.0"
ARCHIVE="ondemand_exporter-${VERSION}.linux-amd64"
wget -O /tmp/${ARCHIVE}.tar.gz https://github.com/OSC/ondemand_exporter/releases/download/v${VERSION}/${ARCHIVE}.tar.gz
tar xf /tmp/${ARCHIVE}.tar.gz -C /tmp
Expand All @@ -78,19 +80,21 @@ Check for the `ondemand_exporter Latest Release`_ version number. Replace ``VER
sudo install -o root -g root -m 0644 /tmp/${ARCHIVE}/files/ondemand_exporter.service /etc/systemd/system/
sudo systemctl daemon-reload
RHEL/CentOS 7
.. tabs::

.. code-block:: sh
.. tab:: RHEL/CentOS 7

sudo install -o root -g root -m 0440 /tmp/${ARCHIVE}/files/apache.conf /opt/rh/httpd24/root/etc/httpd/conf.d/ondemand_exporter.conf
sudo systemctl restart httpd24-httpd
.. code-block:: sh
RHEL/Rocky 8
sudo install -o root -g root -m 0440 /tmp/${ARCHIVE}/files/apache.conf /opt/rh/httpd24/root/etc/httpd/conf.d/ondemand_exporter.conf
sudo systemctl restart httpd24-httpd
.. code-block:: sh
.. tab:: RHEL/Rocky/Alma Linux 8 & 9

.. code-block:: sh
sudo install -o root -g root -m 0440 /tmp/${ARCHIVE}/files/apache.conf /etc/httpd/conf.d/ondemand_exporter.conf
sudo systemctl restart httpd
sudo install -o root -g root -m 0440 /tmp/${ARCHIVE}/files/apache.conf /etc/httpd/conf.d/ondemand_exporter.conf
sudo systemctl restart httpd
**(Optional)** If Passenger was not installed via ``ondemand-passenger`` RPM. Adjust the path to ``passenger-status`` as needed

Expand All @@ -101,6 +105,7 @@ RHEL/Rocky 8
[Service]
Environment="PASSENGER_STATUS=/usr/sbin/passenger-status"
EOF
sudo systemctl daemon-reload
Start the service
Expand Down

0 comments on commit ea23bb1

Please sign in to comment.