Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

Chapter 3. Installing the Availability Monitoring Suite

3.1. Installing the Monitoring Relay/Controller

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

    • 4 GB of memory
    • Single-socket Xeon class CPU
    • 100 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 RabbitMQ and Uchiwa:

    # firewall-cmd --zone=public --add-port=5672/tcp --permanent
    # firewall-cmd --zone=public --add-port=3000/tcp --permanent
    # firewall-cmd --reload
  5. Install the components needed for the monitoring server:

    # yum install sensu uchiwa redis rabbitmq-server
  6. Configure RabbitMQ and Redis, which are the backbone services. Start both Redis and RabbitMQ and enable them at boot:

    # systemctl start redis
    # systemctl enable redis
    # systemctl start rabbitmq-server
    # systemctl enable rabbitmq-server
  7. Configure a new RabbitMQ virtual host for sensu, with a user name and password combination that can access the host:

    # rabbitmqctl add_vhost /sensu
    # rabbitmqctl add_user sensu sensu
    # rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"
  8. Now that the base services are running and configured, configure the Sensu monitoring server. Create /etc/sensu/conf.d/rabbitmq.json with the following contents:

    {
      "rabbitmq": {
        "port": 5672,
        "host": "localhost",
        "user": "sensu",
        "password": "sensu",
        "vhost": "/sensu"
      }
    }
  9. Next, create /etc/sensu/conf.d/redis.json with the following contents:

    {
      "redis": {
        "port": 6379,
        "host": "localhost"
      }
    }
  10. Finally, create /etc/sensu/conf.d/api.json with the following contents:

    {
      "api": {
        "bind": "0.0.0.0",
        "port": 4567,
        "host": "localhost"
      }
    }
  11. Start and enable all Sensu services:

    # systemctl start sensu-server
    # systemctl enable sensu-server
    # systemctl start sensu-api
    # systemctl enable sensu-api
  12. Configure Uchiwa, which is the web interface for Sensu. To do this, edit /etc/uchiwa/uchiwa.json and replace its default contents with the following:

    {
      "sensu": [
        {
          "name": "Openstack",
          "host": "localhost",
          "port": 4567
        }
      ],
      "uchiwa": {
        "host": "0.0.0.0",
        "port": 3000,
        "refresh": 5
      }
    }
  13. Start and enable the Uchiwa web interface:

    # systemctl start uchiwa
    # systemctl enable uchiwa

3.2. Installing the Availability Monitoring Agent on All Nodes

To monitor 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 Sensu:

    # yum install sensu
  3. Configure the Sensu agent. Edit /etc/sensu/conf.d/rabbitmq.json to have the following content; remember to replace MONITORING_SERVER with the host name or IP address of your monitoring server configured in the previous section:

    {
      "rabbitmq": {
        "port": 5672,
        "host": "MONITORING_SERVER",
        "user": "sensu",
        "password": "sensu",
        "vhost": "/sensu"
      }
    }
  4. Edit /etc/sensu/conf.d/client.json to include the following content; remember to replace FQDN with the host name of the machine, and ADDRESS with the public IP address of the machine:

    {
      "client": {
        "name": "FQDN",
        "address": "ADDRESS",
        "subscriptions": [ "all" ]
      }
    }
  5. Finally, start and enable the Sensu client:

    # systemctl start sensu-client
    # systemctl enable sensu-client

You should now be able to access Uchiwa running at http://MONITORING_SERVER:3000.