This repository contains data extraction scripts used for pulling openstack Hypervisor and Instances metrics from all the Regions.
Automatic email is send to Team Mentioned.
Mail contains Following Attachments :
- Host_Reports.csv
Headers ( Region Name, Hypervisor_Hostname, vcpus, memory_mb, local_gb, vcpus_used, memory_used, local_gb_used, running_vms )
- VM_Reports.csv
Headers ( Region Name, Instance ID, Name, Hypervisor_Hostname, Status, VCPUs, Memory_MB, Root_gb, Ephemeral_gb, project_id, Project_Name )
- Project_Report.csv
- Clone this repository
git clone
- Create two new files named
.openrc_password
and.mysql_password
at `$PWD/capacity-report - Add a crontab entry to run at 3 AM EST. Change frequency when needed.
$crontab -e
0 3 * * * PWD/cloud_report.sh > PWD/cloud_report.log 2>&1
To add new email id to reports, edit mail_host.sh
, mail_vm.sh
and mail_project.sh
and append new email id at CCEMAIL
- When moving scripts to a different location change paths below with
cloud_report.sh
,mail_vm.sh
,mail_host.sh
andmail_project
path="new-path-location"
venv_path="new-path-to-openstack-dir"