Issue link: https://read.uberflip.com/i/1334488
Chapter 6 127 How to do it... Carry out the following steps to set up the swift-dispersion tools to report on cluster health: 1. We first create the configuration file (/etc/swift/dispersion.conf) required by the swift-dispersion tools, as follows: [dispersion] auth_url = http://172.16.0.1:5000/auth/v2.0 auth_user = cookbook:admin auth_key = openstack 2. Once this is in place, we need to create containers and objects throughout our cluster, so that they are in distinct places, by using the swift-dispersion- populate tool. We do this as follows: sudo swift-dispersion-populate 3. Once these containers and objects have been set up, we can then run swift- dispersion-report, as follows: sudo swift-dispersion-report This produces the following result: 4. We can then set up a cron job that repeatedly checks the health of these containers and objects. We do this as follows: echo "/usr/bin/swift-dispersion-report" | sudo tee -a /etc/cron. hourly/swift-dispersion-report How it works... The health of objects can be measured by checking whether the replicas are correct. If our OpenStack Storage cluster replicates an object 3 times and 2 of the 3 are in the correct place, the object would be 66.66% healthy. www.it-ebooks.info

