How do I force a reconfiguration of Medulla agents?
Applies to: Medulla – Server
Version: All versions
Environment: On-Premise
Category: Medulla Agent / Reconfiguration
This procedure allows you to force the reconfiguration of Medulla agents.
When an agent is marked with ` need_reconf=1`, it automatically performs the following actions:
- 1. Requests a new configuration from the alternate assessor
The agent requests its complete configuration from the alternate assessor in order to retrieve the updated settings. - 2. Re-registration of the agent
The agent connects to the XMPP relay provided by the assessor and then re-registers. - 3. Submits a complete inventory
The agent automatically triggers a full inventory of the workstation and sends it to the Medulla server.
This is exactly the same mechanism used by the “Reconfigure Agent Machine” Quick Action available in the Medulla interface.
Choosing the Right Reconfiguration Method
Case 1 – Reconfiguring a Single Machine
To reconfigure a single machine, it is recommended to use the “Reconfigure Agent Machine” Quick Action.
- Find the machine in question
- Open Quick Actions
- Click “Reconfigure Agent Machine”
- Verify that the workstation successfully re-registers and reports its inventory
This is the simplest and safest method for a one-time need.
Case 2 – Reconfiguring a group of machines
If you need to reconfigure a limited number of workstations, we recommend that you:
- Create a Medulla group containing the affected machines
- Then apply the "Reconfigure Agent Machine" Quick Action to the group
This method allows you to precisely control the scope of the changes before carrying out a larger-scale operation.
Case 3 – Global reconfiguration of all machines
To reconfigure the entire fleet, you can use a MariaDB database update.
Important:
Before performing any global database update, it is strongly recommended that you test the process on a single machine using the "Reconfigure Agent Machine" Quick Action to verify that it behaves as expected.
Recommended backup:
Before making any changes to the MariaDB database, perform a database dump or a full Backup of the Medulla server.
Step 1 – Backup of the MariaDB database
1. Connect to the Medulla server via SSH
ssh root@SERVER_IP
2. Create a Backup directory (optional)
mkdir -p /root/backup_medulla
3. Perform a full MariaDB dump
mysqldump --all-databases > /root/backup_medulla/backup_medulla_$(date +%F).sql
4. Verify the Backup
ls -lh /root/backup_medulla/
Verify that the .sql file is present before continuing.
Step 2 – Access MariaDB
1. Open the MariaDB console
mysql
You should see a prompt similar to:
MariaDB [(none)]>
2. Check the xmppmaster database
show databases;
Step 3 – Force a global reconfiguration of the agents
Run the following command:
update xmppmaster.machines
set need_reconf=1
where agenttype='machine';
This command forces the reconfiguration of all machine-type agents.
Step 4 – Exit MariaDB
exit
When will the changes take effect?
- The reconfiguration of online machines is performed in batches of 240 machines every 60 seconds by default.
- Machines that are powered off or offline will automatically apply the reconfiguration the next time they connect to the Medulla server.
- Depending on the total number of affected workstations, it may take several hours for the inventory to fully update.
- After reconfiguration, each agent:
- Request their configuration from the substitute assessor
- Reconnects to the XMPP relay and re-registers
- Submit a complete inventory