Skip to main content
Matrix42 Self-Service Help Center

EMv7 agent logging engine

Applies for EMv7


As of to date, settings for the log of the agent profile cannot be configured in the EM web console, only the number of normal log files can be managed via the EM web console (old entry "maximum number of log entries", default value is 100).

Explicit configuration is done in the file under "%ProgramData%\Matrix42\Enterprise Manager Agent\Settings\EmProfile.json". The following configurations can be set in the "Em_Properties" section:

Name Default Description
MaxLogFileSizeInKb 1024 Maximum size of a log file in kilobyte
MaxLogFileNumber 100 Maximum number of log files (currently the only configurable value)
MaxDebugLogFileSizeInKb 4096

Maximum size of a debug log file in kilobyte

MaxDebugLogFileNumber 5

Maximum number of debug log files

Format of log files

 The two EmAgent log files (EmAgent.log & EmAgentDebug.log) are based on the CM trace format (see SCCM), i.e., the log files can be viewed via the "Configuration Manager Trace Log Tool".

Debug and normal logs

The EmAgentDebug.log file contains everything contained in the EmAgent.log file, plus information that the developers want to include in the log at specific points to supply advanced information during program development and trouble shooting.

The logs can be found on each client under:

 "%ProgramData%\Matrix42\Enterprise Manager Agent\Log\EmAgent.log" &

"%ProgramData%\Matrix42\Enterprise Manager Agent\Log\EmAgentDebug.log"

The EmAgentDebug.log is  by default  disabled! It can be switched on via the following 2 ways:

1. The EmAgent is started with the parameter "/ debug"

2. In the "EmAgent.exe.config" (located in the installation directory of the agent) exists a switch "DoDebugLogging". If this value is true then the debug log is enabled

Impact of the configuration

If one of the two logs mentioned above exceeds its maximum size (MaxLogFileSizeInKb or MaxDebugLogFileSizeInKb), the system checks whether the maximum number of log files (MaxLogFileNumber or MaxDebugLogFileNumber) has been exceeded. If yes, the oldest log file will be deleted.

Existing log files are numbered in an ascending order and a suffix is added to the file name is added accordingly (e.g., EmAgent_00001.log - EmAgent_00100.log).

How to analyze errors in tasks

The EmAgent.log file contains an entry such as "Task <Number> <TaskDescription> finished with error", which is currently not recognized as an error within the agent process (and therefore, not marked in red color in the CM trace log). To receive additional details on a processed task, you must view the task file. All task files can be found under the following path:

"%ProgramData%\Matrix42\Enterprise Manager Agent\Tasks\Task_<Number>.json"

Other sections of the task file

This file is structured in a way that displays the description of the task at the beginning ("Task" section), followed by the "Actions" section with the description of all actions to be executed within this task and then all assigned variables in the"Variables" section and environment variables in the "EnvironmentVariables" section. The next section, "Progress", shows the overall progress, and the "Status" section the overall status of the task; it contains a status for the individual actions (which can also be viewed in the EM web console).

Log information of a task

The "Logs" section is interesting for error analysis, for it contains detailed information on individual steps of the task processing, including reasons for a failure of the task (including system error messages, e.g., that a user account is unknown or an AD group could not be added).

They are grouped based on the individual actions of the task ("Action_<Number>"), beside the special actions (start task in the "StartTask" subsection and finish task in the "FinishTask" section), with <Number> being the ID from the "TaskEm_Actions" table that defines the action within the task.