Monitoring Architecture
Monitoring is a collection framework for sync data between open-vdi and XenServer, XenDesktop and VMs.
Introduction
- Purpose/Overview - We want to update the status of Hypervisors and VMs correctly.
Specification
Function Architecture
Working Process
- Scheduler periodically publish commands to workers
- Workers receive commands
- Workers do jobs if commands are related with itself
- Workers response the result to queue
- Updater receive the result and update DB
Feature Specification
| Category | Sub Command | Description |
| Command | getWorkerInfo | get general information of workers |
| Command | ping | request heartbeat |
| VMCommand | getVMs(uuid) | get information about VMs |
Requirements
CitrixXenDesktopDB
| Field | Type | Description or example |
| HostedMachineId | string | VM's UUID |
| Field | Type | Description or example |
| HostedMachineName | string | VM's name |
| HostingServerName | string | Hypervisor name of VM |
| Field | Type | Description or example |
| WorkerState | int | VM's name |
| PowerState | int | 3:stopped, 5:paused, 4:running |
PowerState
- Unmanaged (0)
- Unknown (1)
- Unavailable (2)
- Off (3)
- On (4)
- Suspended (5)
- Turning on (6)
- Turning off (7)
- Suspending (8)
- Resuming (9)
State
- Off
- Unregistered
- Ready
- Disconnected
- In use
SessionsState
- Other (0)
- Preparing session (1)
- Connected (2)
- Active (3)
- Disconnected (4)
- Reconnecting (5)
- Non brokered session (6)
- Unknown (7)
| Status | WorkerState | PowerState | SessionState |
| Off | < 0 | !4 | - |
| Unregistered | < 0 | 4 | - |
| Ready | 0 | - | |
| Disconnected | 2 | 4 | !2 |
| InUse | 2 | 4 | 2 |
| Field | Type | Description or example |
| SessionState | int | VDI connection status |
In-use(2) | Disconnected(3)
No session is not connected
Unregister : 최초 생성
Ready : 설치가 끝나서 Agent와 DDC 간의 통신 성공
In-use : 사용자가 웹인터페이스를 통해서 접속 중일 때
Disconnected : 사용자가 나갔을 때
off : VM을 shutdown 했을 때
-> unregister : VM 문제가 있을 경우(vda agent - ddc 간 통신 에러)
Request Commands
| Command | Parameters | Description |
| ping | hostname | request heatbeat |
| register | - | request agent existence |
| getVDIs | uuid | request VDI information |
{"backoff": 60, "method": "ping", "request": {}}
{"backoff": 60, "method": "register", "request": {}}
{"backoff": 60, "method": "getVMs", "request": {}}
Response Format
This is response for specific command, the result is stored in response key
format is dictionary like:
{'method':'getVMs',
'response':[ xxx: xxx]
}Add your content here. Format your content with:
- Text in bold or italic
- Headings, paragraphs, and lists
- Automatic links to other wiki pages