Hi Jose,
Yes, I do have such log records for at least two IPs. Those two servers recently switched their IP between them.
I'm also certain that previously I had at least two servers with the same hostname, so probably the agent name would be also the same.
One more thing, I don't know if it's also might be related, but I had a server with wazuh-agent service flapping, it was going up and down many times a day.
The link you attached at least partially matches the situation.
I ran the script to clean up the *.db files and got the error: /usr/bin/mv: Argument list too long
The error is on line 31: mv -n /var/ossec/queue/db/
So I tried to modify line 31 it to: ls -1 /var/ossec/queue/db/ | xargs -i mv -n /var/ossec/queue/db/{}
Got many errors with for *.db files: mv: missing destination file operand after ‘/var/ossec/queue/db/XXXXXX.db’
So I modified the line 31 to: ls -1 /var/ossec/queue/db/ | xargs -i mv -n /var/ossec/queue/db/{} /tmp/agent-db/
This time the script worked, however, the API crushed and I needed to restart the server.
After the restart I have a resonable number of *.db files and resonable size.
[root#wazuh-02-pr1 ~]# ls -l /var/ossec/queue/db/ | wc -l
63
[root#wazuh-02-pr1 ~]# du -sh /var/ossec/queue/db/
201M /var/ossec/queue/db/
Thank you
Regards,
Max