OpenStack Monitoring – Liberty with Sensu, Part 2

Approximately remain in this minutes read.

OpenStack Monitoring – Liberty with Sensu, Part 2

OpenStack Monitoring – Liberty with Sensu, Part 2
Written by

OpenStack Monitoring Tools and StratoscaleSensu is an open-source monitoring framework that is designed to help solve monitoring challenges in cloud environments. In the first part of this post we discussed monitoring of OpenStack Liberty with Sensu to monitor servers, services and application health, focusing on API availability and basic API flows. In this section we’ll discuss the third component, full stack development.

Full Stack Development

The third layer in the onion deploys a VM utilizing as many of the services of OpenStack to verify that all of them are working. There is point in performing this operation if any of the above are not green (functioning correctly). The services we would like to check are:

  1. Keystone
  2. Neutron
  3. Nova
  4. Glance
  5. Swift
  6. Cinder
  7. Heat

Of course, if there are other services within OpenStack that you want to verify then you can add them to this list.

The easiest way to do this would be to deploy a Heat stack. The stack tests the following:

  1. Running the command tests authentication and if the orchestration engine is functioning (Keystone & Heat)
  2. Spin up an instance and test it to see if you can retrieve an image (Glance), start an instance (Nova) and get an IP address (Neutron)
  3. Attach a volume which will verify your volume storage (Cinder)
  4. Run a script in the instance from an Object store (Swift)

All of the above can be packaged into a simple Heat template, here’s the link on github

Tying it all together as a Sensu Check

The Sensu community has a substantial number of checks that you can use to monitor your environment. To delve into more information about how checks work and where you can find more information – the Sensu documentation site is your friend.

To tie the whole process together you will need to wrap this into a script.

Save the Heat template above as check-openstack.yaml, here’s the link on github

Save the bash script as, here’s the link on github

Add this as a check to your Sensu server – passing the correct parameters for OS_AUTH_URL, OS_USERNAME and OS_PASSWORD. This is done by adding a check which is usually located under /etc/sensu/plugins/ and will be structured similar to the syntax below:

 "checks": {
    "openstack_check": {
      "command": "",
      "interval": 300,
      "subscribers": [ "linux" ]

Click here to learn how to successfully leverage OpenStack to maximize the efficiency of the data center.


The expected result of this script will be a stack that is created with a CREATE_COMPLETE result, indicating that the provisioning is functioning correctly. If the result you received differs from this result, you will have identified an error with one of the steps in the process. Identifying which of the steps is problematic requires further discussion.


Monitoring your OpenStack infrastructure is imperative to ensure that everything is functioning correctly; that you are proactively managing your environment. Thus you are aware of issues in your infrastructure long before you receive complaints from your customers and end users.

Monitoring your environment using a multi layer approach can help you identify problems as they happen and provide a better, more robust service all round.

Try free Stratoscale

Back to Blog >

April 27, 2016

Simple Share Buttons
Simple Share Buttons