Skip to content

Event Manager Tools

Properties of a tool can be found in the Properties Window in MIKE Workbench after selecting the tool in the Event Explorer.

Event-log query

Tool for querying events in the event manager.

Tool Info
Display Name Event-log query
API Name Event-log query
Tools Explorer /Data tools/Event-log query
NuGet Package DHI.MikeOperations.EventManager.Tools.EventLogQuery
Assembly name (.dll) DHI.Solutions.EventManager.Tools.EventLogQueryTool.dll
API Reference DHI.Solutions.EventManager.Tools.EventLogQueryTool.IEventLogQueryTool
Input Items No input items required
Output Items A table of event log entries

Tool Properties

Display Name API Name Description
Query parameters
End date EndDate Gets or sets the end date of events to query.
Event type EventTypes Gets or sets the event types to query for (Information,Warning,Error,Critical,AuditSuccess,AuditFailure).
Leave EventTypes empty to query for all event types.
Start date StartDate Gets or sets the start date of events to query.
User name UserName Gets or sets name of the user to query events for.

Code Sample

import clr
clr.AddReference("DHI.Solutions.EventManager.Tools.EventLogQueryTool")
from DHI.Solutions.EventManager.Tools.EventLogQueryTool import *

# Get the tool.
tool = app.Tools.CreateNew("Event-log query")
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
import clr
clr.AddReference("DHI.Solutions.EventManager.Tools.EventLogQueryTool")
from DHI.Solutions.EventManager.Tools.EventLogQueryTool import *

# Get the tool.
tool = DHI.Solutions.EventManager.Tools.EventLogQueryTool.IEventLogQueryTool(app.Tools.CreateNew("Event-log query"))
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
// Get the tool.
var tool = application.Tools.CreateNew("Event-log query") as DHI.Solutions.EventManager.Tools.EventLogQueryTool.IEventLogQueryTool;
// Add input items.
tool.InputItems.Add(<No input items required>);
// Set tool properties before executing the tool.
tool.Execute();
// Read the output from the list of output items.
output = tool.OutputItems;

Runtime.config

What tools to load during application startup, is specified in the XML file Runtime.config in the plugins section of the manager.

The XML below shows the tool plugin information found in the Runtime.config file.

<Plugin
  Name="DHI.Solutions.EventManager.Tools.EventLogQueryTool.EventLogQueryTool"
  Type="DHI.Solutions.Generic.ITool"
  Assembly="DHI.Solutions.EventManager.Tools.EventLogQueryTool.dll" />