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 rollover & archival mechanism for correlation history indices #670

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

sbcd90
Copy link
Collaborator

@sbcd90 sbcd90 commented Oct 17, 2023

Description

add rollover & archival mechanism for correlation history indices.

improves scoring mechanism of correlated findings.
The scoring mechanism is dependent on the euclidean distance between 2 vectors. Earlier our vectors were dependent on log types so the dimension of these vectors were set to 100. & vectors grew in size as new log types were added.
But we eliminated it now & fixed dimension of vector to 3 which not only prevents vectors from becoming sparse but also improves correlation scores.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #670 (a220021) into main (0dd9787) will decrease coverage by 0.37%.
The diff coverage is 1.90%.

@@             Coverage Diff              @@
##               main     #670      +/-   ##
============================================
- Coverage     25.18%   24.81%   -0.37%     
  Complexity     1021     1021              
============================================
  Files           275      275              
  Lines         12458    12670     +212     
  Branches       1361     1390      +29     
============================================
+ Hits           3137     3144       +7     
- Misses         9053     9258     +205     
  Partials        268      268              
Files Coverage Δ
...rch/securityanalytics/SecurityAnalyticsPlugin.java 4.65% <ø> (ø)
...yanalytics/settings/SecurityAnalyticsSettings.java 97.29% <100.00%> (+0.42%) ⬆️
...transport/TransportIndexCorrelationRuleAction.java 0.00% <ø> (ø)
...s/transport/TransportIndexCustomLogTypeAction.java 0.00% <ø> (ø)
...lytics/transport/TransportIndexDetectorAction.java 0.00% <ø> (ø)
...yanalytics/transport/TransportIndexRuleAction.java 0.00% <ø> (ø)
...opensearch/securityanalytics/util/RuleIndices.java 0.00% <ø> (ø)
...tics/transport/TransportListCorrelationAction.java 0.00% <0.00%> (ø)
...cs/transport/TransportSearchCorrelationAction.java 0.00% <0.00%> (ø)
.../opensearch/securityanalytics/util/IndexUtils.java 34.40% <12.50%> (-3.10%) ⬇️
... and 4 more

@sbcd90 sbcd90 force-pushed the rollover_corr branch 2 times, most recently from 259808f to b38df52 Compare October 17, 2023 08:21
import static org.opensearch.securityanalytics.settings.SecurityAnalyticsSettings.FINDING_HISTORY_MAX_DOCS;
import static org.opensearch.securityanalytics.settings.SecurityAnalyticsSettings.FINDING_HISTORY_RETENTION_PERIOD;
import static org.opensearch.securityanalytics.settings.SecurityAnalyticsSettings.FINDING_HISTORY_ROLLOVER_PERIOD;
import static org.opensearch.securityanalytics.settings.SecurityAnalyticsSettings.*;
Copy link
Member

Choose a reason for hiding this comment

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

can we revert wildcard import

amsiglan
amsiglan previously approved these changes Oct 25, 2023
@sbcd90 sbcd90 dismissed stale reviews from amsiglan and praveensameneni via 586c109 October 30, 2023 01:44
eirsep
eirsep previously approved these changes Oct 30, 2023
@eirsep
Copy link
Member

eirsep commented Oct 30, 2023

is this failure flaky from before or was this failing from this change?

Tests with failures:
 - org.opensearch.securityanalytics.findings.FindingIT.testGetFindings_rolloverByMaxAge_success

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
@sbcd90 sbcd90 merged commit 24e94b4 into opensearch-project:main Oct 31, 2023
13 of 17 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
(cherry picked from commit 24e94b4)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
(cherry picked from commit 24e94b4)
sbcd90 pushed a commit that referenced this pull request Oct 31, 2023
…) (#707)

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
sbcd90 pushed a commit that referenced this pull request Oct 31, 2023
…) (#706)

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Mar 25, 2024
…ect#670) (opensearch-project#691)

Signed-off-by: Petar Partlov <partlov@gmail.com>

Signed-off-by: Petar Partlov <partlov@gmail.com>
(cherry picked from commit 9d9f588426b6df8a4a084866f65532baef9268e3)

Co-authored-by: Petar Partlov <partlov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants