Viewing the Event Log
This chapter describes the purpose of the Event Log and explains how to use it. This chapter includes the following sections:
Introduction to the Event Log
The Event Log is a table that records events that have occurred in the production running in a given namespace. The primary purpose of the Event Log is to provide diagnostic information that would be useful in case of a problem while the production is running. It includes the following items:
System-generated Event Log entries. These entries are generated for events such as production startup and are not discussed in detail in this book.
Note that these events are not the same as system events, which are generated and handled internally by InterSystems IRIS®. System events, for example, include putting background processes to sleep and later waking them. The Event Log does not record system events.
Event log entries generated by the business host classes used in the production. For information, see “Generating Event Log Entries” in the chapter “Programming in InterSystems IRIS” in Developing Productions.
For a typical production, this is the most common kind of entry in the Event Log.
Alerts. An alert sends notifications to applicable users while a production is running, in the event that an alert event occurs. The intention is to alert a system administrator or service technician to the presence of a problem. Alerts may be delivered via email, text pager, or another mechanism. All alerts are recorded in the Event Log.
For information on configuring a production to send alerts, see “Configuring Alerts” in Configuring Productions. That chapter also provides information on settings that specify the conditions under which certain events cause alerts.
Trace messages, discussed later in this book.
Viewing the Event Log is a way to “take the pulse” of a production by scanning the informational text messages that it produces while it runs. Event log entries are stored persistently in the InterSystems IRIS database and may be purged according to age, as they accumulate.
Introduction to the Event Log Page
To view the Event Log from the Management Portal, navigate to the Interoperability > View > Event Log page.
This page is divided into the following three panes where you can perform the indicated functions:
To expand and collapse the right and left panes, use the double arrow icons.
The Event Log page has the following commands:
Search — Select to sort and filter the list of event entries using the criteria shown in the left pane. See “Search Events By” for details.
Cancel — Select to cancel the current search.
Reset — Select to reset the Event Log search criteria to the default values of the quick search fields and selected event types. See “Quick Search” and “Event Types” for details.
Previous — Select to show the previous page of results based on the Page Size.
Next — Select to show the next page of results based on the Page Size.
Export — Select to export the selected entries to a text, tab-delimited (.csv), HTML, or XML file. This exported file is useful troubleshooting problems for developers or the InterSystems Worldwide Resource Center. You can use any application to examine the exported event file, but the exported file is not intended to be imported into InterSystems IRIS. To specify the format of the exported file, enter .txt , .csv , .html , or .xml as the file extension of the file name. You have the option to save the file to a location on the server or to save it locally via the browser’s downloading capability.
Entering Search and Purge Criteria
Use the left pane to enter search and purge criteria to filter the list of events.
There are three types of search filters:
Or remove entries from the Event Log as described in the following section:
Enter the following values to filter the event list:
Sort Order — Select to list either the oldest or the newest entries first. The default is Newest First.
Page Size — The maximum number of Event Log entries to display in the middle panel as a result of the search. To see additional entries, click Previous and Next. The default is 500.
Page — (Read-only) Indicates which page of the list is displayed.
Time Format — Select to show the time only or the time with the date. The default is Complete (time with date).
As you enter values in these fields the middle pane display updates to reflect your entries.
Select or clear the following check boxes to filter events as you determine necessary:
The default list shows events of all types; each event type is selected.
Search Events By
If you do not see the message you want to view in the Event Log page, you can filter the list of entries. To do so, enter values in one or more of the following fields:
Start Time — Enter the lower limit of a range of Time Logged values.
Start ID — Enter the lower limit of a range of ID values.
End Time — Enter the upper limit of a range of Time Logged values.
End ID — Enter the upper limit of a range of ID values.
Source Config Item — Select a configuration item or type the name of one.
Source Class — Enter a value in this field to list all the events logged by a specific host class.
Session ID — Find all the Event Log entries associated with a particular session.
Source Method — Enter a value in this field to list all the events logged by a specific method.
Job — Enter a value in this field to find events hosted by a specific system job.
Text — Enter a value in this field to list all the events whose text contains this string.
Most of these fields support the use of the SQL Like wildcard character (%).
Once you enter new search criteria, click Search in the ribbon bar to refresh the list accordingly.
Purge Event Log
You can purge outdated records from the Event Log by entering the number of days to keep the entries and then clicking Purge.
The displayed fields aid you in purging Event Log entries as follows:
Current Count — Read-only field displaying the total number of Event Log entries that are now in the persistent store for this production. Use the Current Count to decide whether or not it is worthwhile to purge the Event Log at this time.
Do Not Purge Most Recent — Parameter for the purge operation. It tells InterSystems IRIS how many days’ worth of Event Log entries to keep. The default value is 7, which keeps entries for the last seven days. If you want to purge all entries in the log, enter 0 in the Days field.
The count of days includes today, so keeping messages for 1 day keeps the messages generated on the current day, according to local server time.
When you click Purge, InterSystems IRIS immediately starts to purge the Event Log according to the parameters you have entered.
You cannot undo the Purge operation.
The portal provides another page where you can purge Event Log entries along with other management data. See “Purging Data” in Managing Productions.
Viewing Event Log Entries
Each time an event of interest occurs in the life cycle of a production, InterSystems IRIS writes an entry to the Event Log stating the details of what happened. You can view this log on the Interoperability > View > Event Log page of the Management Portal. The list displays the following information for each Event Log entry:
Type — Indicates the type of entry: Alert, Assert, Error, Info, Trace, or Warning. The column color also indicates the event type as follows:
Event type Column coloring Alert Yellow background with bold red text Assert Silver background with bold red text Error Pink background with bold red text Info (production start) Green background with bold green text Info (production stop) Green background with bold green text Trace Light blue background with bold blue text Warning Orange background with bold red text Info (all others) Default row color
ID — The unique identifier for the message that comprises this Event Log entry.
Time Logged — The date and time when this entry was logged.
Session — The ID of the session associated with this message. See “Sessions,” in the first chapter.
You can click Session link to see a visual trace of the session that contained this event.
Job — The system job that hosted the event.
Source — The configuration item (service, process, or operation) that sent the message.
Text — The text string associated with the Event Log entry.
Viewing Event Details
You can select a log entry to view the details of that particular event. Select a row in the middle pane and the expanded right pane displays the following informational fields:
Unique identifier for the message that comprises this Event Log entry.
Indicates the type of entry: Alert, Assert, Error, Info, Trace, or Warning. The type contains the same coloring as the list entry.
Text string associated with the Event Log entry.
Date and time when this entry was logged.
Configuration item (service, process, or operation) that sent the message.
The ID of the session associated with this message. See “Sessions,” in the first chapter.
If this event has a session ID, you can click Trace at the top of the right pane to see a visual trace of the session that contained this event.
System job that hosted the event.
Business host class that logged the event.
Method of the business host class that was running when the event was logged.
List of instructions leading up to the error.