-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Monitoring] Add flag to enable/disable CCR monitoring UI #28840
[Monitoring] Add flag to enable/disable CCR monitoring UI #28840
Conversation
Pinging @elastic/stack-monitoring |
I'm not sure we need another flag on the Kibana side here. Cloud is disabling CCR in ES already via the |
💚 Build Succeeded |
@ycombinator Will do. I tried to mess with that setting in my elasticsearch.yml, but there are errors at startup that will be fixed by elastic/elasticsearch#37432 |
I have CCR enabled in ES (default settings, didn't change anything), and I see this weird behavior in the UI: Specifically:
|
I think for 1 we have to either accept this delay (in the current code architecture, which is also related to #28245) in cloud or in the standalone kibana. If we accept the delay on cloud, the CCR link will appear for a brief second, then disappear. I think the current code and UX is the better of the two so I'm inclined to leave as is. |
💔 Build Failed |
💔 Build Failed |
@ycombinator Did some refactoring in 76add94 to correct the UX issue. Thanks for pointing that out! |
The janky UX issues I found earlier have gone away now. 👍 However, I'm now running into elastic/elasticsearch#37432 when trying to test this PR with setting |
💔 Build Failed |
} | ||
|
||
export async function checkCcrEnabled(req) { | ||
const { callWithRequest } = req.server.plugins.elasticsearch.getCluster('monitoring'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the right cluster to check against? Or is it admin
? @pickypg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah crap, of course! We can't just call this API against the production or monitoring clusters 🤦♂️. What we need is to know via monitoring data if CCR is enabled or disabled on a particular production cluster. I'm not sure we have the data on whether CCR is enabled or not in .monitoring-es-*
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will automatically start collecting this information in cluster_stats
documents under the stack_stats.xpack.ccr.*
field once elastic/elasticsearch#37256 is merged. Until then we can update the code in this PR to look at this field to make the determination whether to show the CCR tab or not.
💚 Build Succeeded |
@@ -83,6 +83,7 @@ uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config) => { | |||
config.watch('k7design', (val) => scope.showPluginBreadcrumbs = !val); | |||
|
|||
function getSetupObj() { | |||
console.log(attributes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to leave this in? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all! Thanks!
💚 Build Succeeded |
💔 Build Failed |
💚 Build Succeeded |
@chrisronline This looks like it's ready to go for 6.7 :) |
Unfortunately, not yet. I need to test the code changes I made in response to @ycombinator's comment: #28840 (comment). Should be ready soon |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
💚 Build Succeeded |
Backport: |
Resolves https://github.com/elastic/stack-monitoring/issues/21
This PR simply adds a config
xpack.monitoring.ui.ccr.enabled
that, when set tofalse
, will not show theCCR
tab under the Elasticsearch area of the Monitoring UI.