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

Add logcollector ignore and restrict IT tests #3582

Merged
merged 34 commits into from
Jan 17, 2023

Conversation

Deblintrake09
Copy link
Contributor

@Deblintrake09 Deblintrake09 commented Nov 10, 2022

Related issue
#3480

Description

This PR aims to add new tests to the logcollector integration test suite related to the new restrict and ignore options. When adding this options to a location tag, incoming logs will be ignored and not set for analysis if they do not match a configured restrict tag or if they match a configured ignore tag. The new options allow for 3 different regex engines to match the logs (PCRE2, osregex and osmatch).

This PR adds a total of 48 new test cases. All tests have been added to test_logcollector/test_options suite.

Added

  • The new test_ignore_regex module adds 12 test cases for ignore tag, with default and type value configured.
  • The new test_restrict_regex module adds 12 test cases for restrict tag, with default and type value configured.
  • The new test_restrict_ignore_regex module adds 24 test cases with one ignore and one restrict tag, with different combination of regex types and matching either one of the tags, none, or both.

Testing performed

Tester Test path Jenkins Local OS Commit Notes
@Deblintrake09 (Developer) test_logcollector 🟢🟢🟢 ⚫⚫⚫ Manager Centos 5877ee9 Nothing to highlight
@Deblintrake09 (Developer) test_logcollector 🟢🟢🟢 ⚫⚫⚫ Windows, Linux, Solaris, macOs 5877ee9 Nothing to highlight
@damarisg (Reviewer) test_logcollector/ 🟢 🚫 🚫 🚫 Windows Agents a56fc8f Nothing to highlight
@damarisg (Reviewer) test_logcollector/ 🟢 🚫 🚫 🚫 CentOS Manager a56fc8f Nothing to highlight
@damarisg (Reviewer) test_logcollector/ 🟢 🚫 🚫 🚫 Linux, Solaris, macOs a56fc8f Nothing to highlight

@Deblintrake09 Deblintrake09 changed the title 3480 logcollector filter options Add logcollector ignore and restrict IT tests Nov 10, 2022
@Deblintrake09 Deblintrake09 self-assigned this Nov 10, 2022
@Deblintrake09 Deblintrake09 linked an issue Nov 10, 2022 that may be closed by this pull request
15 tasks
@Deblintrake09 Deblintrake09 marked this pull request as ready for review November 15, 2022 19:32
Copy link
Member

@damarisg damarisg left a comment

Choose a reason for hiding this comment

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

I requested some changes. Also, I would like to know what happens when we add only two ignore tags or two restrict tags in the same configuration.

Ignore tag works as OR, and restrict tag works as AND, but I didn't see any cases of this added. Was it for some reason?

Deblintrake09 pushed a commit that referenced this pull request Nov 28, 2022
Changes:
- Added ansible structure to QA's repo
- Added two new roles: `apache` and `qa_framework` roles
- `customize` flag has been added to `qa_framework` role: by setting this as true, we can customize any var within all hosts

`apache` role works on all systems but in Solaris and macOS it freezes during the Apache installation.
damarisg
damarisg previously approved these changes Dec 7, 2022
Copy link
Contributor

@jmv74211 jmv74211 left a comment

Choose a reason for hiding this comment

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

As we comment in the review call, you have to study if you can suppress some configuration templates or test use cases, for getting better performance or avoiding duplicated or unnecessary cases.

@jmv74211 jmv74211 merged commit 6886381 into master Jan 17, 2023
@jmv74211 jmv74211 deleted the 3480-logcollector-filter-options branch January 17, 2023 13:11
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.

Add logcollector filter options support
3 participants