Chapter 4. Installing the Performance Monitoring Suite

4.1. Installing the Collection Aggregator/Relay

  1. Locate a bare metal system that meets the following minimum specifications:

    • 4 GB of memory
    • Single-socket Xeon class CPU
    • 500 GB of disk space
  2. Install Red Hat Enterprise Linux 7.
  3. Allow the system to access the Operational Tools packages:

    1. Register the system and subscribe it:

      # subscription-manager register
      # subscription-manager list --consumed

      If an OpenStack subscription is not attached automatically, see the documentation for manually attaching subscriptions.

    2. Disable initially enabled repositories and enable only the ones appropriate for the Operational Tools:

      # subscription-manager repos --disable=*
      # subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-openstack-8-optools-rpms
      Note

      The base OpenStack repository (rhel-7-server-openstack-8-rpms) must not be enabled on this node. This repository may contain newer versions of certain Operational Tools dependencies which may be incompatible with the Operational Tools packages.

  4. Open the firewall on the system to allow connections to Graphite and Grafana:

    # firewall-cmd --zone=public --add-port=2003/tcp --permanent
    # firewall-cmd --zone=public --add-port=3030/tcp --permanent
    # firewall-cmd --reload
  5. Once that is done, install the Graphite and Grafana software by running the following command:

    # yum install python-carbon graphite-web grafana httpd
  6. Configure the Grafana web interface to allow access. Edit /etc/httpd/conf.d/graphite-web.conf and modify the Require line as follows:

    ...
    <Directory "/usr/share/graphite/">
        <IfModule mod_authz_core.c>
            # Apache 2.4
            Require all granted
        </IfModule>
    ...
  7. Edit /etc/grafana/grafana.ini, and change http_port to 3030.
  8. Synchronize the database behind Graphite web. Run the following command; when prompted if you want to create a super user, choose no:

    # sudo -u apache /usr/bin/graphite-manage syncdb --noinput
  9. Start and enable all the Graphite and Grafana services:

    # systemctl start httpd
    # systemctl enable httpd
    # systemctl start carbon-cache
    # systemctl enable carbon-cache
    # systemctl start grafana-server
    # systemctl enable grafana-server
  10. Configure Grafana to talk to your Graphite instance:

    1. Go to http://PERFORMANCE_MONITORING_HOST:3030/. You should be presented with the Grafana login page.
    2. Enter the default credentials of admin/admin to log in to the system.
    3. After you are logged in, click on the Grafana logo in the top left corner of the screen, then choose Data Sources.
    4. At the top of the page, click Add new, and enter the following details:

      Name

      graphite

      Default

      yes (select)

      Type

      Graphite

      Url

      http://localhost/

      Access

      proxy

      Basic Auth

      no (unselected)

    5. Finally, click the Add button at the bottom.

4.2. Installing the Performance Monitoring Collection Agent on All Nodes

To monitor the performance of all the systems in the OpenStack environment, run the following commands on all of them.

  1. Enable the Operational Tools repository:

    # subscription-manager repos --enable=rhel-7-server-openstack-8-optools-rpms
  2. Install collectd:

    # yum install collectd
  3. Configure collectd to send the data to the performance monitoring aggregator/relay. To do so, create /etc/collectd.d/10-write_graphite.conf with the following contents, where PERFORMANCE_MONITORING_HOST is the host name or IP address of the host that was configured previously to be the performance monitoring aggregator/relay:

    <LoadPlugin write_graphite>
      Globals false
    </LoadPlugin>
    
    <Plugin write_graphite>
      <Carbon>
        Host "PERFORMANCE_MONITORING_HOST"
        Port "2003"
        Prefix "collectd."
        EscapeCharacter "_"
        StoreRates true
        LogSendErrors true
        Protocol "tcp"
      </Carbon>
    </Plugin>
  4. If you are using SELinux, allow collectd to tcp network connect:

    # setsebool -P collectd_tcp_network_connect=1
  5. Start and enable collectd:

    # systemctl start collectd
    # systemctl enable collectd

After a while, you should see metrics in the Graphite web user interface running at http://PERFORMANCE_MONITORING_HOST:3030/.