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

Improve Health Status of security-auditlog Index in Single Node Clusters #5030

Conversation

Ganesh-RB
Copy link
Contributor

@Ganesh-RB Ganesh-RB commented Jan 15, 2025

Description

Bug Fix: Improve Health Status of security-auditlog Index in Single Node Clusters

This pull request addresses an issue where the security-auditlog index was showing a yellow health status in single node clusters. The problem was caused by the use of indexrequest default settings, which were not optimal for single node environments.

Changes:

  • Modified the replica settings for the security-auditlog index to:
    {
      "index.number_of_shards": 1,
      "index.auto_expand_replicas": "0-1"
    }
    
    

Issues Resolved

Testing

  • Created a single node cluster and verified that the security-auditlog index health changed from yellow to green.
  • Confirmed that the new settings do not negatively impact multi-node clusters.

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • 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.

@Ganesh-RB Ganesh-RB force-pushed the auditlog_index_health_single_node_case branch from 7d60d06 to 0bceb07 Compare January 23, 2025 19:32
@cwperks cwperks added the backport 2.x backport to 2.x branch label Feb 3, 2025
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 71.49%. Comparing base (1924e41) to head (e7bf71e).
Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
.../auditlog/sink/AbstractInternalOpenSearchSink.java 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5030      +/-   ##
==========================================
- Coverage   71.50%   71.49%   -0.01%     
==========================================
  Files         336      336              
  Lines       22625    22643      +18     
  Branches     3598     3602       +4     
==========================================
+ Hits        16178    16189      +11     
- Misses       4648     4651       +3     
- Partials     1799     1803       +4     
Files with missing lines Coverage Δ
...pensearch/security/auditlog/impl/AuditLogImpl.java 89.28% <100.00%> (ø)
.../security/auditlog/routing/AuditMessageRouter.java 81.60% <ø> (ø)
...uditlog/sink/InternalOpenSearchDataStreamSink.java 84.00% <100.00%> (+0.32%) ⬆️
...security/auditlog/sink/InternalOpenSearchSink.java 100.00% <100.00%> (ø)
...pensearch/security/auditlog/sink/SinkProvider.java 83.51% <100.00%> (+0.37%) ⬆️
.../auditlog/sink/AbstractInternalOpenSearchSink.java 70.96% <50.00%> (-5.04%) ⬇️

... and 23 files with indirect coverage changes

@cwperks cwperks merged commit dbfecca into opensearch-project:main Feb 4, 2025
42 of 43 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 4, 2025
…ers (#5030)

Signed-off-by: Ganesh Bombatkar <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Co-authored-by: Ganesh Bombatkar <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
(cherry picked from commit dbfecca)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants