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.
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>
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>
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
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>
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.