Chapter 4. Installing the Performance Monitoring Suite
4.1. Installing the Collection Aggregator/Relay Copy linkLink copied to clipboard!
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
- 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 --consumedIf 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-rpmsNoteThe 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
GraphiteandGrafana:# firewall-cmd --zone=public --add-port=2003/tcp --permanent # firewall-cmd --zone=public --add-port=3030/tcp --permanent # firewall-cmd --reloadOnce that is done, install the
GraphiteandGrafanasoftware by running the following command:# yum install python-carbon graphite-web grafana httpdConfigure the
Grafanaweb interface to allow access. Edit/etc/httpd/conf.d/graphite-web.confand modify theRequireline as follows:... <Directory "/usr/share/graphite/"> <IfModule mod_authz_core.c> # Apache 2.4 Require all granted </IfModule> ...-
Edit
/etc/grafana/grafana.ini, and changehttp_portto3030. Synchronize the database behind
Graphiteweb. Run the following command; when prompted if you want to create a super user, chooseno:# sudo -u apache /usr/bin/graphite-manage syncdb --noinputStart and enable all the
GraphiteandGrafanaservices:# systemctl start httpd # systemctl enable httpd # systemctl start carbon-cache # systemctl enable carbon-cache # systemctl start grafana-server # systemctl enable grafana-serverConfigure
Grafanato talk to yourGraphiteinstance:-
Go to
http://PERFORMANCE_MONITORING_HOST:3030/. You should be presented with theGrafanalogin page. -
Enter the default credentials of
admin/adminto log in to the system. -
After you are logged in, click on the
Grafanalogo in the top left corner of the screen, then choose Data Sources. At the top of the page, click Add new, and enter the following details:
Expand Name
graphiteDefault
yes (select)Type
GraphiteUrl
http://localhost/Access
proxyBasic Auth
no (unselected)- Finally, click the Add button at the bottom.
-
Go to
4.2. Installing the Performance Monitoring Collection Agent on All Nodes Copy linkLink copied to clipboard!
To monitor the performance of 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-rpmsInstall
collectd:# yum install collectdConfigure
collectdto send the data to the performance monitoring aggregator/relay. To do so, create/etc/collectd.d/10-write_graphite.confwith 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>If you are using SELinux, allow
collectdto tcp network connect:# setsebool -P collectd_tcp_network_connect=1Start 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/.