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
RabbitMQandUchiwa:# 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
RabbitMQandRedis, which are the backbone services. Start bothRedisandRabbitMQand enable them at boot:# systemctl start redis # systemctl enable redis # systemctl start rabbitmq-server # systemctl enable rabbitmq-server
Configure a new
RabbitMQvirtual 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
Sensumonitoring server. Create/etc/sensu/conf.d/rabbitmq.jsonwith the following contents:{ "rabbitmq": { "port": 5672, "host": "localhost", "user": "sensu", "password": "sensu", "vhost": "/sensu" } }Next, create
/etc/sensu/conf.d/redis.jsonwith the following contents:{ "redis": { "port": 6379, "host": "localhost" } }Finally, create
/etc/sensu/conf.d/api.jsonwith the following contents:{ "api": { "bind": "0.0.0.0", "port": 4567, "host": "localhost" } }Start and enable all
Sensuservices:# 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.jsonand 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
Uchiwaweb 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
Sensuagent. Edit/etc/sensu/conf.d/rabbitmq.jsonto 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.jsonto 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
Sensuclient:# systemctl start sensu-client # systemctl enable sensu-client
You should now be able to access Uchiwa running at http://MONITORING_SERVER:3000.
