IT Operations Management (ITOM)
Showing results for 
Search instead for 
Do you mean 

Power up Business Value Dashboard with Cloud Optimizer!

HaraldPfaender ‎05-09-2016 08:32 AM - edited ‎05-10-2016 11:25 AM

Cloud Optimizer provides an easy way to get status and health information about your cloud environment. Just connect Cloud Optimizer to your virtual environment and it automatically collect all kind of relevant information. Even fine tuning and sizing recommendation of individual virtual machines is possible.

But what in case you want to have a customized dashboard, e.g. dashboards of your IT environment which contains metrics from multiple Cloud Optimizer or data from other sources? The solution to this is using Business Value Dashboard and combine it with data from Cloud Optimizer (or multiple Cloud Optimizer instances). With this you can setup and customize your own dashboards and make it available for numerous audiences in your IT department.

Requirements:

At first I assume that you have Cloud Optimizer and Business Value Dashboard installed, up and running. If not please see my previous blog posts about it:

Cloud Optimizer Data:

Cloud Optimizer provides powerful APIs to get its collected data. Mainly there are two different interfaces types: API calls to make changes (like placement of VMs) and APIs to get status information. These interfaces are using JSON format as data exchange. The APIs are well-documented and part of the Cloud Optimizer on-line help.

For this blog I will concentrate on the API calls to retrieve any status information (GET request). And more in detail I will focus on the API to get the status of all datastores monitored from Cloud Optimizer for the virtual environment.

REST API:

First let's start by examine what the GET request for the datastore API is doing. Since it is a basic GET request it can be done from your web browser. Start by typing this into your browser:

https://<ip_address or host_name>:<port_number>/PV/api/v1

Hint: In case you have LDAP enabled you need to login before.

Here is a screenshot how it looks like on my system:

1_co_rest_api.jpg

You can see the JSON which is returned from Cloud Optimizer. Seven datastores identified by [instancecount] exists in my environment. Each datastore has a separate [instance] block with a unique identifier [resourceid].

Retrieve data:

To retrieve the data I am using a Perl script. Perl is a simple script language, platform independent means I can use it from both windows and linux.

This is my perl code to get the JSON data via the Cloud Optimizer REST API:

# Create a user agent and make the request
use LWP::UserAgent;
my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } );
my $co_credentials_en = encode_base64("harald:geheim");
my $response = $ua->get("https://<ip_address or host_name>:<port_number>/PV/api/v1", 'Authorization' => "Basic $co_credentials_en" );

The package LWP:UserAgent is used to do the REST call. The return value is stored in $response and I will use it later on for parsing.

Hint: My Cloud Optimizer is using authorization, therefore I have added username and password as Base64 encoded parameter.

Data Parsing:

My main goal from this return value is to convert it into multiple data channels. I want to have a data channel for each datastore. This allows me not only each datastore individual but also to map it to any kind of widget.

Therefore please remember the JSON format which Cloud Optimizer is using. This is important to parse the data and convert it:

  • Every datastore is contained in a separate array "instances"
  • Each instance has an additional "properties" and "capacity" tag containing the actual values

The JSON format which I am creating is using the "resourceid" as channel identifier. In BVD terms this is the "dimension". That means each datastore will become a separate JSON string which I am sending to BVD.

 

This is my perl code (snippet):

// get all datastores separated via instances tag
my @dataCenters = @{ $json_data->{'instances'} }
// iterate over all datastores
foreach my $tempDatacenter (@dataCenters) {
my $resourceidValue= $tempDatacenter ->{"resourceid"}
// iterate over "'capacity'" tag inside each datastore
my @tempCapacities = $tempDatacenter->{'capacity'};
           foreach my $tempCapacity (@tempCapacities) {
...}

...

// create a new JSON ($jsonTemp) to store the values for each datastore and add it into a perl array @jsonResult
push @jsonResult, $jsonTemp;
}

As you can see above the results are stored in the perl array @jsonResult, one JSON string for each datastore.

Send the Data to Business Value Dashboard:

Finally I need to send the converted data to my Business Value Dashboard instance. The following code snippet will create a http request and send the JSON data as POST request to BVD.

foreach my $jsonData(@jsonResult) {
     my $req = HTTP::Request->new( 'POST', "https://<bvdsystem>:12225/api/submit/<APIKEY>/dims/resourceid,SystemID/tags/cloudoptimizer,boeblingen");
     $req->header('Content-Type' => 'application/json', 'Content-Length', length($jsonData));
     $req->content($jsonData);
     my $lwp = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } );
     my $response = $lwp->request($req);}

The dims tag used in the request creates independent streams in Business Value Dashboard for each datastore:

2_bvd_stream.png

This enables me to bind each datastore value to independent widgets in Business Value Dashboard.

Now the only thing left is to create a customized dashboard and add the BVD widgets you like to do the virtualization.

Cloud Optimizer usage at HPE:

Now that you have seen the basic concepts I also wanted to share some real world examples which we have done inside our organization.

The Infrastructure Service Team at Hewlett-Packard Enterprise is using multiple instances of Cloud Optimizer across the globe to monitor their virtual environment. In detail they have around 16 instances of Cloud Optimizer running at different HPE IS sites. The main goal was to consolidate all data to global level using Business Value Dashboard. To reach this the team has created a central Dashboard to visualize the datacenter landscape.

The usage of Cloud Optimizer and Business Value Dashboard is a perfect combination for this:

5_HPE_InfraService_Overview.png

The above dashboard has been designed in MS Visio and exported to Business Value Dashboard. The BVD widgets display real-time metrics for each datastore at the different HPE IS sites. The dashboard was combined with other metrics (e.g. the number of active users).

This enables to have a quick overview about the status of the virtualization environment inside our organization. Key metrics are displayed using text widgets (e.g. the number of virtual machines and vCenters). For each region a drill down will be implemented in another step by using linked dashboard to display specific data for each region.

Conclusion

In this blog I have shown you how easy you can integrate metric data from Cloud Optimizer into Business Value Dashboard. Standardized JSON APIs make data access and conversion uncomplicated and fast. Using the widget technologies from Business Value Dashboard allows to have an all-in one and intuitive data display. This helps to get a quick overview of the status of your IT department and to increase your efficiency.

Interested? Just try it out in your data center and become your own dashboard designer!

Try it out now: Download Cloud Optimizer

Also, have a look at these other blog posts to learn more about Cloud Optimizer’s features:

What do you think about HPE Cloud Optimizer? Please share your thoughts and comments!

p__100_Discover-2016-LV-blog-banner.jpg

About the Author

HaraldPfaender

Events
June 6 - 8, 2017
Las Vegas, Nevada
Discover 2017 Las Vegas
Join us for HPE Discover 2017 in Las Vegas. The event will be held at the Venetian | Palazzo from June 6-8, 2017.
Read more
Apr 18, 2017
Houston, TX
HPE Tech Days - 2017
Follow a group of tech bloggers for a new HPE Tech Day, a full day of sessions about how to create a hybrid IT, from hyperconverged to Composable Infr...
Read more
View all
//Add this to "OnDomLoad" event