Viewing events

You can view events in the following ways:

To get information about all events in the event log, run the following command:

kesl-control -E --query|less

By default, the application stores up to 500,000 events. You can use the less command to navigate through the list of displayed events.

You can view specific events using the application's event store query system.

When creating a query, specify the required field, select a logical expression, and specify the required value for it. The value must be specified in single quotation marks ('), and the whole query must be specified in double quotation marks ("):

--query "<field> <logical expression> '<value>' [and <field> <logical expression> '<value>' *]"

The date field should be specified in the UNIX time stamp system (the number of seconds that have elapsed since 00:00:00 (UTC), 1 January 1970).

ThreatDetected example:

EventType=ThreatDetected

EventId=2671

Initiator=Product

Date=2020-04-30 17:17:17

DangerLevel=Critical

FileName=/root/eicar.com.txt

ObjectName=File

TaskName=File_Monitoring

RuntimeTaskId=2

TaskId=1

DetectName=EICAR-Test-File

TaskType=OAS

FileOwner=root

FileOwnerId=0

DetectCertainty=Sure

DetectType=Virware

DetectSource=Local

ObjectId=1

AccessUser=root

AccessUserId=0

Query examples:

Get all events by the EventType field:

kesl-control -E --query "EventType == 'ThreatDetected'"

Display all events with the specified values of the EventType and FileName fields:

kesl-control -E --query "EventType == 'ThreatDetected' and FileName like '%eicar%'"

Display all events generated by the File_Threat_Protection task after the specified time:

kesl-control -E --query "TaskName == 'File_Threat_Protection' and Date > '1588253494'"

Page top