Created
March 13, 2014 11:33
-
-
Save verdurin/9526775 to your computer and use it in GitHub Desktop.
Run OpenStack checks and send the output to Ganglia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to check some OpenStack values | |
. /root/keystonerc_admin | |
INSTANCES_ERROR=$(nova list --all-tenants|grep ERROR|wc -l) | |
INSTANCES_ACTIVE=$(nova list --all-tenants |grep ACTIVE|wc -l) | |
INSTANCES_BUILD=$(nova list --all-tenants |grep BUILD|wc -l) | |
INSTANCES_SHUTOFF=$(nova list --all-tenants |grep SHUTOFF|wc -l) | |
/usr/bin/gmetric -d 1200 -x 1200 --name=instances_error --value=${INSTANCES_ERROR} --type=uint8 | |
/usr/bin/gmetric -d 1200 -x 1200 --name=instances_active --value=${INSTANCES_ACTIVE} --type=uint8 | |
/usr/bin/gmetric -d 1200 -x 1200 --name=instances_build --value=${INSTANCES_BUILD} --type=uint8 | |
/usr/bin/gmetric -d 1200 -x 1200 --name=instances_shutoff --value=${INSTANCES_SHUTOFF} --type=uint8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment