4.5
Table Of Contents
- VMware View Integration Guide
- Contents
- Introduction
- Integrating with the Event Database
- Using View PowerCLI
- Introduction to View PowerCLI
- View PowerCLI Cmdlets
- View Administrator, View PowerCLI Cmdlet, and vdmadmin Operations
- View PowerCLI Cmdlet Parameters
- Examples of Using View PowerCLI Cmdlets
- Displaying Information About a View Connection Server Instance
- Updating the Configuration of a View Connection Server Instance
- Managing the Configuration of vCenter Servers in VMware View
- Managing Desktop Pools
- Creating and Updating Automatically Provisioned Desktop Pools
- Creating and Updating Linked-Clone Desktop Pools
- Creating and Updating Manually Provisioned Desktop Pools
- Creating Manual Unmanaged Desktop Pools
- Creating and Updating Desktops Provisioned by Terminal Servers
- Obtaining Information About Users and Groups from Active Directory
- Managing Desktop Entitlements
- Managing Local Desktops
- Managing Remote Sessions
- Managing Virtual Machines
- Displaying Information About Physical Computers
- Updating the Ownership of Machines
- Displaying Information About Events
- Managing the Global Configuration of VMware View
- Managing View Licenses
- Customizing LDAP Data
- Integrating with SCOM
- View Management Packs
- Name a View Connection Server Group
- Import the View MPs
- View Discovery Script
- Run the Discovery Script
- Display Discovered Objects
- Display Managed Objects
- Views and Monitors
- Enable a Proxy Agent on a Server
- Display Performance Data
- Display Information About an Alert
- Restart a Service
- Exclude a Domain from Connectivity Monitoring
- Close Alerts
- Class and Relationship Definitions
- Index
VMware, Inc. 27
Chapter 2 Integrating with the Event Database
Sample Database Queries and Views
ListallrecenteventsthatareassociatedwiththeuserfredinthedomainMYDOM.
CREATE VIEW user_events AS
(
SELECT ev.EventID, ev.Time, ev.Module, ev.EventType, ev.Severity, ev.Acknowledged
FROM ViewEvents.dbo.VE_event_historical AS ev,
ViewEvents.dbo.VE_event_data_historical AS ed
WHERE ev.EventID = ed.EventID AND ed.Name = 'UserDisplayName' AND ed.StrValue =
‘MYDOM\fred’
);
Listallrecenteventswheretheagentonamachineshutdown.
CREATE VIEW agent_shutdown_events AS
(
SELECT ev.EventID, ev.Time, ed.StrValue
FROM ViewEvents.dbo.VE_event_historical AS ev,
ViewEvents.dbo.VE_event_data_historical AS ed
WHERE ev.EventID = ed.EventID AND ev.EventType = ‘AGENT_SHUTDOWN’ AND
ed.Name = ‘MachineName’
);
Listallrecenteventswhereadesktopfailedtolaunchbecausethedesktoppoolwasempty.
CREATE VIEW desktop_launch_failure_events AS
(
SELECT ev.EventID, ev.Time, ed1.StrValue, ed2.StrValue
FROM ViewEvents.dbo.VE_event_historical AS ev,
ViewEvents.dbo.VE_event_data_historical AS ed1,
ViewEvents.dbo.VE_event_data_historical AS ed2
WHERE ev.EventID = ed1.EventID AND ev.EventID = ed2.EventID AND
ev.EventType = ‘BROKER_POOL_EMPTY’ AND
ed1.Name = ‘UserDisplayName’ AND ed2.Name = ‘DesktopId’
);
Listallrecenteventswhereanadministratorremovedadesktoppool.
CREATE VIEW desktop_pool_removed_events AS
(
SELECT ev.EventID, ev.Time, ed1.StrValue, ed2.StrValue
FROM ViewEvents.dbo.VE_event_historical AS ev,
ViewEvents.dbo.VE_event_data_historical AS ed1,
ViewEvents.dbo.VE_event_data_historical AS ed2
WHERE ev.EventID = ed1.EventID AND ev.EventID = ed2.EventID AND
ev.EventType = ‘ADMIN_DESKTOP_REMOVED’ AND
ed1.Name = ‘UserDisplayName’ AND ed2.Name = ‘DesktopId’
);
ListallrecenteventswhereanadministratoraddedaThinApprepository.
CREATE VIEW thinapp_repository_added_events AS
(
SELECT ev.EventID, ev.Time, ed1.StrValue, ed2.StrValue, ed3.StrValue
FROM ViewEvents.dbo.VE_event_historical AS ev,
ViewEvents.dbo.VE_event_data_historical AS ed1,
ViewEvents.dbo.VE_event_data_historical AS ed2,
ViewEvents.dbo.VE_event_data_historical AS ed3
WHERE ev.EventID = ed1.EventID AND ev.EventID = ed2.EventID AND ev.EventID = ed3.EventID
AND
ev.EventType = ‘ADMIN_THINAPP_REPO_ADDED’ AND
ed1.Name = ‘UserDisplayName’ AND ed2.Name = ‘ThinAppRepositoryName’ AND
ed3.Name = ‘ThinAppRepositoryPath’
);