-
Notifications
You must be signed in to change notification settings - Fork 94
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
Link profiles to indexers #611
Conversation
450edb0
to
816eade
Compare
So I like being able to specify different metrics profiles for each indexer, so that then we can push report mode to elastic and capture the timeseries locally, for metrics profile metrics. |
Yeah, that number points to the indexer to be used. The reason not to use 0 was that 0 is the "null" value of an integer variable, so in case of not specifying |
67ad91a
to
9822ac4
Compare
Except for the build and test failures, overall idea looks good to me. |
Instead of numbering here, can we have a name filed in each |
Few more thoughts to add on top of it.
|
They are not, the idea of this PR is to link metricsProfiles to indexers so we can restrict what we send to each indexer, if not working like this there must be a bug |
Update, I've updated the code to use indexer aliases rather than integers pointing to an indexer |
c33c96d
to
e4cd82f
Compare
if scraperConfig.MetricsEndpoint != "" { | ||
scraperConfig.ConfigSpec.MetricsEndpoints = DecodeMetricsEndpoint(scraperConfig.MetricsEndpoint) | ||
} | ||
for pos, metricsEndpoint := range scraperConfig.ConfigSpec.MetricsEndpoints { |
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 loop indexing metrics.yaml
in all the given list of indexers?
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 don't follow you... what do you mean?
pkg/measurements/factory.go
Outdated
globalCfg = configSpec.GlobalConfig | ||
factory = measurementFactory{ | ||
createFuncs: make(map[string]measurement), | ||
metadata: metadata, | ||
} | ||
for _, measurement := range globalCfg.Measurements { | ||
indexerFound = false | ||
if measurement.QuantilesIndexer != "" { |
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.
Can you refactor this if-block
? Looks like common logic being used for both the indexers.
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.
updated and optimized this logic, PTAL
dfe0d8c
to
0810041
Compare
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
0810041
to
03c23a4
Compare
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
…y are not necessary Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
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.
lgtm
## Type of change - [ ] Refactor - [ ] New feature - [x] Bug fix - [ ] Optimization - [ ] Documentation Update ## Description #611 added `metricsEndpoints`. Update examples to fix the error. ``` level=fatal msg="Config error: error decoding configuration file: yaml: unmarshal errors:\n line 2: field indexers not found in type config.Spec" file="kube-burner.go:97" ``` ## Related Tickets & Documents - Related Issue # - Closes # Signed-off-by: Shuaiyi Zhang <zhang_syi@qq.com>
## Type of change - [ ] Refactor - [ ] New feature - [x] Bug fix - [ ] Optimization - [ ] Documentation Update ## Description My mistake, kube-burner-ocp doesn't work well with the latest changes pushed in #611 ## Related Tickets & Documents - Related Issue # - Closes # Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Type of change
Description
Multiple changes with the goal to adopt the updated version the
metricsEndpoints
API in the configuration file and link metrics, alerts (supporting multiple files now) and measurements to indexers:With this change the configuration file now looks like:
Another important feature is that now It's possible to "split" the measurement metrics and send them to different indexers thanks to the new fields timeseriesIndexer and quantilesIndexer. i.e:
With the snippet above, the measurement
podLatency
would use the local indexer for timeseries metrics and opensearch for the quantile metrics. cc: @afcollinsRelated Tickets & Documents