wazuh-puppet
wazuh-puppet copied to clipboard
Wazuh agent service tries to start service
On every puppet run, wazuh::agent tries to start the service, even if it is already running.
Notice: /Stage[main]/Wazuh::Agent/Service[wazuh-agent]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Wazuh::Agent/Service[wazuh-agent]: Unscheduling refresh on Service[wazuh-agent]
It would be better if we do this only if there is a change in the config file.
Hey @akshatgit,
In this case, as in the Kibana plugin one, we should include a conditional statement to ensure idempotence. We are in the process of improving the puppet module and we will take into account your suggestions.
As soon as our workflow allows us we will address it. Thanks for your contribution!
Greetings,
JP
Thanks, @Zenidd. If helpful, please assign appropriate labels.
Just noticed one more issue.
I had updated the config to include who-data, but the agent is not restarted to pick up the configs.
Timestamp of config:
~$ sudo ls -lth /var/ossec/etc/ossec.conf
-rw-r----- 1 root ossec 5.8K Sep 2 08:56 /var/ossec/etc/ossec.conf
Service status:
~$ sudo service wazuh-agent status
● wazuh-agent.service - Wazuh agent
Loaded: loaded (/etc/systemd/system/wazuh-agent.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-08-15 10:15:38 UTC; 2 weeks 5 days ago
I had to restart the agent manually to reflect the configs. Just an FYI.