Previous page

Next page

Locate page in Contents

Print this page

get_events

Summary:

Retrieves information from the event log.

Request specification:

Name

Min/Max

Type

Description

event_log

 

 

 

{

 

 

 

[

0..1

 

Denotes a choice between the eid and the subject elements.

eid

1..1

eid_type

The ID of the server that generated the event. This is usually the Hardware Node hosting Virtuozzo Containers. When the event triggers in one of the Containers, it is actually generated by the Hardware Node and its ID is recorded in the log.

subject

1..1

eid_type

The ID of the affected server. This is usually the Container that triggered the event. For example, the Container the status of which has changed. The ID of the affected Container is also recorded in the log together with the server (host) that generated the event.

]

 

 

 

start_time

0..1

datetime_type

Start time of the log.

end_time

0..1

datetime_type

End time of the log.

records

0..1

int

Number of records to retrieve from the end of the log.

sid

0..1

sidType

Report only the events with the SID specified in this element (the user SID identifies the active user at the time the event was generated).

source

0..1

string

Report only the events with the source specified here (the source is the name of the plug-in or an Agent operator that generated the event).

category

0..1

string

Report only the events associated with the category specified in this element. See the Types section for the available event types and their corresponding categories.

data

0..1

none

If this element is present, the event data will also be retrieved (the data element of the returned event structure will be populated with the event type-specific data).

}

 

 

 

Returns:

Name

Min/Max

Type

Description

event

0..[]

eventType

Event information.

Description

Every time something changes in a server that may affect its operations (e.g. status or configuration change), a system event of a corresponding type is triggered and the event information is recorded into a log. The get_events call allows to retrieve event data from the log. You may specify any of the available parameters to narrow the search down and to retrieve only the information that you require. For more information on system events, see the Events chapter.

Example:

Getting the latest record from the event log database.

Input

<packet version="4.0.0" id="555">

<target>event_log</target>

<data>

<event_log>

<get_events>

<event_log>

<records>2</records>

<data/>

</event_log>

</get_events>

</event_log>

</data>

</packet>

Output

<ns1:packet priority="0" version="4.0.0">

<ns1:origin>event_log</ns1:origin>

<ns1:target>vzclient3</ns1:target>

<ns1:data>

<ns2:event_log>

<ns2:event xsi:type="ns3:eventType">

<ns3:eid>89e27960-97b8-461f-902f-557b4b16784b</ns3:eid>

<ns3:time>2007-01-16T20:11:57+0000</ns3:time>

<ns3:source>VZAConfPeriodic</ns3:source>

<ns3:category>env_config</ns3:category>

<ns3:sid>S-1-1000-3</ns3:sid>

<ns3:info>

<ns3:message>RW52aXJvbm1lbnQgJWVudiUgY29uZmlnIGNoYW5nZWQ=</ns3:message>

<ns3:name></ns3:name>

<ns3:translate/>

<ns3:parameter>

<ns3:message>JXRpdGxlJQ==</ns3:message>

<ns3:name>env</ns3:name>

<ns3:translate/>

<ns3:parameter>

<ns3:message>NzIxNDViZjAtNzU2Mi00M2Q0LWI3MDctY2MzM2QzN2UzZjEw</ns3:message>

<ns3:name>eid</ns3:name>

<ns3:translate/>

</ns3:parameter>

<ns3:parameter>

<ns3:message>bG9jYWxob3N0</ns3:message>

<ns3:name>title</ns3:name>

<ns3:translate/>

</ns3:parameter>

<ns3:parameter>

<ns3:message>dmlydHVvenpv</ns3:message>

<ns3:name>type</ns3:name>

<ns3:translate/>

</ns3:parameter>

</ns3:parameter>

<ns3:parameter>

<ns3:message>JXRpdGxlJQ==</ns3:message>

<ns3:name>source_env</ns3:name>

<ns3:translate/>

<ns3:parameter>

<ns3:message>ODllMjc5NjAtOTdiOC00NjFmLTkwMmYtNTU3YjRiMTY3ODRi</ns3:message>

<ns3:name>eid</ns3:name>

<ns3:translate/>

</ns3:parameter>

<ns3:parameter>

<ns3:message>ZGhjcDAtMTk0LnN3LnJ1</ns3:message>

<ns3:name>title</ns3:name>

<ns3:translate/>

</ns3:parameter>

<ns3:parameter>

<ns3:message>Z2VuZXJpYw==</ns3:message>

<ns3:name>type</ns3:name>

<ns3:translate/>

</ns3:parameter>

</ns3:parameter>

</ns3:info>

</ns2:event>

</ns2:event_log>

</ns1:data>

</ns1:packet>

Please send us your feedback on this help page