VMware host monitoring prerequisites
This section discusses configuring your Virtual Machine Hosts (VMHost) for SolarWinds SAM integration. Procedures will outline how to enable Secure Shell (SSH) and SNMP on a VMHost, and then walk through the creation process of a VMware service account.
Tip
Ideally, you should also monitor each virtual server within a VMHost via SNMP or WMI. VMware Tools should be installed on all virtual servers. Note that the free version of VMware ESXi does not support SNMP.
Enabling and configuring SNMP
There are a variety of ways to enable and configure SNMP on a VMHost. We will explain two methods, which should cover most VMHost types and versions. The first method only applies to VMware ESXi 5.1 and explains how to remotely enable SNMP via SSH. The second method involves logging in to the VMHost console itself, and should translate well to most versions.
Method 1 – enabling and configuring SNMP via Secure Shell
There are two parts to this method; first we will enable SSH on the VMHost, and then use PuTTY to connect to the host and edit its snmp.xml
file.
Note
PuTTY is a free open source terminal emulator that supports network protocols, such as SSH, SCP, Telnet, and rlogin. We will be using SSH in this procedure. Download PuTTY from the following URL: http://www.putty.org/
Part 1 of 2 – enabling SSH on ESXi 5.1 using vSphere
The following steps explain how to enable SSH and open the firewall to allow SSH connections.
Tip
We recommend only temporarily enabling SSH access, for security reasons.
Launch the vSphere Client and log in with administrator credentials, such as
root
.Click on the Inventory icon in the Inventory panel.
In the left panel, select the host.
Click on the Configuration tab.
Click on Security Profile in the Software panel.
Click on Properties in the Services section.
Select SSH in the Service Properties window.
Click on the Options button and select one of the following:
Start and stop manually: This enables temporary SSH access.
Start and stop with host: This enables SSH indefinitely. There are security implications to consider when enabling this feature.
Click on Start to enable the service.
Click on OK at the SSH Options window and the Service Properties window.
While still on the Configuration tab, select Properties in the Firewall section.
Check the box under Required Services | Secure Shell | SSH Server.
With SSH Server still selected, click on the Firewall button.
Select Allow connections from any IP address radio button and click on OK.
Click on OK at the Firewall Properties window.
Part 2 of 2 – enabling and configuring SNMP using PuTTY
The following steps explains how to use PuTTY to connect to the host and edit its snmp.xml
file.
Run
putty.exe
.Note
The author assumes that the reader is familiar with PuTTY. A detailed tutorial for its use is beyond the scope of this book. For a PuTTY tutorial, visit the author's blog at http://justinmbrant.blogspot.com/.
Connect to your VMHost. A command line window will appear.
Enter your
root
login credentials.Click on Yes if you see a PuTTY Security Alert.
Navigate to the VMware folder:
~ # cd /etc/vmware /etc/vmware #
List folder contents to ensure
snmp.xml
is available:/etc/VMware/ # ls
Edit
snmp.xml
using vi editor:/etc/VMware # vi snmp.xml
You will see a single line; press I to enter the edit mode and use the arrow keys to navigate.
Enable SNMP by changing
false
totrue
between<enable>
and</enable>
.Assign the community string by entering one between
<communities>
and</communities>
. For example, we used S4MVMH0st!Press Esc and type
:wq
to save and quit. If you made a mistake, type:q!
to quit without saving, and repeat steps 6 through 12.Restart the host daemon:
/etc /VMware/ # cd ~ # /etc/init.d/hostd restart watchdog-hostd: Terminating watchdog process with PID 201623 hostd stopped. hostd started.
Tip
After successfully enabling and configuring SNMP on a VMHost, you should go back and disable SSH, then close the firewall to disallow SSH access.
Method 2 – enabling SNMP on ESXi 5.1 or prior via the console
This method explains how to enable SNMP via the VMware ESXi console, by directly logging in to the VMHost server.
Go to the ESXi console on the server itself, that is, not remote.
Press Alt + F1 to access the hidden console.
If using ESXi 5.1, then skip to step 6.
If using versions prior to ESXi 5.1 then type
unsupported
in the hidden console and press Enter.Note
You will not see any text you as you type the password.
You will see Tech Support Mode warning.
Type the
root
Login Credentials.Now follow steps 6 to 12 outlined in the Part 2 of 2 – enabling and configuring SNMP using PuTTY section.
Creating a service account for VMHost
Before SolarWinds SAM can start polling a VMHost, a service account should be created for it to use, opposed to using the root credentials. The following procedure will explain how to create a VMware service account, to pass along to SolarWinds SAM.
Launch the vSphere Client and log in with administrator credentials, such as
root
.Click on Ignore if you are prompted with an untrusted SSL certificate warning.
In the left panel select the host.
Select the Local Users & Groups tab in the right panel
Click on the Users button under view.
Right-click within the right panel, and then select Add.
On the Add New User window:
Enter both a Login and a User Name. For example, we used
SAMVMHOST
.Enter and confirm a Password.
Click on OK.
Select the Permissions tab.
Right-click within the right panel, and then select Add Permission.
On the Assign Permissions window, click on Add.
Click on the Add button.
Select the user you just created and click on Add, then click on OK on the Select Users and Groups window.
Under the Assigned Role area, select Read-only and then click on OK on the Assign Permissions window.