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 ML modules to Apache integration readme #2640

Merged
merged 4 commits into from
Mar 7, 2022
Merged

Conversation

lcawl
Copy link
Contributor

@lcawl lcawl commented Feb 3, 2022

What does this PR do?

Adds list of machine learning jobs to the Apache integration readme.

The ML module is listed as an asset when you view the integration in Kibana, for example:

image

... However there is currently no further information about what that module provides.

Ideally the information in the table could be automatically included, since it's all just strings from https://github.com/elastic/integrations/blob/main/packages/apache/kibana/ml_module/apache-Logs-ml.json

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@lcawl lcawl added the enhancement New feature or request label Feb 3, 2022
@elasticmachine
Copy link

elasticmachine commented Feb 4, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Reason: null

  • Start Time: 2022-02-04T02:36:59.905+0000

  • Duration: 21 min 53 sec

  • Commit: 873c8b1

Test stats 🧪

Test Results
Failed 0
Passed 44
Skipped 0
Total 44

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@lcawl lcawl marked this pull request as ready for review February 4, 2022 00:28
@bmorelli25
Copy link
Member

bmorelli25 commented Feb 4, 2022

Ideally the information in the table could be automatically included since it's all just strings from https://github.com/elastic/integrations/blob/main/packages/apache/kibana/ml_module/apache-Logs-ml.json

Agreed that automating this is the best approach. @mtojek what do you think about automatically adding this content to the docs for integrations that have ML jobs?

Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Change LGTM, but I'd like to know first if we need to bump up the Kibana version constraint in manifest.yml.

For example, if ML jobs are present since 7.16.3, then we have to bump up the constraint to:
kibana.version: "^7.16.3 || ^8.0.0" (follows semver rules).

@@ -32,3 +32,21 @@ generated by the `mod_status` module.
{{event "status"}}

{{fields "status"}}

## ML Modules
Copy link
Contributor

Choose a reason for hiding this comment

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

@peteharverson Do you know since which Kibana are these jobs present? We might need to bump up Kibana's constraint in this PR's manifest.

Copy link
Contributor

@peteharverson peteharverson Feb 4, 2022

Choose a reason for hiding this comment

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

@mtojek support for ML modules was added to Fleet for 7.13.0 - elastic/kibana#94950, and the package itself was updated shortly after that PR - #910. So the Kibana constraint looks ok to me.

Comment on lines +48 to +52
| visitor_rate_apache | HTTP Access Logs: Detect unusual visitor rates |
| status_code_rate_apache | HTTP Access Logs: Detect unusual status code rates |
| source_ip_url_count_apache | HTTP Access Logs: Detect unusual source IPs - high distinct count of URLs |
| source_ip_request_rate_apache | HTTP Access Logs: Detect unusual source IPs - high request rates |
| low_request_rate_apache | HTTP Access Logs: Detect low request rates |
Copy link
Contributor

Choose a reason for hiding this comment

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

@peteharverson Is there any way/list we can grab these fields or mark them in packages? This would be the first step to automate things.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mtojek the module JSON file holding the ML anomaly detection job definitions is in kibana/ml_module. The jobs property inside attributes is an array of job objects. The format used here for each job would be

job.id | job.config.description

Currently we have published ML modules for the apache and nginx packages, and there are two more packages being worked on currently - problem child - #2115, and dga - #2352.

@mtojek
Copy link
Contributor

mtojek commented Feb 4, 2022

@bmorelli25 Absolutely, but let's first figure out where are these fields defined and how we can grab them. Pinging @peteharverson.

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

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

LGTM

@lcawl lcawl requested a review from a team March 3, 2022 21:12
@lcawl lcawl merged commit 0bc0f9e into elastic:main Mar 7, 2022
@lcawl lcawl deleted the apache-jobs branch March 7, 2022 15:48
eyalkraft pushed a commit to build-security/integrations that referenced this pull request Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:apache Apache HTTP Server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants