Management Packs vCenter Operations vRealize Operations

Monitoring vCenter Health Remotely with vRealize Operations – Part 1

By: Greg Hohertz, Blue Medora

Over the years, vCenter has gained more and more importance. As a command center to central administration and a focal point for API access to your vSphere environment, vCenter is a cog in your virtualization environment that brings everything to a halt if it’s not performing or unavailable.

In this series, we will take a look at how we can monitor VMware vCenter leveraging vRealize Operations without having to deploy additional agents or code to vCenter or Microsoft SQL Server. Monitoring remotely is ideal because it removes any dependence on agents that have to be deployed and maintained on the target system, thus reducing the complexity of implementing and supporting your monitoring environment.

Figure1-border

Figure 1: Monitoring vCenter and vPostgres Remotely with vRealize Operations

I will start by pointing out that VMware does provide a solution for monitoring vCenter which can be found in the Solution Exchange. This is an agent-based solution which incorporates a number of Hyperic (now Endpoint Operations, or EP Ops) agents. While this solution does provide a great option for monitoring vCenter, I prefer to perform my monitoring without having to install agents onto my pristine OVA.

In part one of this series, we will start with leveraging the metrics that are provided natively with the vSphere Management Pack along with the Blue Medora’s vRealize Operations Management Pack for PostgreSQL. The vSphere Management Pack will give us some insight into the Virtual Machine, Datastore, and ESXi Host on which the vCenter server resides. With the PostgreSQL Management Pack, we will remotely connect to vCenter’s underlying vPostgres database.

To get started, we’ll need to open up the vPostgres database on the vCenter server to allow connections from our vRealize Operations Manager’s collector and create a user which vRealize Operations will use to gather data. To accomplish this:

  1. SSH into your vCenter server using your favorite SSH client
  2. Enable BASH access by typing “shell.set –enabled TRUE”
  3. Launch your BASH shell by typing “shell”
  4. First, we’ll edit /storage/db/vpostgres/pg_hba.conf to allow remote connections to our vPostgres database.
  5. Add a new line at the end of the file that looks something like this:
    a) “host all all 10.77.8.0/24 md5”
    b) Change “10.77.8.0” to the subnet on which your vRealize Operations collector resides, or if you want you could limit the connection to a specific IP by using notation such as: “10.77.8.124/32” where 10.77.8.124 is the IP address of the collector.
  6. Next, we’ll configure vPostgres to listen on all network interfaces, instead of just the localhost. Edit /storage/db/vpostgres/postgresql.conf
  7. Change “listen_addresses” to an asterisk “*”.
  8. Now, we need to restart vPostgres in order for the changes to take effect by executing “/etc/init.d/vmware_vpostgres restart”
  9. Next, we’ll create a user which vRealize Operations will use to connect remotely. Start by launching the Postgres console by running: “/opt/vmware/vpostgres/current/bin/psql -U postgres”.
  10. Let’s create our user by issuing command: “CREATE USER bmvrops WITH PASSWORD ‘mypassword1’”
  11. Next, let’s grant that user access to read vPostgres data: “GRANT SELECT ON ALL TABLES IN SCHEMA public to bmvrops”

Now that we are able to remotely connect to our vCenter’s vPostgres database, we’ll install and license the Blue Medora Management Pack for PostgreSQL, which can be found here. Once the Management Pack is installed by following the simple steps in the Installation Guide, we will configure an adapter instance to connect to our vCenter database.

To add a Blue Medora Management Pack for PostgreSQL vPostgres adapter instance to monitor vCenter:

  1. Select the “PostgreSQL Adapter” solution
  2. Click on the gears in the toolbar
  3. For Display Name, enter the name of this vCenter server
  4. Next, enter the hostname of the vCenter server
  5. Enter ‘VCDB” for database
  6. Click on the green plus symbol to add a new set of credentials
  7. Enter a friendly name for this set of credentials
  8. Enter the username and password you created in step 10 above
  9. Enter a username and password which has access to the vRealize Operations REST API (we’re using “admin” for this example).

Figure2-border

Figure 2: Adding the vCenter Postgres Database Instance

After waiting 15 or so minutes, we should now have vPostgres performance data from vCenter. Next, let’s create a relationship from our vCenter Server to the vPostgres database so that we can navigate to it in our Inventory Explorer and create dashboards which have a mashup of vCenter data and vPostgres data. To accomplish this:

  1. In vRealize Operations, navigate to Administration
  2. Select “Object Relationships”
  3. On the left hand side, expand “Object Types”
  4. Find “vCenter Server” and left click on it
  5. In the next pane over, select your vCenter server by left clicking on it
  6. In the right hand pane, expand “Object Types”
  7. Find “PostgreSQL Instance” and left-click on it
  8. In the second from the right pane you see your PostgreSQL instances that are monitored by vRealize Operations. Select the database which resides on your vCenter and drag it over to the vCenter server in the pane to the left.
  9. We now have a relationship in vRealize Operations from our vCenter Server to the vPostgres database which resides on it.

Figure3-border

Figure 3: Creating the Relationship Between vCenter and vPostgres

Next, we’ll import a dashboard which will present some key performance indicators from our vCenter server. This includes CPU, Memory, Datastore and vPostgres performance. First, we will need to create a “Metric Config” which tells our dashboard what metrics to display for our vPostgres performance.

  1. Navigate to “Content”
  2. Select “Manage Metric Config”
  3. Click on the green plus sign
  4. Enter a name for this Metric Config – “BlueMedora-vCenter-PG.xml”
  5. Copy the contents from the “BlueMedora-vCenter-PG.xml” file found in the zip file at the end of this article.
  6. Click Save.

Next, we’ll import our custom dashboard:

  1. Navigate to “Content”
  2. Select “Dashboards”
  3. Select the gear, and then “Import Dashboards”
  4. Import “Blue Medora vCenter.json” found in this zip file.

Now we have a new dashboard called “Blue Medora vCenter”, which shows us the overall health of our vCenter server – with CPU, Memory, Datastore, and vPostgres performance and trending. Stay tuned for part 2 of this series, where we’ll look at how we can remotely monitor our Microsoft SQL database used by vCenter.