Home  >  Blog  >   OpenStack  > 

Collecting usage statistics – OpenStack Cloud

Rating: 5
  1. Share:
OpenStack Articles

OpenStack Object Storage can report on usage metrics by using the swift-recon middleware added to our object-server configuration. By using a tool, also named swift-recon, we can then query these collected metrics. The Collect Usage Statistics in OpenStack Object Storage Cluster will find you more ways.

If you would like to Enrich your career with an OpenStack certified professional, then visit Mindmajix - A Global online training platform: “OpenStack Course Training”  Course.  This course will help you to achieve excellence in this domain.

How to Collect Usage Statistics in OpenStack Object Storage Cluster

1.Log into an OpenStack Object Storage node as well as the proxy server.

2. To collect usage statistics from our OpenStack Object Storage cluster, carry out the following steps:

  • We first need to modify our /etc/swift/object-server.conf configuration file to include the swift-recon middleware, so that it looks similar to the following:
pipeline=recon object-server

Once this is in place, we simply restart our object-server service, using SWIFT-INIT, as follows:

Now that the command is running, we can use the swift-recon tool on the proxy server to get usage statistics, as follows:

MindMajix YouTube Channel


Related Article: OpenStack Tutorial

Disk usage

swift-recon -d

This will report on disk usage in our cluster.

swift-recon -d -z5

This will report on disk usage in zone 5.

Load average

swift-recon -l


swift-recon -d -z5

will report on, the load average in our cluster.

swift-recon -l -z5

This will report on the load average of the nodes in zone 5.

Related Article: OpenStack Interview Questions

Quarantined Statistics

swift-recon -q

This will report on any quarantined containers, objects, and accounts in the cluster.

wift-recon -q -z5

This will report on this information just for zone 5.
Check for unmounted devices

swift-recon -u

This will check for any unmounted drives in our cluster.

swift-recon -z5 -u

This will do the same just for zone 5.

Check Replication Metrics

swift-recon -r

This will report on the replication status within our cluster.

swift-recon -r -z5

This will just perform this for nodes in zone 5.

We can perform all these actions with a single command to get all telemetry data back about our cluster, as follows:

swift-recon --all

We can just get this information for nodes within zone 5 by adding -z5 at the end, as follows:

swift-recon --all -z5


Related Article: Troubleshooting OpenStack

Enabling Usage Statistics

To enable usage statistics within an OpenStack Object Storage, we add in the swift-recon middleware, so metrics are collected. We add this to the object server by adding the following lines to /etc/swift/object-server.conf, on each of our storage nodes:

storage nodes
With this in place and our object servers restarted, we can query this telemetry data by using the swift-recon tool. We can collect the statistics from the cluster as a whole, or from specific zones with the -z parameter.

Note that we can also collect all or multiple statistics by specifying the –all flag or appending multiple flags to the command line. For example, to collect a load average and replication statistics from our nodes in zone 5, we would execute the following command

Join our newsletter

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
OpenStack TrainingMar 28 to Apr 12
OpenStack TrainingApr 01 to Apr 16
OpenStack TrainingApr 04 to Apr 19
OpenStack TrainingApr 08 to Apr 23
Last updated: 26 March 2023
About Author
Remy Sharp
Ravindra Savaram

Ravindra Savaram is a Content Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

Recommended Courses

1 /15