Events

This context is a system context that provides access to different data and operations related to event management. It is not shown in the visible context tree.

Unique Actions

[?]

Remove Expired Events

Removes expired events from event history.

Action Type:

Call Function

Action Name:

removeExpired

Permissions:

Accessible at Engineer permission level

[?]

Acknowledge Alert

This action is available for:

The action allows to acknowledge an alert event that was selected in Active Instances or Active Alerts table. It prompts an operator to enter acknowledgement text first.

Action Name:

acknowledgeAlert

Non-Interactive Mode:

Not Supported

Permissions:

Accessible at None permission level

Advanced Information

Context Information

Context Type: events

Context Name: events

Context Description: Events

Context Path: events

Context Mask: events

Context Permissions

[?]

Level

Description

None

No access allowed.

Observer

Accessing event history.

Operator

Acknowledging events.

Manager

Deleting events.

Engineer

Mass-deleting events.

Explicitly removing expired events.

Administrator

All operations.

Public Variables (Properties)

[?]

This context has no public variables (properties).

Public Functions

[?]

Acknowledge Event

Adds a new acknowledgement to the event.

Function Name:

acknowledge

Permissions:

Accessible at Operator permission level

Input Records:

1

Input Format:

Name

Type

Description

context

String

Context of the event to acknowledge.

name

String

Name of the event to acknowledge.

id

Long

ID of event to acknowledge.

ack

String

Acknowledgement text.

author

String

Acknowledgement author (optional field, username of the active user is used if author was not specified). This is just a plain text field; it is not actually linked to a system user, and thus should not be considered auditable (always accurate).

Output Records:

0

Output Format:

None

Enrich Event

Adds a new enrichment to the event.

Function Name:

enrich

Permissions:

Accessible at Engineer permission level

Input Records:

1

Input Format:

Name

Type

Description

context

String

Context of the event to enrich.

name

String

Name of the event to enrich.

id

Long

ID of event to enrich.

enrichmentName

String

Enrichment name. It can contain only English letters, numbers, and underscores.

enrichmentValue

String

Enrichment value string. Numbers, dates and other types of enrichments should be encoded into strings using any method preferred by tools that are supposed to analyze this enrichment later.

Output Records:

0

Output Format:

None

Update Event

Alter a single event fired in the past, without firing a new event. The expression is evaluated in the given context, and must evaluate to a data table formatted as an event instance. The resulting data table is used to update the event instance indicated by id in storage, and permissions for that event instance are not altered. The event retrieved by id is provided as the default data table for the expression. The provided context and name must exactly match the context and name of the provided event id.

Function Name:

update

Permissions:

Accessible at Manager permission level

Input Records:

1

Input Format:

Name

Type

Description

context

String

Context where the event was fired.

name

String

Name of the event.

id

Long

Event ID.

expression

String

Text of expression to use for updating the event. Expression evaluation must result in a data table with the same format as the default data table.

Expression Resolution Environment:

Default Context

Context the event occurred in.

Default Data Table

Event's data table.

Default Row

0

Environment Variables

Variable Name

Value Type

Description

id

Long

Unique ID of the event.

context

String

Full path to the event's context.

event

String

Name of the event.

level

Integer

Event level.

time

Date

Event timestamp.

acknowledgements

Data Table

Event acknowledgements table.

enrichments

Data Table

Event enrichments table.

Output Records:

0

Output Format:

None

Delete Event

Permanently deletes event from event history.

Function Name:

delete

Permissions:

Accessible at Manager permission level

Input Records:

0...unlimited

Input Format:

Name

Type

Description

context

String

Context path where the event was fired.

name

String

Name of event.

id

Long

Event ID.

Output Records:

0

Output Format:

None

Remove Expired Events

Removes all expired events from event history. Note, that normally all expired events are removed automatically by Iotellect Server by periodic execution of this function.

Function Name:

removeExpired

Permissions:

Accessible at Engineer permission level

Input Records:

0

Input Format:

None

Output Records:

0

Output Format:

None

Get Event History

Returns the history of one or more events.

Note that if multiple input records are provided:

  • The filter, fromDate, toDate, sortField, sortOrder, limit, and additionalCriteria are taken from the first input record and applied to all subsequent input records.

  • Only the mask and event fields need to be included in the second and subsequent input records.

See the View Event History action for more information.

A single Get Event History call can only return events retrieved from a single event storage type. If some referred events are stored in different types of databases (e.g. NoSQL and relational), the call will fail.

Function Name:

get

Permissions:

Accessible at Observer permission level

Input Records:

1…Unlimited

Input Format:

Name

Type

Description

mask

String

Context mask defining a number of contexts from which to select events.

event

String

Event type name.

filter

String

Text of expression to use for event filtering or NULL to disable filtering. Use the limit property when filtering to reduce memory consumption by the server.

Filter Expression Resolution Environment:

Default Context

Context the event occurred in.

Default Data Table

Event's data table.

Default Row

0

Environment Variables

Variable Name

Value Type

Description

id

Long

Unique ID of the event.

context

String

Full path to the event's context.

event

String

Name of the event.

level

Integer

Event level.

time

Date

Event timestamp.

acknowledgements

Data Table

Event acknowledgements table.

enrichments

Data Table

Event enrichments table.

fromDate

Date

Timestamp used to select only events which occurred after a certain date. If it is NULL, all oldest events will be selected.

toDate

Date

Timestamp used to select only events which occurred before a certain date. If it is NULL, all recent events will be selected.

dataAsTable

Boolean

This is a hidden field that can be used to unroll each field of the event data table into a separate field of the function output.

  • If set to false (default), each event data table's field is put to a separate field of function output. Note that the following conditions must also be true:

    • The value for the event field is the same for all inputs.

    • The value for the mask field indicates a specific context path, and is the same for all inputs.

  • If true, each event's data table is put to a single field (DataTable-type) of function output.

sortField

String

This is a hidden field. It defines event sort order:

  • context - sort by source context path

  • name - sort by event type name

  • creationtime - sort by creation time

  • expirationtime - sort by expiration time

  • level - sort by level

  • count - sort by duplicate events count

If the Event Storage type for the stored event is NoSQL, only creationtime can be used as the sortField.

sortOrder

Boolean

This is a hidden field. It defines whether ascending sort order should be used.

limit

Integer

This is a hidden field. It defines maximum number of events to load or NULL to load all available events.

additionalCriteria

Data Table

This is a hidden field. It defines additional storage-level filtering criteria

Field Name

Value Type

Description

logical

Integer

Logical operation:

  • 0 - None

  • 1 - AND

  • 2 - OR. Only available if the Event Storage type for the stored event is Relational Database.

type

Integer

Filter type:

  • 0 - Condition

  • 1 - Nested condition. Only available if the Event Storage type for the stored event is Relational Database.

column

String

Column name.

operation

String

Filter operation. Available operations are:

  • EQUALS. Must be used if the Event Storage type for the stored event is NoSQL.

  • IS_GREATER_THAN

  • IS_GREATER_OR_EQUAL_THAN

  • IS_LESS_THAN

  • IS_LESS_OR_EQUAL_THAN

value

String

Column value.

nested

Data Table

Defines nested condition. Only available if the Event Storage type for the stored event is Relational Database.

Output Records:

0...unlimited

Output Format:

Dynamic:

Name

Type

Description

eId

Long

Event ID (hidden field).

eCreationtime

Date

Event creation time.

eExpirationtime

Date

Event expiration time.

eContext

String

Event source context path.

eName

String

Event type name.

eLevel

Integer

Event level.

eCount

Integer

Number of events (if similar events were suppressed by deduplication).

eAcknowledgements

Data Table

Event acknowledgements.

eData

Data Table

Event-specific data. This field will be included into output if the dataAsTable input setting is enabled or in any of the following cases:

  • Any of the mask or event input settings are different from one another.

  • Any of the mask input settings indicate a context mask rather than a specific context path.

*

*

Remaining fields will be added only if the dataAsTable input setting is disabled and the following conditions are met:

  • Both the mask and event settings are the same for every input.

  • The mask setting indicates a specific context path, and is not a context mask.

Number, names, types and other parameters of fields will match ones declared in event definition.

Get Event by ID

Returns a single event with a specified identifier.

Function Name:

getById

Permissions:

Accessible at Observer permission level

Input Records:

1

Input Format:

Name

Type

Description

context

String

Context of the event.

event

String

Event type name.

id

Long

Event identifier.

dataAsTable

Boolean

This is a hidden field.

If false (default), each event data table's field is put to a separate field of function output.

If true, each event's data table is put to a single field (DataTable-type) of function output.

Output Records:

1

Output Format:

Dynamic:

Name

Type

Description

eId

Long

Event ID (hidden field).

eCreationtime

Date

Event creation time.

eExpirationtime

Date

Event expiration time.

eContext

String

Event source context path.

eName

String

Event type name.

eLevel

Integer

Event level.

eCount

Integer

Number of events (if similar events were suppressed by deduplication).

eAcknowledgements

Data Table

Event acknowledgements.

eData

Data Table

Event-specific data. This field will be included into output only if dataAsTable input setting is enabled.

*

*

Remaining fields will be added only if dataAsTable input setting is disabled. Number, names, types and other parameters of fields will match ones declared in event definition.

Delete Events

Deletes events from event history.

Function Name:

massDelete

Permissions:

Accessible at Engineer permission level

Input Records:

1

Input Format:

Name

Type

Description

mask

String

Context mask defining a number of context to delete events from.

event

String

Event name.

startDate

Date

Nullable. If specified, only events occurred after startDate are deleted.

endDate

Date

Nullable. If specified, only events occurred before endDate are deleted.

Output Records:

0

Output Format:

None

Public Events

[?]

Common Events: info (Information)

Removal

This event is generated once a persistent event is being removed from the database.

Event Name

removal

Permissions:

Accessible at Admin permission level

Expiration Period:

Non-persistent

Records:

1

Record Format:

Field Name

Field Type

Notes

context

String

Context from that an event is being removed.

name

String

Name of the removed event.

id

String

ID of the removed event.

Acknowledgement

This event is generated once a persistent event is being acknowledged.

Event Name

acknowledgement

Permissions:

Accessible at Admin permission level

Expiration Period:

Non-persistent

Records:

1

Record Format:

Field Name

Field Type

Notes

context

String

Context from that an event is being ackwnowledged.

name

String

Name of the ackwnowledged event.

id

String

ID of the ackwnowledged event.

Enrichment

This event is generated once a persistent event is being enriched.

Event Name

enrichment

Permissions:

Accessible at Admin permission level

Expiration Period:

Non-persistent

Records:

1

Record Format:

Field Name

Field Type

Notes

context

String

Context from that an event is being enriched.

name

String

Name of the enriched event.

id

String

ID of the enriched event.

Was this page helpful?