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

Metricbeat is unable to connect to AWS OpenSearch service. ERROR 401 Unauthorized #12438

Closed
nagachinni opened this issue Feb 23, 2024 · 2 comments
Labels
bug Something isn't working Other untriaged

Comments

@nagachinni
Copy link

Describe the bug

Metricbeat running on EC2 is failing with error: unable to connect to AWS OpenSearch service. ERROR 401 Unauthorized
My openSearch domain enabled fine-grain access control(FGAC) with IAM role as master user.
I have the access policy attached to EC2 IAM role already and mapped the opensearch role "all_access" so it should reach the domain endpoint. However, this is not working.

Related component

Other

To Reproduce

  1. Create AWS OpenSearch domain and enable FGAC.
  2. Create an EC2 instance and attach the IAM policy to allow access to opensearch domain created above.
"Effect": "Allow",
"Action": [
    "es:*"
 ],
 "Resource": [
     "<domainarn>"
]
  1. Update opensearch domain access policy as below.
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "*"
      },
      "Action": [
        "es:*"
      ],
      "Resource": "<domain_arn>"
    }
  ]
}
  1. Install metricbeat-oss7.12.1 on EC2 instance and configure to push metrics to opensearch domain endpoint.

You'll receive error as stated above when running metricbeat.

Expected behavior

Metricbeat should be able to push metrics to opensearch endpoint.

Additional Details

Host/Environment (please complete the following information):

  • OS: Windows
@nagachinni nagachinni added bug Something isn't working untriaged labels Feb 23, 2024
@github-actions github-actions bot added the Other label Feb 23, 2024
@wbeckler
Copy link

Metricbeat is maintained by Elastic. It looks like someone raised a similar issue for filebeat here: elastic/beats#31613. Maybe you could raise a similar issue?

@peternied
Copy link
Member

[Triage - attendees 1 2 3 4 5]
@nagachinni Thanks for creating this issue; however, it isn't being accepted due to being out of scope for this project, please reach out through support channels with your hosting provider to troubleshoot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Other untriaged
Projects
None yet
Development

No branches or pull requests

3 participants