Skip to content

[FEATURE] Integrate remote metadata SDK client with alerting plugin (#2046)#2047

Merged
toepkerd merged 2 commits intoopensearch-project:mainfrom
MohammedAghil:feat/remote-metadata-sdk-setup
Mar 23, 2026
Merged

[FEATURE] Integrate remote metadata SDK client with alerting plugin (#2046)#2047
toepkerd merged 2 commits intoopensearch-project:mainfrom
MohammedAghil:feat/remote-metadata-sdk-setup

Conversation

@MohammedAghil
Copy link
Contributor

  • Add opensearch-remote-metadata-sdk dependency
  • Add multi_tenancy_enabled and remote metadata settings
  • Create SdkClient in createComponents and return as component
  • Register all new settings
  • Add unit tests for settings registration and defaults

Description

This integrates the remote metadata SDK client with the alerting plugin, enabling support for remote metadata stores as an alternative to local OpenSearch indices for storing plugin metadata.

A new plugins.alerting.multi_tenancy_enabled boolean setting is added to control the TENANT_AWARE_KEY passed to the SDK client. Four additional settings (remote_metadata_type, remote_metadata_endpoint,
remote_metadata_region, remote_metadata_service_name) configure the remote metadata backend. All settings are registered in getSettings() and the SdkClient is created in createComponents() and returned as a plugin
component.

When multi_tenancy_enabled is false (default), the SDK client operates as a passthrough to the local OpenSearch client with no behavior change. When enabled, the SDK client routes metadata operations to the configured remote store.

Related Issues

Resolves #2046

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

…search-project#2046)

- Add opensearch-remote-metadata-sdk dependency
- Add multi_tenancy_enabled and remote metadata settings
- Create SdkClient in createComponents and return as component
- Register all new settings
- Add unit tests for settings registration and defaults

Signed-off-by: Mohammed Aghil Puthiyottil <57040494+MohammedAghil@users.noreply.github.com>
@toepkerd toepkerd merged commit 7fae816 into opensearch-project:main Mar 23, 2026
19 of 20 checks passed
)

val MULTI_TENANCY_ENABLED: Setting<Boolean> = Setting.boolSetting(
"$REMOTE_METADATA_KEY_PREFIX.multi_tenancy_enabled",
Copy link
Member

Choose a reason for hiding this comment

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

why is multi_tenancy_enabled not common variable coming from remote metadata sdk?

why is the setting itself different on each plugin? shouldn't all plugins have a single settingname?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a common pattern followed in other plugins too. ml-commons, one of the first plugin to adopt the remote metadata sdk used similar pattern : https://github.com/opensearch-project/ml-commons/blob/82da99868a0074374fa7274ceaa8d0ca291e736e/plugin/src/main/java/org/opensearch/ml/settings/MLCommonsSettings.java#L317-L335.

)

val REMOTE_METADATA_SERVICE_NAME: Setting<String?> = Setting.simpleString(
"$REMOTE_METADATA_KEY_PREFIX.$REMOTE_METADATA_SERVICE_NAME_KEY",
Copy link
Member

Choose a reason for hiding this comment

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

why is there no default value for this for opensearch clusters for all these settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These settings defaults to an empty string. When the values are empty, the sdk client falls back to the local OpenSearch cluster client — so the default behavior is unchanged for standard open search clusters. The settings only need explicit values when configuring a remote metadata store.

Setting.Property.Final
)

val REMOTE_METADATA_REGION: Setting<String?> = Setting.simpleString(
Copy link
Member

Choose a reason for hiding this comment

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

can this be null for opensearch cluster deployment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is only needed if we are setting a remote metadata store.

)

val REMOTE_METADATA_ENDPOINT: Setting<String?> = Setting.simpleString(
"$REMOTE_METADATA_KEY_PREFIX.$REMOTE_METADATA_ENDPOINT_KEY",
Copy link
Member

Choose a reason for hiding this comment

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

can this be null for opensearch cluster deployment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it will by default use the system indices client provided in https://github.com/opensearch-project/alerting/pull/2047/changes#diff-e3fd9aa75de7c973b2c9e6938d97987c46f11356fdba50ee1557462e63de9e61R341 which is the existing behaviour

Setting.Property.Dynamic
)

val MULTI_TENANCY_ENABLED: Setting<Boolean> = Setting.boolSetting(
Copy link
Member

Choose a reason for hiding this comment

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

can this be changed via _cluster/settings API?
if yes, that doesn't seem desirable to me..
this should be only changeable via static XML.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it cannot be changed at runtime. The setting uses Setting.Property.Final which makes it immutable after node startup — it can only be set in opensearch.yml

manaswini1920 pushed a commit to manaswini1920/alerting that referenced this pull request Mar 25, 2026
@manaswini1920 manaswini1920 mentioned this pull request Mar 25, 2026
1 task
manaswini1920 pushed a commit to manaswini1920/alerting that referenced this pull request Mar 25, 2026
…in (opensearch-project#2046) (opensearch-project#2047)"

This reverts commit 7fae816.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
manaswini1920 pushed a commit to manaswini1920/alerting that referenced this pull request Mar 25, 2026
…in (opensearch-project#2046) (opensearch-project#2047)"

This reverts commit 7fae816.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
manaswini1920 pushed a commit to manaswini1920/alerting that referenced this pull request Mar 25, 2026
…in (opensearch-project#2046) (opensearch-project#2047)"

This reverts commit 7fae816.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
AWSHurneyt pushed a commit that referenced this pull request Mar 25, 2026
* Revert "Inject SdkClient into transport actions for SDK persistence support (#2052)"

This reverts commit 551e26e.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>

* Revert "feat: Integrate remote metadata SDK client with alerting plugin (#2046) (#2047)"

This reverts commit 7fae816.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>

---------

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
Co-authored-by: Manaswini Ragamouni <ragamanu@amazon.com>
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.

[FEATURE] Add Support for multiple remote metadata stores

4 participants