Hello friends. I have a question regarding running remote commands on agents.
I am close to a solution, but something still eludes me.
On my manager, I have configured the command wodle:
<wodle name="command">
<disabled>no</disabled>
<tag>find</tag>
<command>
find /home -type f -newermt "$(date -d '60 minutes ago' +'%Y-%m-%d %H:%M:%S')" </command>
<interval>300s</interval>
<ignore_output>no</ignore_output>
<run_on_start>yes</run_on_start>
<timeout>0</timeout>
</wodle>
In my manager's archives.log, I see an entry like:
2023 Jun 29 19:15:59 (RPI-NC) any->find /home -type f -newermt "$(date -d '60 minutes ago' +'%Y-%m-%d %H:%M:%S')" -print ossec: output: 'find /home -type f -newermt "$(date -d '60 minutes ago' +'%Y-%m-%d %H:%M:%S')" -print':
Thus, I know the remote command is executing, being sent to the manager, and stored in the archives.log file.
That said, I'm not seeing the results of the command execution (the command output) nor do I see any of this data in my manager's GUI modules.
I'm thinking, I don't see alerting because I don't have some kind of alert-matching rule/logic.
Am I on the right track?
John