此内容没有您所选择的语言版本。

Chapter 14. Events


The rel="events" link obtained from the entry point URI accesses the events collection and lists system events from Red Hat Storage Console.
Expand
Table 14.1. Event elements
Element Type Description
description string A description of the system event.
code integer The integer event code.
severity One of normal, warning, error or alert The level of severity for the event.
time xsd:dateTime format: YYYY-MM-DDThh:mm:ss The timestamp indicating when the event happened.
user id GUID The identification code for the user who triggered the event.

Example 14.1. An XML representation of the events collection

<events>
    <event href="/api/events/767" id="767">
        <description>User rhcadmin logged in.</description>
        <code>30</code>
        <severity>normal</severity>
        <time>2014-01-29T14:42:55.041+05:30</time>
        <user href="/api/users/fdfc627c-d875-11e0-90f0-83df133b58cc" id="fdfc627c-d875-11e0-90f0-83df133b58cc"/>
        <origin>oVirt</origin>
        <custom_id>-1</custom_id>
        <flood_rate>30</flood_rate>
 </event>
    ...
</events>
Copy to Clipboard Toggle word wrap
In addition to user, an event representation also contains a set of XML element relationships to resources relevant to the event.

Example 14.2. An XML representation of a volume start event

<event href="/api/events/192" id="192">
        <description>Gluster Volume data started.</description>
        <code>4004</code>
        <severity>normal</severity>
        <time>2012-09-13T20:59:22.137-04:00</time>
        <user href="/api/users/fdfc627c-d875-11e0-90f0-83df133b58cc" id="fdfc627c-d875-11e0-90f0-83df133b58cc"/>
        <cluster href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95" id="99408929-82cf-4dc7-a532-9d998063fa95"/>
    </event>
Copy to Clipboard Toggle word wrap
This example provides an XML element representation of starting a volume on the Default cluster .

Note

The events collection is read-only.
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug

14.1. Searching Events

The events collection provides search queries similar to other resource collections (see Section 7.2.3, “Searching Collections with Queries”). An additional feature when searching the events collection is the ability to search from a certain event. This queries all of events since a specified event.
Querying from an event requires an additional from argument added to the URI after the query. This from argument references an event id code.

Example 14.3. Searching from an event

GET /api/events?search=type%3D30&from=1012 HTTP/1.1
Accept: application/xml
Copy to Clipboard Toggle word wrap
This displays all events with type set to 30 since id="1012"
HTTP/1.1 200 OK
Content-Type: application/xml
<events>
    <event id="1018" href="/api/events/1018">
        <description>User admin logged in.</description>
        <code>30</code>
        <severity>normal</severity>
        <time>2011-07-11T14:03:22.485+10:00</time>
        <user id="80b71bae-98a1-11e0-8f20-525400866c73"
          href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
    </event>
    <event id="1016" href="/api/events/1016">
        <description>User admin logged in.</description>
        <code>30</code>
        <severity>normal</severity>
        <time>2011-07-11T14:03:07.236+10:00</time>
        <user id="80b71bae-98a1-11e0-8f20-525400866c73"
          href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
    </event>
    <event id="1014" href="/api/events/1014">
        <description>User admin logged in.</description>
        <code>30</code>
        <severity>normal</severity>
        <time>2011-07-11T14:02:16.009+10:00</time>
        <user id="80b71bae-98a1-11e0-8f20-525400866c73"
          href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
    </event>
</events>
Copy to Clipboard Toggle word wrap
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat