Where can I find the Medulla logs?
Medulla uses several logs to diagnose the operation of agents, server services, deployments, computer registration, and updates.
The log to consult depends on the component or feature in question.
Note:
Before restarting a service or modifying its configuration, it is recommended that you review the relevant logs to identify the source of the problem.
1. Summary table of the main Medulla logs
| Function | Log / command | Usage |
|---|---|---|
| Medulla Windows agent | C:\Program Files\Medulla\var\log\xmpp-agent-machine.log |
Agent connection, registration, reconfiguration, and operation |
| Relay assignment | /var/log/mmc/master-asse.log |
Assigning computers to relay servers |
| Registering computers | /var/log/mmc/master-reg.log |
Registering and re-registering agents |
| Windows Updates | /var/log/mmc/master-upd.log |
Processing KB articles and searching for updates |
| Medulla services | journalctl -u SERVICE_NAME |
Diagnosing a systemd service |
| Windows SSH | C:\ProgramData\ssh\logs\ |
Diagnosing the Windows OpenSSH server |
2. Medulla agent logs on Windows
On a Windows computer, the main log file for the Medulla agent is:
C:\Program Files\Medulla\var\log\xmpp-agent-machine.log
This file can be used to diagnose, among other things:
- agent startup;
- the agent’s connection to Medulla;
- computer registration;
- agent reconfigurations;
- information sent by the agent;
- reporting Windows KB articles;
- certain issues encountered during a deployment.
Search for an agent reconfiguration
The following message indicates that a reconfiguration has been initiated:
We start a reconfiguration of the medulla agent
To check for this message in Windows:
find /c "We start a reconfiguration of the medulla agent" "C:\Program Files\Medulla\var\log\xmpp-agent-machine.log"
A large number of occurrences over a short period of time may indicate that the agent is reconfiguring itself repeatedly.
3. Relay server assignment logs
Operations related to assigning a computer to a relay server can be found in:
/var/log/mmc/master-asse.log
This log is particularly useful for diagnosing:
- the assignment of a relay to a computer;
- assignment changes;
- unusually frequent reconfigurations;
- issues related to assignment rules.
Display the last lines
tail -n 100 /var/log/mmc/master-asse.log
Monitor the log in real time
tail -f /var/log/mmc/master-asse.log
Search for a computer
grep -i "MACHINE_NAME" /var/log/mmc/master-asse.log
Identify computers that have been reconfigured multiple times
The operations guide also provides the following command to count the number of reconfigurations recorded during the day:
grep "$(date +'%Y-%m-%d') .*Configuring machine" /var/log/mmc/master-asse.log* | awk '{print $NF}' | sort | uniq -c | sort -n
This command makes it possible, in particular, to identify a computer that is being reconfigured with unusually high frequency.
4. Computer registration logs
Computer registration is logged in:
/var/log/mmc/master-reg.log
This log is particularly useful when a computer:
- fails to register with Medulla;
- takes an unusually long time to appear;
- re-registers regularly;
- shows an inconsistency between its network interfaces and its registration.
Display the last lines
tail -n 100 /var/log/mmc/master-reg.log
Follow registrations in real time
tail -f /var/log/mmc/master-reg.log
Search for a computer
grep -i "MACHINE_NAME" /var/log/mmc/master-reg.log
Count computer registrations
The following command allows you to find the number of computer registrations for the day:
grep "$(date +'%Y-%m-%d') .*Registering machine" /var/log/mmc/master-reg.log* | cut -f 8 -d ' ' | cut -f 1 -d'/' | sort | uniq -c | sort -n
It can be used, for example, to identify a computer that registers abnormally often.
5. Windows Updates module logs
Processes related to Windows updates can be found in:
/var/log/mmc/master-upd.log
This log allows you to verify the information sent by the computers to the Updates module.
Verify KB reports from the computer
In the Windows agent log, the list of installed KBs may appear in the following format:
"kb_list": "(5037592,5003791,5026037,...)"
To find this information:
findstr "kb_list" "C:\Program Files\Medulla\var\log\xmpp-agent-machine.log"
Verify KB reception on the server
When the log level of the Updates component is set to DEBUG, the list of installed KBs can be found in:
/var/log/mmc/master-upd.log
For example:
Installed KB list: (5037592,5003791,5026037,...)
To locate these lines:
grep "Installed KB list" /var/log/mmc/master-upd.log
Note:
Comparing the kb_list on the agent with the list received in master-upd.log allows you to verify that Windows Update information is being correctly transmitted to the server.
6. Medulla service logs with journalctl
Services managed by systemd can be diagnosed using the journalctl command.
View a service’s logs
journalctl -u SERVICE_NAME
For example:
journalctl -u mmc-agent
Display the last 100 events
journalctl -u SERVICE_NAME -n 100
Example:
journalctl -u mmc-agent -n 100
Monitor a service in real time
journalctl -u SERVICE_NAME -f
View logs since the last startup
journalctl -u SERVICE_NAME -b
Tip:
When a Medulla service is experiencing an error, start by checking its status with systemctl status, then use journalctl to view event details.
7. Check a service’s status before viewing its logs
Before analyzing the logs, check the status of the relevant service:
systemctl status SERVICE_NAME
For example:
systemctl status mmc-agent
To check only its status:
systemctl is-active mmc-agent
A service running normally returns:
active
The following statuses require further analysis:
inactive
failed
8. SSH logs on Windows computers
When the issue involves an SSH connection to a Windows computer, start by checking the service status:
sc query sshd
The OpenSSH logs can then be viewed using:
powershell Get-Content C:\ProgramData\ssh\logs\*.log
These logs can be particularly useful when errors such as the following occur:
Permission denied
ssh_exchange_identification: read: Connection reset by peer
Note:
SSH issues and those related to the pulseuser account may require additional checks on the Windows computer.
9. Search for an error in a log
The grep command allows you to quickly search for information in the server logs.
Search for a computer
grep -i "MACHINE_NAME" /var/log/mmc/LOG_NAME.log
Search for an error
grep -i "error" /var/log/mmc/LOG_NAME.log
Search for multiple types of errors
grep -Ei "error|warning|failed|abort" /var/log/mmc/LOG_NAME.log
Include archived log files
grep -i "MACHINE_NAME" /var/log/mmc/LOG_NAME.log*
Tip:
When an incident occurs, if possible, look for the computer name and the exact time of the problem to narrow down the amount of information you need to analyze.
10. Which log should you check depending on the problem?
| Problem | First log to check |
|---|---|
| Computer offline | C:\Program Files\Medulla\var\log\xmpp-agent-machine.log |
| Computer not registering | /var/log/mmc/master-reg.log, then the agent log |
| Computer that reconfigures itself regularly | /var/log/mmc/master-asse.log, and the agent log |
| Incorrect assignment to a relay | /var/log/mmc/master-asse.log |
| Windows Updates / KBs not reported | C:\Program Files\Medulla\var\log\xmpp-agent-machine.log, then /var/log/mmc/master-upd.log |
| Medulla service error | journalctl -u SERVICE_NAME |
| Windows SSH issue | C:\ProgramData\ssh\logs\ |
11. Temporarily increase the log level
When the information available in the logs is insufficient to identify the source of a problem, certain Medulla components can be temporarily configured to use the DEBUG logging level.
Caution:
The DEBUG level generates a much larger volume of logs. It should be used temporarily during troubleshooting and then disabled once the necessary information has been collected.
The complete procedure is described in the documentation:
Temporarily enabling Medulla DEBUG logs
12. Best practices for troubleshooting
- precisely identify the computer, relay, or service involved;
- note the date and time of the incident;
- start by reviewing the logs corresponding to the affected feature;
- search for the computer name in the logs whenever possible;
- check the service status before restarting it;
- retain the logs corresponding to the period of the incident;
- enable the DEBUG level only for as long as necessary for diagnosis.
Recommendation:
To effectively diagnose a Medulla incident, start by identifying the affected component, then review its log and look for events corresponding to the exact time of the problem. Cross-referencing the logs from the client computer and the server often allows you to quickly identify at which stage communication or processing failed.