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 AWS module S3 bucket misinformation #22582

Closed
aschifman opened this issue Nov 13, 2020 · 13 comments · Fixed by #23045
Closed

Metricbeat AWS module S3 bucket misinformation #22582

aschifman opened this issue Nov 13, 2020 · 13 comments · Fixed by #23045
Assignees
Labels
Metricbeat Metricbeat Team:Platforms Label for the Integrations - Platforms team

Comments

@aschifman
Copy link
Contributor

When setting up Metricbeat with the AWS module, to collect S3 bucket information, there are inconsistencies and misrepresented data.

There are two issues:

  1. Not all buckets are displayed in Kibana. In our AWS lab, we have 361 buckets, yet only 60 are actually able to be displayed in the S3 Overview dashboard.

Screen shot take from AWS S3 Management Console:
aws-s3-bucket-list

Yet, these do not show in Kibana.
order-by-terms

  1. Secondly, every bucket that is displayed, show as having zero objects, but in AWS console, most all have multiple objects.

Screenshot of two bucket sizes and yet, the second screenshot highlights them not showing in Kibana:

s3-cloudwatch-objects

The buckets with Cloudwatch metrics do not show as having any objects in Kibana.
s3-overview

For confirmed bugs, please report:

  • Version: Cloud deployment running 7.9.3 with Metricbeat 7.9.2 and later upgraded to 7.10 still with same problem
  • Operating System: Mac
  • Steps to Reproduce: Standard Metricbeat setup has been seen in two different environments, one using Elastic AWS lab, and the other with AWS using their own lab systems.

My AWS counterpart experiences the following...

He has six S3 buckets, yet only two show in Kibana. All six have metrics in Cloudwatch and many objects, yet the two buckets that Kibana sees shows as zero.

Thanks

@aschifman aschifman added the Metricbeat Metricbeat label Nov 13, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 13, 2020
@aschifman aschifman added the Team:Services (Deprecated) Label for the former Integrations-Services team label Nov 13, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 13, 2020
@kaiyan-sheng kaiyan-sheng added Team:Platforms Label for the Integrations - Platforms team and removed Team:Services (Deprecated) Label for the former Integrations-Services team labels Nov 19, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@kaiyan-sheng
Copy link
Contributor

Hi @aschifman, sorry for the delay. I would like to figure out one thing first: are we missing collecting data from some specific buckets or just not displaying some of them in Kibana dashboard?

  1. In TSVB visualizations, there is a limit on how many buckets can be displayed we set in order to not fill one chart with too much data:

Screen Shot 2020-12-03 at 12 52 17 PM

  1. For the buckets showing no object, could you take a look at the specific field aws.s3_daily_storage.number_of_objects in Kibana Discover to see what actual value it's collected? My guess is, it is a bug in the visualization. If that's the case, I can create a PR to migrate these visualizations from using TSVB to lens, which should help.

@aschifman
Copy link
Contributor Author

aschifman commented Dec 4, 2020

Hey @kaiyan-sheng
There are not any buckets showing objects which is why this whole things is just odd...names appear, though some are missing.

The second screenshot above is taken after adjusting the Top setting in visualizations...trying it at 50, then to 500, but no difference.

The aws.s3_daily_storage.number_of_objects field is not available, so you are on to something...again strange because some information for S3 is making it in.

I do adjust the time filter from 15 minutes to the past one year in case that is something on the mind...I had also deleted all metricbeat index patterns, though I attempted this with a 7.9 and 7.10 deployment as well.

Discover aws metrics missing the aws.s3 fields:
2020-12-03_19-29-23

I am also attaching my aws.yml config file.
aws.yml.txt

All metrics use the same IAM role, which has the following permissions...basically full/admin on everything.

The role:
image

The policy permissions:
image

I can show you this setup if you like...let me know and thanks!

@aschifman
Copy link
Contributor Author

I have found something very interesting...I am not sure what to make of this, but this has to do with the visualizations as you were already leaning towards. It may not be a bug but a default setting behavior that should be adjusted.

If you change the Data timerange mode within the S3 Daily Storage Number of Objects [Metricbeat AWS] visualization - setting for Panel options - from the default Last value to Entire time range things show up.

image

It is then a matter of saving that change and updating the dashboard...the dashboard did not automatically update. I had to edit the dashboard object, and then edit the visualization from there...saving then shows what was missing.

image

Now I do not know if this is correct to change, but does point to something. I still do not understand, however, why there is no aws.s3 metrics to filter on within Discover.

@kaiyan-sheng
Copy link
Contributor

Thanks for looking into this! Sorry what do you mean by no aws.s3 metrics? There will only be metrics with name aws. s3_daily_storage.* and aws.s3_request.* because there is no metricset name s3.

@aschifman
Copy link
Contributor Author

I mean there is no aws.s3* anything...If you see the screenshot I took above, you can see the metrics go from aws.natgateway.* to aws.tags.*.

@kaiyan-sheng
Copy link
Contributor

Gotcha! Thanks! What's the time range did you set for checking metrics? aws. s3_daily_storage.* reports only once per day so maybe try to change the time range in Kibana Discover to 1 day :)

@aschifman
Copy link
Contributor Author

@kaiyan-sheng I set it at different levels...15 minutes all the way to over a year...no difference, though when I did go out a year, things like RDS metrics then showed up.

@kaiyan-sheng
Copy link
Contributor

hmm sorry let me make sure I understand this correctly. So there is no metrics from s3_daily_storage.* or aws.s3_request.* at all?

@aschifman
Copy link
Contributor Author

aschifman commented Dec 5, 2020 via email

@kaiyan-sheng
Copy link
Contributor

Let me just put some notes here for what @aschifman and I talked about offline:

  1. s3_daily_storage metricset collects metrics from AWS CloudWatch so if there are data missing in CloudWatch, s3_daily_storage will not be able to get them.
  2. Filter created by Controls visualization seems to have a hard limit on how many values can be displayed on the drop down menu (10 is the value we see). We are waiting on confirmation from Kibana team to figure out what to do here.

Screen Shot 2020-12-08 at 2 57 51 PM

3. I do believe we should migrate this dashboard to use lens at some point.

@kaiyan-sheng
Copy link
Contributor

@aschifman Reponse from kibana team about the s3 bucket names in the drop down menu:

This depends on the "dynamic options" setting. if you're having it on we'll load the top 10 and when the user types we'll refine the search results. If dynamic options is off, we're not reloading more data when the user types, therefore you'll get a size control where you can say how many entries should be loaded.

I tested it with Dynamic Options off and it does show all s3 bucket names. But it requires a hardcoded Size value:
Screen Shot 2020-12-09 at 7 50 38 AM

The problem is we have no idea what this hard code size value should be when creating the visualization and it varies in different AWS environments too. So my suggestion is to keep the Dynamic Options on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Metricbeat Metricbeat Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants