PernixData FVP and vCenter Operations Integration

If you’ve been reading some of my previous posts you would probably have noticed that I’ve been writing a fair amount about vCenter Operations. There is a reason for this; it’s a very extensible product. There is a decent amount of third-party integration with vCenter Operations as well as a high amount of customization out of the box. I hate having to use seven different tools to monitor apps and infrastructure. I think it’s awesome that VMware has enabled their partners to plug-in to this product and as I come across more integration I feel it’s important to let others know its capabilities. The PernixData FVP integration with vCenter Operations uses the SQL Loader Adapter which can be found in the VMware Cloud Management Marketplace. You will need to create an account, but you can download the adapter for free. There are a few steps that need to be done to get this going, so enough talky talk.

Ok, I know I said enough “talky talk” about 4 seconds ago, but I wanted to give a big thanks to Daniel Ricks (Twitter). Dan is an SE at PernixData and he not only took the time to figure out the process, generate the scripts, and get everything working, but Dan also took time out of his schedule to walk me through the process and even help me do some troubleshooting. Thanks Dan!

*** In this example I’m using vCenter Operations 5.8.2 Build 1885282 ***

Download and install the SQL Loader Adapter

  1. Download the SQL Loader Adapter from the URL mentioned above
  2. Install the SQL Loader Adapter
    1. Navigate to https://<ip of vcops UI vm>/admin and log in with the admin account
    2. Click the Update tab
    3. Click the Browse button and find the .pak file you downloaded in step 1 and click the Update button
    4. Click OK to the confirmation message > accept the EULA agreement and click OK
    5. Once complete close the admin page
  3. Log in to the custom UI for vCenter Operations (https://<ip of vcops UI vm>/custom>
  4. In the top right of the page click the Support hyperlink > click the Info tab and then click the Describe button, as shown below
  5. image
  6. Once the redescribe process happens you’ll see the General Sql Data Loader appear under the Name column

Upload and Configure Scripts

  1. Using WinSCP or some other tool to upload files, connect to the Analytics VM
  2. You’ll need to copy the following files to /usr/lib/vmware-viperl/apps/general/
    1. prnx-fvp-vcops.pl
    2. credstore_admin.pl
  3. SSH into the Analytics VM with the root credentials
  4. Navigate to /usr/lib/vmware-viperl/apps/general and run the following commands:
    1. chmod 555 prnx-fvp-vcops.pl
    2. chmod 555 credstore_admin.pl
  5. Now let’s store the vCenter administrator credentials so they aren’t plain text. Run the following command from the /usr/lib/vmware-viperl/apps/general directory:
    1. ./credstore_admin.pl add –server <vcenter-server> –username <username>   <<<< If you are prefacing the username with a domain make sure you use enclose it with quotes e.g. “labs\josh.coen”
    2. When prompted, enter the password for the user account you specified in the previous line and then confirm it
  6. The SQL loader adapter depends on a SQL query file that will run to collect the metrics from a given SQL database (we’ll configure this later). The prnx-fvp-vcops.pl file is what is used to generate that query file. Let’s edit the crontab file to have this file execute every 5 minutes. While still in the Analytics VM, do the following:
    1. Run crontab -e
    2. Press A to append the file and type */5 * * * * /usr/lib/vmware-viperl/apps/general/prnx-fvp-vcops.pl –server <vcenter-server> –username <username>  <<<< Make sure vCenter and the Username are the same as specified when you did step 5
    3. Press the Esc key and type :wq! and press Enter

Configure the SQL Loader Adapter

*** The SQL Loader Adapter does not support Windows integrated authentication. If you don’t have an internal SQL user account for the PernixData FVP database (the name of the database by default is prnx) then you, or your DBA, need to create a local SQL account and give it the db_owner role. The db reader role may be sufficient, but I’m not exactly sure. ***

  1. Log in to the custom UI for vCenter Operations (https://<ip of vcops UI vm>/custom>
  2. Hover over Environment > Configuration > click Adapter Instances
  3. image
  4. Click the Add button, it’s a green plus icon > select your collector > select General Sql Data Loader
  5. Fill out the form using the following information:
    1. Adapter Instance Name: Choose a name
    2. DB Type: MsSql
    3. Host: <sql server>
    4. Port: enter in the port for SQL Server. Standard SQL is 1433. Will be different if using SQL Express
    5. DB Name: prnx
    6. Timezone: Choose timezone of your Analytics VM. Mine is UTC
    7. Sql File: DB_QUERY_1.sql
    8. Properties File: DB_QUERY_1.properties
    9. Autodiscovery: true
    10. Credential: You need to first add a crednetial:
      1. Click the Add button
      2. Adapter kind: should already be set to General Sql Data Loader
      3. Credential Kind: General Sql Data Loader Credentials
      4. Instance Name: <ip of sql server>    <<<< if you have a named instance for your SQL server you need to add a “\<name of instance>” to the instance name, after the IP
      5. User Name: this is the SQL user that has access to the prnx database
      6. Password: <password for SQL user>
      7. Click OK
    11. image
    12. Choose the Credential you just created in step 10 and click the Test button. You should get a message that the test was successful. If you don’t then either the Host, Port, DB Name, credential, or a combination of those is incorrect. Here’s what the form looks like filled out:

image

Verify Everything is Working

Now we need to verify that the scripts we uploaded and configured, and the SQL Data Loader adapter we configured is correct. To do this we need to look and see if new resource kinds specific to PernixData FVP are now visible inside of vCenter Operations. To do this:

  1. While still logged into the vCenter Operations custom UI, navigate to Environment > Environment Overview
  2. Expand Resource Kinds > you should now see four additional resource kinds:
    1. PRNX:Flash Cluster
    2. PRNX:Flash Provider
    3. PRNX:Host
    4. PRNX:Virtual Machine
  3. image
  4. The resources listed under PRNX:Host and PRNX:Virtual machines have the same names as your standard host and virtual machine resources, but they have to be a different resource object instead of merging the new PernixData FVP metrics into you existing host and virtual machine objects

Practical Uses

Here are a few dashboards I threw together with our newly ingested metrics. The first one is a heatmap displays all virtual machines using FVP (using the resource kind PRNX:Virtual Machine). The size of each VM is based on the amount of local flash being used. The bigger the block, the more local flash is being used. The color is based on latency, with a very short scale. One end of the spectrum is set to 0ms of latency, that’s green. The other end is set to 5ms, that’s red. As you can see from the screen shot, all of these VMs are <5ms of latency. This is total latency, so read and write.

image

The second dashboard is a general scoreboard. This is showing how much local flash is being utilized by each of the hosts

image

The third dashboard is also a general scoreboard. This shows much network flash is being used by the VMs

image

 

Thanks for sticking with me through the process, if you’re trying to get this configured and run into issues, please feel free to reach out to me or Dan Ricks in the comments or on Twitter.

The two files I mentioned earlier, prnx-fvp-vcops.pl and credstore_admin.pl can be downloaded here. Again, big shout out to Dan Ricks who wrote the scripts to generate the SQL query files in order to feed the proper data into the Sql Data Loader Adapter. Great work, Dan.

Comments 6

    1. Post
      Author
  1. Hey there…ive followed the instructions and everything checked out in terms of the adapter setup etc…but I cant see the new Resources under the tree…what could stop that from loading?

    1. Post
      Author

      Hey Anthony,

      First thing to check would be that the time matches. Your SQL server and vCOps appliance (both VMs) need to have the same time. Additionally, when you setup the SQL Loader adapter instance be sure that the time zone you select on the configuration page is the same time zone as your vCOps appliance.

      If all that is correct and you still aren’t seeing the new resources let me know. There are some entries you can add to a log file to allow for verbose logging so that we can dig in a little deeper to see if the query that’s be executed is returning results.

      1. That would be it! I have three zones across Australia in different timezones…bugger 🙂 Is there any workaround for multi-zone deployment?

        1. Post
          Author

Leave a Reply to Josh Coen Cancel reply

Your email address will not be published. Required fields are marked *

*