Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing process_list.erb performance #94

Merged
merged 2 commits into from
Dec 19, 2018
Merged

Fixing process_list.erb performance #94

merged 2 commits into from
Dec 19, 2018

Conversation

SitoRBJ
Copy link
Contributor

@SitoRBJ SitoRBJ commented Dec 17, 2018

Hello team,

This PR solves issue #91

When we execute a manifest to install a Wazuh manager the following list of processes is loaded:

https://github.com/wazuh/wazuh-puppet/blob/master/templates/process_list.erb

On the server.pp

https://github.com/wazuh/wazuh-puppet/blob/master/manifests/server.pp#L117

We can see how the template is added according to the enabled daemons, in this case, authd and integratord.

[root@centos-1 vagrant]# cat /var/ossec/bin/.process_list
# This file managed by Puppet.
# Any changes will be overwritten
AUTH_DAEMON=ossec-authd
INTEGRATOR_DAEMON=ossec-integratord

But if we check ossec-control status:

[root@centos-1 vagrant]# /var/ossec/bin/ossec-control status
wazuh-clusterd not running...
wazuh-modulesd is running...
ossec-monitord is running...
ossec-logcollector is running...
ossec-remoted is running...
ossec-syscheckd is running...
ossec-analysisd is running...
ossec-maild not running...
ossec-execd is running...
wazuh-db is running...
ossec-integratord not running...
ossec-authd not running...

And the corresponding processes do not start (In the tests done on Debian it did work).

If we perform a restart for example by means of the command /var/ossec/bin/ossec.control restart, the demons do start after launching the manifest, solving the problem.

[root@centos-1 vagrant]# /var/ossec/bin/ossec-control status
wazuh-clusterd not running...
wazuh-modulesd is running...
ossec-monitord is running...
ossec-logcollector is running...
ossec-remoted is running...
ossec-syscheckd is running...
ossec-analysisd is running...
ossec-maild is running...
ossec-execd is running...
wazuh-db is running...
ossec-integratord is running...
ossec-authd is running...

And the agents will be able to register without any problems.

Regards,

Alfonso Ruiz-Bravo

@SitoRBJ
Copy link
Contributor Author

SitoRBJ commented Dec 18, 2018

Hello team,

We found the root of the error. The wazuh-manager service was not restarted by its provider (redhat) in CentOS 7. By changing the provider to systemd we have made the service restart and have a correct operation, similar to Debian.

Regards,

Alfonso Ruiz-Bravo

@SitoRBJ SitoRBJ merged commit 0b5fac7 into 3.7 Dec 19, 2018
@SitoRBJ SitoRBJ deleted the running-process-list branch December 19, 2018 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant