Category: VMware

Monitoring VMware (ESX/ESXi) with OMS

We all know monitoring Hyper-V and/or SCVMM with OMS is rather straight forward, and native. However, what about VMware (ESX/ESXi)?

In my VMware environment, I am using ESXi Host version 5.5 and vCenter version 6.0.

The following post is to help you monitor your ESX/ESXi environment with OMS.

  • First, you will need to enable the ESXi Shell, or SSH on your ESXi host, see HERE how
  • Next, you will need to configure the syslog(s) on your ESXi host, see HERE how

My ESXi server’s IP 10.10.10.30, and I will be forwarding the syslog(s) to my vCenter Windows Server IP 10.10.10.34. To be safe, I am going to configure both port 514 UDP and TCP .

ConfiguringSyslogOnESXiviaSSH

  • Remember to disable the firewall(s) on your vCenter Windows server
  • Now on your vCenter Windows Server, you will need to deploy the OMS Agent (Microsoft Monitoring Agent), see HERE how
    • Once your vCenter server is communicating with OMS, we can move on to the next step
  • Within OMS, if you haven’t already, you will need to enable “Custom Logs“; Settings > Preview Features > Enabled Custom Logs

EnableCustomLogs

  • Next, set up the following syslog file as your custom log on your vCenter server. In my case, my ESXi hostname is ‘RaviESXi’ and its IP is 10.10.10.30.
  • Followed by importing your syslog into OMS for the first time (see below for instructions)

C:\ProgramData\VMware\vCenterServer\data\vmsyslogcollector\yourESXiHostnameHere\syslog.log

For me, that path translates to, “C:\ProgramData\VMware\vCenterServer\data\vmsyslogcollector\RaviESXi\syslog.log

In my example, I then created an OMS custom log named “VMwareWin” for ESXi syslog. (By default, _CL suffix will be automatically added, which will result as, “VMwareWin_CL”) If you are unfamiliar with OMS’ Custom Logs, see HERE.

Once you have completed this step, it make take some time for your data to start showing up in OMS. Give it an hour or so…

  • Now we can start creating some custom fields within OMS. For example, ESXi Hostname, vmkernel, hostd, etc. See HERE about OMS’ custom fields in log analytics.
    • If you have done everything correctly, you should have custom logs and custom fields similar to this:

CreatingCustomLogs(2)

CreatingCustomFields

  • Now  you can start creating some dashboards with some custom queries!

For example, here’s one query I tested with and thought was worthy for its own dashboard:

All events and number of occurrences:

Type=VMwareWin_CL | measure count() by VMwareProp_CFDashboard1Example

Of course the number of queries and dashboards is endless at this point. Feel free to let me know your thoughts and some queries/dashboards you have come up with!

Lastly, don’t forget to add some important syslog OMS Data Log Collection, here is what I have configured:

6

Cheers!

Azure Site Recovery (ASR) – Windows 2016 (TP4)

In the event you are running a lab/demo for Azure ASR (Azure Site Recovery) and want to use the latest and greatest Windows 2016… STOP! Turns out Windows Server 2016 – Technical Preview 4 (TP4) is not supported at this time. So, hopefully you read this and don’t waste your time, like me. 🙂 Note, Windows Server 2012 R2 is supported, and works just fine (obviously). I will (soon) be posting a complete Azure ASR setup for Windows Server 2012R2 (VMs) on VMware ESX 6.0.

Of course the ASR Wizard did not indicate any issues at the time of running the installer, but definitely got this error nearing completion.

7 - Install OnPrem Components Wizard (3) 7 - Install OnPrem Components Wizard (Error)

Adding ESX/vCenter to SCVMM

Adding a Hyper-V host to SCVMM is pretty straight forward, I would only hope so, since they are both Microsoft products. Well, as quick as it is to add a Hyper-V host, adding an ESX/vCenter is just as quick. Here are the steps I took to add an ESX host and vCenter appliance to SCVMM 2012 R2.

Some prerequisites, well, I am assuming you have already deployed an ESX/ESXi server which also has a vCenter appliance installed and configured with a static IP and hostname. In my lab, I have vCenter installed on the ESX host itself. I am also assuming your SCVMM and ESX/ESXi environment(s) are able to communicate with one another.

  • Launch the SCVMM console
  • Create a Run As account, here I used the default VMware credentials (root/vmware)
  • Under the Fabric pane, and under the Servers > Infrastructure Node, right click on vCenter Servers, and add a new VMware vCenter Server

1

 

  • Input the vCenter IP address, leaving the TCP/IP port as default (443)
  • Also, specify the Run As account, select the one you created back at Step 2
  • Keep Communicate with VMware ESX host in secure mode enabled

2

 

  • Next, if the Run As account validated successfully, you should now get an Import Certificate prompt. Select Import

3

 

  • You can view the status of the new addition within the Jobs window

4

 

  • If all went smoothly, your vCenter appliance/server should now be within the vCenter Servers view!

5

  • Next, you will want to essentially the same steps above, but this time, we will add the ESX host
  • Select, Add VMware ESX Hosts and Clusters

6

  • Hopefully here it should auto populate the search with the host, if not, search for it, using its IP or hostname

7

  • If all went went, proper Run As account, etc. etc, then it should soon be visible within the Server > All  Hosts view. Confirm by viewing the Jobs window for any errors/messages.

9

8

(more…)