Purpose:
Notifies about changes in the server status, including state and/or transition changes.
Event specification:
Name |
Min/Max |
Type |
|
|
Subscription name:
env_status_subscription
See subscribe
for more information about subscriptions.
Description:
This event triggers when the status of a server changes (including state and transition changes). The event reports the status changes for every server that the Agent is aware of. If you subscribe to the event on the Master Node in a Virtuozzo group, you will receive notifications about the status changes for every server (physical or virtual) in the entire group.
The env_status_event
element substitutes the event_data
element in the eventType
structure.
Example:
Input
Subscribing to the environment status change events.
<packet version="4.0.0" id="2">
<data>
<system>
<subscribe>
<name>env_status_subscription</name>
</subscribe>
</system>
</data>
</packet>
Output
Subscription was a success.
<packet priority="0" version="4.0.0" id="2">
<origin>servd</origin>
<target>vzclient1</target>
<data>
<system>
<ok/>
</system>
</data>
</packet>
Output
The following is a notification message that was received when one of the Environments was manually stopped. The message contains the environment ID that generated the event, the text message describing the event, and the event data (old/new environment state and transition codes). Note that one of the target
elements contains the same value as the one we used in the name
element in the request, which is env_status_subscription
. Please also note that the inner data
structure contains the elements specific to this event type. In this particular case, this is the env_status_event
element.
<packet version="4.0.0">
<target>events_subscription</target>
<target>env_status_subscription</target>
<data>
<event>
<eid>849c9be9-5fbb-4e7d-b100-f841f86c150e</eid>
<time>1155317636</time>
<source></source>
<category>env_status_subscription</category>
<sid>XXX</sid>
<data>
<env_status_event>
<eid>62ec514e-bc38-4aee-830d-cc802ee2aadd</eid>
<new>
<state>3</state>
</new>
<old>
<state>3</state>
<transition>5</transition>
</old>
</env_status_event>
</data>
<info>
<message>
RW52aXJvbm1lbnQgJWVpZCUgc3RhdHVzIGNoYW5nZWQgZnJvbSAlb2xkJSB0byAlbmV3JQ==
</message>
<name></name>
<translate/>
<parameter>
<message>NjJlYzUxNGUtYmMzOC00YWVlLTgzMGQtY2M4MDJlZTJhYWRk</message>
<name>eid</name>
</parameter>
<parameter>
<message>Mw==</message>
<name>new</name>
<translate/>
</parameter>
<parameter>
<message>Mw==</message>
<name>old</name>
<translate/>
</parameter>
</info>
</event>
</data>
</packet>