-
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
[Stack Monitoring] support custom ccs remote prefixes #129806
Conversation
* @return {String} The index pattern with the {@code cluster} prefix appropriately prepended. | ||
*/ | ||
export function prefixIndexPattern(config: MonitoringConfig, indexPattern: string, ccs?: string) { | ||
const ccsEnabled = getConfigCcs(config); | ||
export function prefixIndexPatternWithCcs( |
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.
I changed the name to have "WithCcs" because previously this function also handled appending metricbeat-*
. Now it only does CCS so want to clarify that.
08f1cb1
to
834da9e
Compare
@@ -114,6 +148,12 @@ export function createConfig(config: MonitoringConfigSchema): MonitoringConfig { | |||
...config, | |||
ui: { | |||
...config.ui, | |||
ccs: { | |||
...config.ui.ccs, | |||
remotePatterns: Array.isArray(config.ui.ccs.remotePatterns) |
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 user specifies a string value put it in an array we only have to work with array type.
@jasonrhodes @ravikesarwani This PR is about ready, but @jportner mentioned we should consider putting this in Kibana Advanced Settings UI instead of in the yaml config. Given the impact putting in a non existent remote could have on alerts and viewing the SM UI, what do you think? We'd also be able to have it by space if that's something we possibly see implementing in the future. |
Just to be clear, everything in Advanced Settings is space-isolated by design. In other words, if you change an Advanced Setting in one space, it only affects that space, there's no additional dev effort to make that happen 👍 |
Was trying to understand the context:
|
…n rule filter query
834da9e
to
58f3f3a
Compare
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @neptunian |
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.
Just pointing to this note here #120384 (comment)
@neptunian and I decided we'll rework this to read the value from a constant for now instead of from a new config flag. That will maintain all of the consolidation work done here without introducing a flag we have to support for a long time, so that we can wait a bit longer to decide on whether we want this flag or not.
Closing in place of #130466 for now |
Resolves #120384
Adds the ability for the user to specify a remote prefix instead of searching cross cluster with the default "*" query which gets all available remotes.
prefixIndexPattern
toprefixIndexPatternWithCcs
monitoring.ui.ccs.remotePatterns
in order to use the KQL filter in the rulesChanges in behavior when using the monitoring.ui.ccs.remotePatterns and not using
*
monitoring.ui.ccs.enabled
istrue
(default), a cross cluster search will only look for remotes inmonitoring.ui.ccs.remotePatterns
instead of all available.Error: security_exception: [no_such_remote_cluster_exception] Reason: no such remote cluster: [idontexist], caused by: "no such remote cluster: [idontexist]"
). Previously we used*
and before that fetchAvailableCcs when CCS was enabled so we did not have this issue, but that created a problem when there were too many remotes.Test
myremote
andmyremote2
. Usingmonitoring.ui.ccs.remotePatterns
I was able to "filter" out my remotes by adding"myremote"
or["myremote"]
and only that remote showed up in the cluster listing. When i added the 2nd remote["myremote", "myremote2"]
, both of them showed up in the cluster listing. When I setmonitoring.ui.ccs.enabled: false
, neither showed up.