You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When targeting OpenSearch and setting slm_stats: true, get an error like:
401 Client Error: Unauthorized for url: https://[myopensearch].es.amazonaws.com:443/_slm/policy"
Traceback (most recent call last):
File "/opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/base/checks/base.py", line 1224, in run
self.check(instance)
File "/opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/elastic/elastic.py", line 175, in check
policy_data = self._get_data(slm_url)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/elastic/elastic.py", line 338, in _get_data
resp.raise_for_status()
File "/opt/datadog-agent/embedded/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://[myopensearch].es.amazonaws.com:443/_slm/policy
When targeting OpenSearch and setting
slm_stats: true
, get an error like:It looks like OpenSearch doesn't have the the
_slm/policy
API https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html but rather a_plugins/sm/policies
API https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/snapshots/sm-api/. It looks to me like these are logically similar, but OpenSearch doesn't provide the same stats values as Elasticsearch to provide the slm metrics.However, there is the
_snapshot/
API that both support (see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-snapshot-api.html and https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot/) that could be used to provide useful metrics, eg the number of snapshots for each index, the oldest and most recent snapshots for each index.The text was updated successfully, but these errors were encountered: