Sure! Here’s a new blog post based on the information provided:
Exposing VM Metrics in vCloud Director 9.0 with Cassandra Configuration
In vCloud Director SP 5.6.x, service providers were able to expose VM metrics to their clients via a set of API calls. With the release of vCloud Director 9.0, this feature has been enhanced, and now the metrics can be viewed from the new HTML5 tenant UI. In this blog post, we will discuss how to configure Cassandra for vCloud Director 9.0 metrics and use the Cell Management Tool to push the VM metric data.
Configuring Cassandra for vCloud Director 9.0 Metrics
The configuration of Cassandra for vCloud Director 9.0 metrics is relatively straightforward. First, you need to have a Cassandra cluster set up and configured. Once you have your Cassandra cluster in place, you can use the following command to configure the metrics:
cassandra_argument -s -n -u -p -ttl
This command specifies the Cassandra cluster name, node IP address, username, password, and time to live. The time to live is the amount of time that the data will be stored in the Cassandra database.
Once you have run this command, you can use the Cell Management Tool to tell the vCD cells to push the VM Metric data to the Cassandra database. This is done by running the following command:
cell_management_tool -c -P -p -M -m
This command specifies the cluster name, partition ID, VM guid, metric name, and metric value. The partition ID is used to identify the specific vCD cell that you want to push the data to.
Using the Cell Management Tool to Push VM Metric Data
Once you have configured Cassandra for vCloud Director 9.0 metrics and pushed the data to the database, you can use the new HTML5 tenant UI to view the metrics. To do this, simply log in to the HTML5 tenant UI and navigate to the Virtual Machine view. From here, you should see a Monitoring Chart drop-down menu in the main window.
From the Monitoring Chart drop-down menu, you can choose any of the available metrics across a half hour, hour, day, or week timescale. This allows you to view the metrics for your vCD VMs in real-time, as well as over longer periods of time.
API Calls to Retrieve Current and Historical Metrics
If you still want to use API calls to retrieve current and historical VM metrics for vCD VMs, you can use the following API calls:
* GetCurrentMetricValues(): This API call retrieves the current values of all available metrics.
* GetHistoricalMetricValues(): This API call retrieves the historical values of all available metrics for a specified time period.
The Machine ID required for these API calls is the VM GUID as seen in vCenter. You can source this ID from the VM name.
Conclusion
In this blog post, we have discussed how to configure Cassandra for vCloud Director 9.0 metrics and use the Cell Management Tool to push the VM metric data. We have also covered how to use the new HTML5 tenant UI to view the metrics and how to use API calls to retrieve current and historical VM metrics. By following these steps, you can easily expose VM metrics to your clients and provide them with valuable insights into their vCD VMs.