Bearbeiten

Teilen über


Monitoring Business Central Server events using Event Viewer

APPLIES TO: Business Central on-premises

Events that occur on the Business Central Server instances can be recorded in event logs on the computer that is running Business Central Server. You can view the events by using Event Viewer.

About Business Central Server events in Event Viewer

Events that occur on Business Central Server instances are recorded in the event channels specific to Business Central and also in the general Windows Application log. Event channels provide a way to collect and view events from a specific event trace provider. This differs from the Windows Application log which contains system-wide events from multiple publishers (applications and components).

Business Central channel logs

In the Event Viewer console tree, open Applications and Services Logs > Microsoft > DynamicsNAV.

Server folder

The Server folder contains events from the event trace provider called Microsoft-DynamicsNAV-Server. The events are recorded in the following logs:

Log Description
Admin Includes events that target end users and IT administrators. These events typically indicate a problem that requires action to resolve the problem. An example of an admin event is a tenant database failing to mount on the Business Central Server instance.

For a list and description of these events, consult Business Central Server Admin and Operational Events.
Operational Includes events that provide information about an operation that occurred on Business Central Server instances. These events are typically ordinary operating events that do not require any action but can be used to analyze and diagnose a problem. An example of an operational event is the shutting down of the Business Central Server instance.

For a list and description of these events, consult Business Central Server Admin and Operational Events.
Debug Includes the trace event types: SQL (SQLTracing), service calls (ServiceCalls), and AL function calls (ALTracing). Learn more about the different trace events and others ways to monitor them in Business Central Server Trace Events and Monitoring Business Central Server Events .

Note: In Event Viewer, this log is hidden and disabled by default. Learn more about how to show and enable this log in Enable Business Central Debug Logs in Event Viewer.

Common folder

The Common folder contains telemetry events from the event trace provider called Microsoft-DynamicsNAV-Common. This folder contains strictly telemetry events, which have IDs 700-707. The telemetry events are recorded in the following logs:

Log Description
Admin Includes custom telemetry trace events that are emitted from the application. These are events that are sent by SENDTRACETAG method calls from inside the application.

Learn more in Instrumenting an Application for Telemetry.

Note The Business Central Server instance includes a configuration setting called Diagnostic Trace Level (TraceLevel in the customsettings.config file) that enables you to specify the lowest severity level of telemetry events to be recorded in the event log, or even turn off telemetry event logging altogether. If you do not see the expected events, then verify the Business Central Server instance configuration with an administrator. Learn more in Configuring Business Central Server.
Operational Not applicable.
Debug Includes system telemetry trace events that occur.

Note: In Event Viewer, this log is hidden and disabled by default. Learn more about how to show and enable this log in Enable Business Central Debug Logs in Event Viewer.

Application log

The Application log includes admin and operational type events (errors, warnings, and information messages) that occur on the Business Central Server instance.

To view the Application log, in the console tree, select Windows Logs, Applications.

The events in this log are the same events that are recorded in the Admin and Operation logs in the DynamicsNAV > Server channel. Therefore, you can consider the Application log to be a secondary log for these events. Unless you are using System Center Operations Manager to monitor Business Central Server events, you can disable logging Business Central Server events to the Windows Application log and rely on Applications and Services Logs instead. Learn more in Disable Logging Events to the Windows Application Log.

Note

Trace events are not included in this log.

Filtering Dynamics Server Events in Event Viewer

By default, the Business Central Server logs contain events of all levels (error, warning, and information) for all Business Central Server instances. You can use the filtering functionality that is available in Event Viewer to display only Business Central Server instance events that meet specific criteria. For example, if you have several Business Central Server instances, you can filter logs to show only events from a specific Business Central Server instance. Learn more in the following example.

Example

Your Business Central Server is running several instances that are configured with multiple tenants. In Event Viewer, you want to view only errors that occurred in the last 24 hours on the tenant MyTenant1 of the Business Central Server instance MyNavServerInstance1.

To filter the event log

  1. For example, in the console tree of Event Viewer, select Applications and Services Logs > Microsoft > DynamicsNAV > Server.

  2. Select the Admin log.

  3. In the Action pane, select Filter Current Log.

    The Filter Current Log window opens.

  4. On the Filter tab, set the Logged drop-down list to Last 24 hours.

  5. In the Error Level section, select the Error check box.

  6. Select the XML tab.

    XML similar to the following is displayed:

    <QueryList>  
      <Query Id="0" Path="Microsoft-DynamicsNAV-Server/Admin">  
        <Select Path="Microsoft-DynamicsNAV-Server/Admin">  
          *[System[(Level=2) and TimeCreated[timediff(@SystemTime) <= 604800000]]]  
      </Query>  
    </QueryList>  
    

    Microsoft-DynamicsNAV-Server indicates that Business Central Server is the provider of the events in the log.

  7. Select the Edit query manually check box, and then select the Yes button.

  8. In the <Select Path="Microsoft-DynamicsNAV-Server/Admin"> element, after *[System[(Level=2) and TimeCreated[timediff(@SystemTime) <= 86400000]]], add the following lines:

    and  
    *[EventData[Data[@Name='tenantId'] and Data  = 'MyTenant1']]  
    and  
    *[EventData[Data[@Name='serverInstanceName'] and Data='MyNavServerInstance1']]  
    

    The complete XML should look similar to the following XML:

    <QueryList>  
      <Query Id="0" Path="Microsoft-DynamicsNAV-Server/Admin">  
        <Select Path="Microsoft-DynamicsNAV-Server/Admin">  
          *[System[(Level=2) and TimeCreated[timediff(@SystemTime) <= 604800000]]]  
          and  
          *[EventData[Data[@Name='tenantId'] and Data  = 'MyTenant1']]  
          and  
          *[EventData[Data[@Name='serverInstanceName'] and Data='MyNavServerInstance1']]  
        </Select>  
      </Query>  
    </QueryList>  
    
  9. Select the OK button.

The Admin log displays only errors that occurred in the last 24 hours on tenant Tenant1 and Business Central Server instance MyNavServerInstance1. The applied filter can be removed. Alternatively, you can save it as a custom view. For more information about filtering in Event Viewer in Filter Displayed Events and Advanced XML filtering in the Windows Event Viewer.

See Also

Monitoring Business Central Server Events
Business Central Server Trace Events
Monitoring Business Central Server
Monitoring Business Central Server Using Performance Counters
Windows Event Viewer