Chapter 3. Installing the Availability Monitoring Suite
3.1. Installing the Monitoring Relay/Controller
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
- Install Red Hat Enterprise Linux 7.
Allow the system to access the Operational Tools packages:
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.
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
NoteThe 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.
Open the firewall on the system to allow connections to
RabbitMQ
andUchiwa
:# firewall-cmd --zone=public --add-port=5672/tcp --permanent # firewall-cmd --zone=public --add-port=3000/tcp --permanent # firewall-cmd --reload
Install the components needed for the monitoring server:
# yum install sensu uchiwa redis rabbitmq-server
Configure
RabbitMQ
andRedis
, which are the backbone services. Start bothRedis
andRabbitMQ
and enable them at boot:# systemctl start redis # systemctl enable redis # systemctl start rabbitmq-server # systemctl enable rabbitmq-server
Configure a new
RabbitMQ
virtual host forsensu
, 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 ".*" ".*" ".*"
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" } }
Next, create
/etc/sensu/conf.d/redis.json
with the following contents:{ "redis": { "port": 6379, "host": "localhost" } }
Finally, create
/etc/sensu/conf.d/api.json
with the following contents:{ "api": { "bind": "0.0.0.0", "port": 4567, "host": "localhost" } }
Start and enable all
Sensu
services:# systemctl start sensu-server # systemctl enable sensu-server # systemctl start sensu-api # systemctl enable sensu-api
Configure
Uchiwa
, which is the web interface forSensu
. 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 } }
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.
Enable the Operational Tools repository:
# subscription-manager repos --enable=rhel-7-server-openstack-8-optools-rpms
Install
Sensu
:# yum install sensu
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" } }
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" ] } }
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
.