Skip to content

Fix bug when checking agent configuration in logcollector#1225

Merged
vikman90 merged 3 commits into3.6from
fix-verify-logcollector
Sep 5, 2018
Merged

Fix bug when checking agent configuration in logcollector#1225
vikman90 merged 3 commits into3.6from
fix-verify-logcollector

Conversation

@crolopez
Copy link
Copy Markdown
Contributor

@crolopez crolopez commented Sep 5, 2018

This PR solves the bug that didn't allow to check if logcollector configurations were valid. These checks are done with the verify-agent-conf tool and when the agent loads a remote configuration.

Although it does not check the logcollector configuration of the agents, they still can load the remote configuration, showing the following warning message:

2018/09/04 16:15:05 ossec-agentd: WARNING: (1960): File limit has been reached (0). Please reduce the number of files or increase "logcollector.max_files".

@crolopez crolopez requested a review from vikman90 September 5, 2018 09:15
@crolopez crolopez added the type/bug Something isn't working label Sep 5, 2018
@crolopez crolopez force-pushed the fix-verify-logcollector branch from fea599b to 93000a0 Compare September 5, 2018 09:17
Comment thread src/logcollector/logcollector.c Outdated
}
while (g.gl_pathv[glob_offset] != NULL) {
if (current_files >= maximum_files) {
if (maximum_files && current_files >= maximum_files) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check necessary? maximum_files should never be 0 in Logcollector, and it if was, it would be an error.

@vikman90 vikman90 merged commit c5da188 into 3.6 Sep 5, 2018
@vikman90 vikman90 deleted the fix-verify-logcollector branch September 5, 2018 14:16
@vikman90 vikman90 mentioned this pull request Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants