VMware vSphere - Monitoring Extension

VMware vSphere (www.vmware.com) is a cloud computing virtualization operating system. The VMWare vSphere monitoring extension gets statistics from the VSphere server and displays them in the AppDynamics Metric Browser.

 

This eXtension works only with the standalone JAVA machine agent.

 

Metrics include:

 

VM Metrics

  • Ballooned Memory
  • Compressed Memory
  • Overhead Memory Consumed
  • Distributed CPU Entitlement
  • Distributed Memory Entitlement
  • Guest and Host Memory Usage
  • Overall CPU Demand and Usage
  • Private and Shared Memory
  • Static CPU Entitlement
  • Static Memory Entitlement
  • Swapped Memory
  • Uptime
  • Memory MB
  • Num CPU

Host Metrics

  • Distributed CPU Fairness
  • Distributed Memory Fairness
  • Overall CPU Usage
  • Overall Memory Usage
  • Up Time
  • Memory Size
  • CPU Cores

 

 

Installation

 

  1. Download the attached zip file.
  2. Unzip the file into the <machineagent install dir>/monitors/ directory.
  3. Open <machineagent install dir>/monitors/VMWareMonitor/config.yml and update the host (Host of VSphere), username and password (VSphere credentials).
  4. Also in hostConfig, the host and vms arguments needs to be configured. There are two ways to specify the value for this argument. If * is specified as the value then all the VMs/Hosts associated with the host will be fetched. If a comma separated list of values is provided, then only those VMs/Hosts wil be fetched. (see config.yml for examples)
  5. Restart the machineagent
  6. In the AppDynamics Metric Browser, look for: Application Infrastructure Performance | <Tier> | Custom Metrics | VMWare | Status

 

Example config.yml



# By default the port is 80/443 ( http/https ) for the host. If there is a specific port that is being used then append it to the host
# Case 1, default port  : default-value="hostname"
# Case 2, specific port : default-value="hostname:1234"
host: ""

#Escape special characters using "\"
username: ""

#Provide password or encryptedPassword and encryptionKey. See the documentation to find about password encryption.
password: ""

encryptedPassword:
encryptionKey:

#Provide information about hosts and vms to monitor.
# "host" will take host name you want to monitor or "*" to monitor all hosts
# "vms" will take vm names in the host specified or "*" to monitor all vms in that host
# "*" will fetch all the available hosts/vms.
hostConfig:
    - host: "host1"
      vms: ["vm1","vm2"]
    - host: "host2"
      vms: ["*"]

#Replaces characters in metric name with the specified characters.
# "replace" takes any regular expression
# "replaceWith" takes the string to replace the matched characters
metricCharacterReplacer:
    - replace: ","
      replaceWith: " "

hostThreads: 3
vmThreads: 7

taskSchedule:
    numberOfThreads: 1
    taskDelaySeconds: 50

metricPrefix: "Custom Metrics|vmware|Status|"

 

 

Metrics

 

VM Metrics

 

MetricDescription
Ballooned MemoryThe size of the balloon driver in the VM, in MB. The host will inflate the balloon driver to reclaim physical memory from the VM. This is a sign that there is memory pressure on the host.
Compressed MemoryThe amount of compressed memory currently consumed by VM, in Kb.
Overhead Memory ConsumedThe amount of consumed overhead memory, in MB, for this VM.
Distributed CPU EntitlementThis is the amount of CPU resource, in MHz, that this VM is entitled to, as calculated by DRS. Valid only for a VM managed by DRS. 
Distributed Memory EntitlementThis is the amount of memory, in MB, that this VM is entitled to, as calculated by DRS. Valid only for a VM managed by DRS.
Guest Memory UsageGuest memory utilization statistics, in MB. This is also known as active guest memory. The number can be between 0 and the configured memory size of the virtual machine. Valid while the virtual machine is running.
Host Memory UsageHost memory utilization statistics, in MB. This is also known as consumed host memory. This is between 0 and the configured resource limit. Valid while the virtual machine is running. This includes the overhead memory of the VM.
Overall CPU UsageBasic CPU Usage statistics, in MHz. Valid while the virtual machine is running.
Overall CPU DemandBasic CPU Demand statistics, in MHz. Valid while the virtual machine is running.
Private MemoryThe portion of memory, in MB, that is granted to this VM from non-shared host memory.
Shared MemoryThe portion of memory, in MB, that is granted to this VM from host memory that is shared between VMs.
Static CPU EntitlementThe static CPU resource entitlement for a virtual machine. This value is calculated based on this virtual machine's resource reservations, shares and limit, and doesn't take into account current usage. This is the worst case CPU allocation for this virtual machine, that is, the amount of CPU resource this virtual machine would receive if all virtual machines running in the cluster went to maximum consumption. Units are MHz.
Static Memory EntitlementThe static memory resource entitlement for a virtual machine. This value is calculated based on this virtual machine's resource reservations, shares and limit, and doesn't take into account current usage. This is the worst case memory allocation for this virtual machine, that is, the amount of memory this virtual machine would receive if all virtual machines running in the cluster went to maximum consumption. Units are MB.
Swapped MemoryThe portion of memory, in MB, that is granted to this VM from the host's swap space. This is a sign that there is memory pressure on the host.
UptimeThe system uptime of the VM in seconds.
Memory MBMemory in MB
Num CPUNumber of CPU Cores

 

Host Metrics

 

MetricDescription
Distributed CPU FairnessThe fairness of distributed CPU resource allocation on the host
Distributed Memory FairnessThe fairness of distributed memory resource allocation on the host
Overall CPU UsageAggregated CPU usage across all cores on the host in MHz. This is only available if the host is connected
Overall Memory UsagePhysical memory usage on the host in MB. This is only available if the host is connected
Up TimeThe system uptime of the host in seconds.
Memory SizeMemory size of the host machine
CPU CoresCPU core sof this host machine

 

Password Encryption

To set encryptedPassword in config.yaml, follow the steps below:
  1. Download the util jar to encrypt the AWS Credentials from [here](https://github.com/Appdynamics/maven-repo/blob/master/releases/com/appdynamics/appd-exts-commons/1.1.2/appd-exts-commons-1.1.2.jar).
  2. Run command:
    
    java -cp appd-exts-commons-1.1.2.jar com.appdynamics.extensions.crypto.Encryptor EncryptionKey PasswordToEncrypt
    
    For example: 
    java -cp "appd-exts-commons-1.1.2.jar" com.appdynamics.extensions.crypto.Encryptor test mypassword
    
  3. Set encryptedPassword and encryptionKey in the config.yml.

 

Contributing

 

Always feel free to fork and contribute any changes directly via GitHub.

 

Support

 

For any questions or feature request, please contact AppDynamics Center of Excellence.

 

Version:

2.5.2

Compatibility:

3.7

Last Update:

15 June 2016

 

Release Notes:

2.1: Made compatible with JDK 1.5.

2.2 : Fixed decimal metrics issue. 

2.3: Added Host metrics

2.4: Added additional metrics to Host and Vms. Displaying VM's order by Host

2.5.1: Replaced vijava with yavijava and bug fixes

2.5.2: Using latest commons to execute task and cache metrics