-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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/Kibana/stats] exclude_usage=true
by default
#22654
[Metricbeat/Kibana/stats] exclude_usage=true
by default
#22654
Conversation
384ac16
to
124ecf5
Compare
124ecf5
to
e79d83a
Compare
e79d83a
to
0721f10
Compare
cc @sayden for awareness given the ongoing changes |
Pinging @elastic/stack-monitoring (Stack monitoring) |
Pinging @elastic/integrations-services (Team:Services) |
cc @chrisronline for awareness |
@sayden @ycombinator This change relates a larger initiative we are undertaking to decouple telemetry and monitoring. For Kibana, we will no longer collect and index |
Co-authored-by: Noémi Ványi <[email protected]>
Co-authored-by: Noémi Ványi <[email protected]>
…ana/stats/exclude_usage
Hey @afharo, thanks for this PR. I understand the reasons for this change and am generally ++ for it. However, I'd like to explore the possibility of not introducing a configuration setting to toggle this change. Instead, I'd like to explore if we could programmatically determine the right value for the With the change in this PR, the beats/metricbeat/module/kibana/kibana.go Lines 92 to 100 in 0d4a830
kibana/stats metricset to collect it.
|
Hey @ycombinator, Thanks for coming back to me! These are very valid points! Our intention is to ship the parallel effort in Kibana 7.11 (almost there 😅). I'd love to use your knowledge here to deep dive on this version-dependency: The way Telemetry will use the Monitoring data depends on the Monitoring cluster's version, but not the monitored production clusters. This means that:
Do you know if Metricbeat is, somehow, aware of the version of the Monitoring cluster it is sending the stats to? FYI: Telemetry will still be fine if Monitoring data contains Kibana Usage on |
Ah, thanks for clarifying the monitoring vs. monitored cluster situation here. There's no way for Metricbeat to know which monitoring cluster it's sending the data to so we can't check it's version. Given that, I think what you have in this PR is a good approach for now - we default to the current behavior but provide a flag to turn it off in a future release. One question then becomes: do we need documentation to tell users to explicitly set the setting to Alternatively, we could just turn it off completely in this PR - i.e. no setting to toggle it - but only merge it into |
In this PR I actually did the opposite: disabled by default, but a flag to turn it back on if needed. But I'm happy to flip the default value if you think it's safer.
Given that we are doing the opposite change in this PR (for now), I think we should tell our users to explicitly set
I think, ultimately, we'll complete this breaking change and remove the option flag entirely. Whether to keep collecting it until |
So, maybe the naming of the setting is confusing me :)
I think it's a bit odd to ask users to take some action in a minor version to maintain backwards compatibility. I think backwards compatibility should be expected without any extra actions by the user between minor version upgrades. So I think the default value of the setting should result in the behavior we have today (which is for the Then in |
@ycombinator sounds like a very sensible plan to me! Thank you! I'll apply those changes to this PR. |
It's unclear to me why changing the behavior of Metricbeat to exclude the usage would be a breaking change from the end-users perspective. The output of Kibana's stats endpoint is indexed into the |
That's a good distinction and clarification, @kobelb. From the POV of a maintainer of the Asking the In fact, I think we could simplify this PR even more then. Is there any reason we couldn't simply stop collecting usage data starting Metricbeat 7.11? |
AFAIK, we should be OK in that scenario. The 7.11+ (in fact, 7.2+) production Kibana instance will be reporting their
I was a bit wary of simply deleting the piece of code 😅. But if we are all happy to do so, tomorrow I'll create a new PR with the removal and we can choose which one we like best :) Thank you both @kobelb and @ycombinator for your thoughts on this! |
@ycombinator I've created #22732 superseding this one. It fully removes the |
Closing this PR in favour of #22732 |
What does this PR do?
It adds changes to the Metricbeat's
kibana
module: it adds a new configuration flagstats.exclude_usage
(defaulttrue
) that is used in the metricsetstats
in the methodshouldCollectUsage
to decide whether it should collect usage (no matter the time).The reason for this change is to disable the usage collection via the
/api/stats
endpoint but to still allow the collection of the usage via explicitly setting the flag tofalse
if necessary.Why is it important?
We are working towards decoupling Monitoring and Telemetry in Kibana. At the moment, Monitoring holds in the
.monitoring-kibana-*
indices the Kibana's Usage details only to be able to report them when sending the telemetry reports. This data is already sent to the remote telemetry cluster via Kibana'slocal
collectors, so there's no need for this duplication in the efforts. Thanks to these changes, Monitoring will only maintain in its indices the data they really need for its own features.Checklist
[ ] I have made corresponding changes to the documentationCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Setup Metricbeat with the
kibana-xpack
module enabled and notice it never asks for the/api/stats?extended&legacy&exclude_usage=false
request (the last query is alwaystrue
by default).Related issues
.monitoring
indices kibana#83521Use cases
Explained in the issue #22651
Screenshots
Logs