-
Notifications
You must be signed in to change notification settings - Fork 474
[Prometheus] Add dynamic mapping to fix prometheus histogram type #3891
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
[Prometheus] Add dynamic mapping to fix prometheus histogram type #3891
Conversation
🌐 Coverage report
|
- histogram: | ||
path_match: "prometheus.*.histogram" | ||
mapping: | ||
type: histogram |
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.
what is the type of this field before adding this configuration?
according to https://github.com/elastic/integrations/blob/main/packages/prometheus/data_stream/collector/fields/fields.yml#L38, it should be histogram
. I will try to reproduce it to verify, maybe there is some mistake in field definition.
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.
that doesn't work for some reason. I think it considers type: object
and not object_type: histogram
. I've tried changing type
to histogram
, but it didn't work
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.
it's actually more related to this: elastic/kibana#129344
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.
Co-authored-by: Tetiana Kravchenko <tanya.kravchenko.v@gmail.com>
As well |
created the issue - #3905 |
In trying to test prometheus histogrms today I got this error:
But the index in question already has the field as a histogram with this change in place which is strange:
I'll try nuking the datastream incase that helps. |
Delete and disabling the leader election flag seemed to get things moving. Thanks for the above info! |
What does this PR do?
This PR fixes a problem that the Prometheus package has to ingest histogram data type
I've tried different approaches but this one seems to be the only one that works.
Checklist
changelog.yml
file.How to test this PR locally
a. I've used a docker image following this doc and this example for the
prometheus.yml
config fileb. Make sure that http://localhost:9090/metrics has data
a. If using docker, run
docker run -it --rm alpine nslookup host.docker.internal
to retrieve the hostb. DISABLE the Leader Election option (it seems that we have a bug here too)
c. Clear all authentication fields
Related issues
Closes #2257
Screenshots