Slides

and
Real World™ experience
Introdocution
™
d
l
r
o
W
l
a
Re
Why is it ha
rd
Roadmap
ion
t
c
u
d
o
r
t
In
What is it doing for you?
•
Synchronize vCenter inventory in OpenNMS
•
Control workflow with filter
•
Longterm performance data collection
•
Service assurance for VMs and ESX health status
•
Visualize VMware topology
ion
t
c
u
d
o
r
t
In
A little bit more detailed …
•
Authentication is handled by the vCenter
•
Detection of the management interface for
Host-System
•
VMware related information, e.g. VMware topology, is
stored in asset fields
ion
t
c
u
d
o
r
t
In
OpenNMS
vCenter
Virtual Machine
ion
t
c
u
d
o
r
t
In
OpenNMS
https://vcenter-ip:8443/sdk
3rd party ViJava
vCenter
Virtual Machine
VMware internal
ion
t
c
u
d
o
r
t
In
VMware-ManagedEntity
[VmwareCollector]!
KPI’s for VM from vCenter
!
VMware-ManagedEntity
[VmwareMonitor]!
Test: PowerState
OpenNMS
vCenter
Virtual Machine
ion
t
c
u
d
o
r
t
In
Node: Virtual Machine
IP-Interface
VMware-VirtualMachine
VMware-ManagedEntity
ion
t
c
u
d
o
r
t
In
Node: Virtual Machine
VMware Tools required!
IP-Interface
VMware-VirtualMachine
VMware-ManagedEntity
ion
t
c
u
d
o
r
t
In
Node: Virtual Machine
IP-Interface
VMware-VirtualMachine
VMware-ManagedEntity
Collectd
Pollerd
ion
t
c
u
d
o
r
t
In
Node: Virtual Machine
IP-Interface
VMware-VirtualMachine
VMware-ManagedEntity
Collectd
VMware-ManagedEntity
[VmwareCollector]!
KPI’s for VM from vCenter
Pollerd
VMware-ManagedEntity
[VmwareMonitor]!
Test: PowerState
ion
t
c
u
d
o
r
t
In
OpenNMS
vCenter
Virtual Machine
Host System
ion
t
c
u
d
o
r
t
In
OpenNMS
vCenter
Virtual Machine
Host System
vCenter - Management
Network
vCenter - OpenNMS needs
access directly to ESX
Host
ion
t
c
u
d
o
r
t
In
OpenNMS
Pollerd: VMwareMonitor!
Collectd: VmwareCollector
vCenter
Virtual Machine
Host System
ion
t
c
u
d
o
r
t
In
OpenNMS
getAuthenticationTicket()
vCenter
Virtual Machine
Host System
ion
t
c
u
d
o
r
t
In
Using AuthenticationTicket
Pollerd: VMwareCimMonitor!
Collectd: VmwareCimCollector
OpenNMS
getAuthenticationTicket()
Pollerd: VMwareMonitor!
Collectd: VmwareCollector
vCenter
Virtual Machine
Host System
ion
t
c
u
d
o
r
t
In
Node: Virtual Machine
IP-Interface
VMware-VirtualMachine
VMware-ManagedEntity
Collectd
Pollerd
Node: Host System
IP-Interface
VMware-HostSystem
VMwareCim-HostSystem
VMware-ManagedEntity
ion
t
c
u
d
o
r
t
In
Node: Virtual Machine
IP-Interface
VMware-VirtualMachine
VMware-ManagedEntity
Collectd
Pollerd
Node: Host System
IP-Interface
VMware-HostSystem
VMwareCim-HostSystem
VMware-ManagedEntity
ion
t
c
u
d
o
r
t
In
Node: Virtual Machine
IP-Interface
VMware-VirtualMachine
VMware-ManagedEntity
Collectd
VMware-HostSystem
[VmwareCollector]!
KPI’s from vCenter
!
VMwareCim-HostSystem
[VmwareCimCollector]!
KPI’s from ESX
Pollerd
Node: Host System
IP-Interface
VMware-HostSystem
VMwareCim-HostSystem
VMware-ManagedEntity
VMwareCim-HostSystem
[VmwareCimMonitor]!
Test: ESX Health State
!
VMware-ManagedEntity
[VmwareMonitor]!
Test: PowerState
ion
t
c
u
d
o
r
t
In
Real World™
Real Wo
rld™
•
Detecting services on Host-Systems with multiple
unreachable interfaces
•
Authentication with local vCenter user vs. ADS
integration
Workflow for a Host-System
during the import
Real Wo
rld™
requisition = null;!
for (hostSystem : allHostSystems) {!
! for (ipadd : allExceptLoopback) {!
!!
detectService(“VMwareCim-HostSystem”);!
!}!
! generateTopologyAssetField();!
! addAssetFields(“CPU”,”RAM”);!
! addCategory(“VMware5”);!
! addNodeToRequisition();!
! return requisitiion;!
}
Workflow for a Host-System
during the import
Real Wo
rld™
requisition = null;!
for (hostSystem : allHostSystems) {!
! for (ipadd : allExceptLoopback) {!
!!
detectService(“VMwareCim-HostSystem”);!
!}!
! generateTopologyAssetField();!
! addAssetFields(“CPU”,”RAM”);!
! addCategory(“VMware5”);!
! addNodeToRequisition();!
! return requisitiion;!
}
Real Wo
rld™
OpenNMS
getAuthenticationTicket()
Microsoft Active
Directory Services
vCenter
Virtual Machine
Authenticate against LDAP
Host System
Real Wo
rld™
OpenNMS
getAuthenticationTicket()
Microsoft Active
Directory Services
Authenticate against LDAP
vCenter
Virtual Machine
LDAP vs. local user
Host System
Real Wo
rld™
•
Data collection is configured by default to get *ALL*
collectable KPI’s
•
Measurements from sensors needs additional
calculation
Metric called: Base Unit 2 which-> value / 10^2)
Real Wo
rld™
http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.cimsdk.smashref.doc/class_OMC_NumericSensor.html
Real Wo
rld™
uint16 BaseUnit
= Volts(5)!
sint32 UnitModifier = -6!
!
sensorReading * 10^-6 => Microvolts
Why is it hard?
d?
r
a
h
it
s
i
y
Wh
Version combinations!
!
•
ViJava Library
•
vCenter 3/4/5.0/5.1/5.5
•
Underlying OS for vCenter
•
Authentication methods
•
ESX Host operating system versions
•
API calls which require additional communication for
authentication
•
Side effects from non-perfect functional ADS setups
d?
r
a
h
it
s
i
y
Wh
What do we have under control?!
!
•
Implementation of the 3rd party libraries ViJava and
Sblime
•
Algorithms for the import
•
Algorithms for performance data collection
•
Workflows to model the synchronization behavior
Roadmap
Roadm
ap
•
Calculate sensor readings during data collection
https://github.com/OpenNMS/opennms.git
branch: feature-vmware-metrics
•
Move import to “Inventory Integration Service”
https://github.com/OpenNMS/opennms-provisioning-integration-server.git
branch: feature-vmware-source
•
Improve diagnostic tools like vmwareConDiag
https://github.com/opennms-forge/vmwareConDiag.git
•
Improve graphing
https://github.com/OpenNMS/opennms/tree/vmware-graph-improvement/opennms-base-assembly/src/main/
filtered/etc/snmp-graph.properties.d
•
Create detector for Host-System service
•
Bamboo has to build Yum/Debian packages
http://www.opennms.org/wiki/OpenNMS_and_Vagrant_with_VirtualBox
release -> “branches/topology-HUD-display”
Roadm
ap
$OPENNMS_HOME/bin
./vmwarereqtool vmware://user:pass@vcenter
•
Run provisioning run on cli
•
Using filter like ?importHostOnly=true
Roadm
ap
$OPENNMS_HOME/bin
./vmwarecimquery vcenter user pass
Roadm
ap
VMware Connection Diagnostics
•
It has to build from source
•
Java JDK + Maven required
mvn clean install!
•
java -jar …jar-with-dependencies.jar!
•
config.properties
https://github.com/OpenNMS/opennms-provisioning-integration-server.git
branch: feature-vmware-source
Roadm
ap
Roadm
ap
Roadm
ap
Move from integrated URL requisition in
Provisiond to to “Inventory Integration Service”
•
Using just standardized XML model for import
•
More flexibility manipulating the requisition before
import with Groovy scripts
•
Free provisiond from 3rd party dependencies
•
Simplify code for JUnit test environment around
Provisioned
•
Allow faster iteration for fixing import issues
Roadm
ap
OpenNMS
Alarmd
Eventd
Notifd
Pollerd
Provisiond
VMware
-
External dependencies in OpenNMS!
Changes require a full release
cycle of the whole OpenNMS project!
Hard to write JUnit tests, mocking
vCenter with versions is quite
impossible
VMware vCenter
Roadm
ap
OpenNMS
Alarmd
Eventd
Notifd
Pollerd
Provisiond
VMware vCenter
VMware
Start loosing control
cause of depending
on 3rd party libs
Roadm
ap
OpenNMS
Alarmd
OpenNMS
Integration Layer
Eventd
Notifd
Pollerd
Provisiond
VMware
VMware vCenter
Roadm
ap
OpenNMS
Alarmd
OpenNMS
Integration Layer
Eventd
Notifd
Pollerd
Provisiond
VMware
VMware vCenter
Moving technology
specific implementation
to smaller independent
code base
Roadm
ap
OpenNMS
Alarmd
-
-
OpenNMS
Integration Layer
Eventd
Notifd
Pollerd
Provisiond
Standardized API!
Provides public integration
interface via ReST and XML data
model!
Hardening and Unit-Testing is
easier
VMware
-
ReST API calls!
XML requisition data model
VMware vCenter
Poor mans adaption of ETL
Roadm
ap
Extract, Transform, Load
-
Changes don’t affect core project
—> faster iteration!
Less complex code surrounded
easier to test!
Fast development cycle
OpenNMS
Alarmd
-
-
OpenNMS
Integration Layer
Eventd
Notifd
Pollerd
Provisiond
Standardized API!
Provides public integration
interface via ReST and XML data
model!
Hardening and Unit-Testing is
easier
VMware
-
ReST API calls!
XML requisition data model
VMware vCenter