-
Notifications
You must be signed in to change notification settings - Fork 447
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] [remote_write] Add dimention and metric_type metadata #7565
[Prometheus] [remote_write] Add dimention and metric_type metadata #7565
Conversation
Signed-off-by: Tetiana Kravchenko <[email protected]>
…ields definitions Signed-off-by: Tetiana Kravchenko <[email protected]>
… as dimension Signed-off-by: Tetiana Kravchenko <[email protected]>
@@ -8,6 +8,7 @@ | |||
- name: account.id | |||
level: extended | |||
type: keyword | |||
dimension: true |
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 think a field can be a dimension if ignore_above
is also present. Did the testing 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.
By testing
do you mean the TSDB-migration-test-kit
?
You're testing with version 8.9.0.
Testing data stream metrics-prometheus.remote_write-default.
Index being used for the documents is .ds-metrics-prometheus.remote_write-default-2023.08.28-000001.
Index being used for the settings and mappings is .ds-metrics-prometheus.remote_write-default-2023.08.28-000001.
The time series fields for the TSDB index are:
- dimension (9 fields):
- agent.id
- cloud.account.id
- cloud.availability_zone
- cloud.instance.id
- cloud.provider
- cloud.region
- container.id
- host.name
- prometheus.labels_fingerprint
the problem here is that I am running it locally, so those fields are empty, bu for other packages I believe we have the same definition of account.id
Have you seen any issue specifically with this field?
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.
Yes. It happened to me before. I tried it again just to make sure and I get the following error:
elasticsearch.BadRequestError: BadRequestError(400, 'mapper_parsing_exception', 'Failed to parse mapping: Field [ignore_above] cannot be set in conjunction with field [time_series_dimension]')
And if we think about it, what if we have two fields that are over the limit 1024, but they are the exact same thing until that limit? Maybe it is best to create a fingerprint for it?
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.
those fields cloud.account.id
and cloud.availability_zone
contains ignore_above: 1024
by default - and it is defined in the ecs repo - https://github.com/elastic/ecs/blob/8.0/experimental/generated/beats/fields.ecs.yml#L474-L489
We have already set those fields as a dimensions for other packages. Specifically for those 2 fields: they are unlikely to exceed the limit, but the limit is defined anyway, might be a prevention action
I am wondering why you see this error now. What is the stack version you use? Maybe would be better to create a dedicated issue to track it
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.
You're right.
I am testing with 8.9.0-SNAPSHOT, but I think it happened to me before when I was using 8.8.0-SNAPSHOT.
I had a look at the mapping (the data stream in question is kibana.stack_monitoring.cluster_actions
, but this is irrelevant for this problem):
"agent": {
"properties": {
"id": {
"type": "keyword",
"time_series_dimension": "true"
}
}
},
And it works fine like this. But if I mark this explicitly with ignore_above
:
"agent": {
"properties": {
"id": {
"type": "keyword",
"ignore_above": 1024,
"time_series_dimension": "true"
}
}
},
The error occurs again:
elasticsearch.BadRequestError: BadRequestError(400, 'mapper_parsing_exception', 'Failed to parse mapping: Field [ignore_above] cannot be set in conjunction with field [time_series_dimension]')
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.
@constanca-m have you created an issue for this? so we could continue discussion there? I think it is a generic issue, not prometheus package, or remote_write specific
🌐 Coverage report
|
packages/prometheus/changelog.yml
Outdated
changes: | ||
- description: Add dimension and metric_type fields to remote_write datastream | ||
type: enhancement | ||
link: https://github.com/elastic/integrations/pull/7261 |
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.
The PR link needs to be updated.
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.
Thank you for pointing it out! done - 3297b18
Package prometheus - 1.9.0 containing this change is available at https://epr.elastic.co/search?package=prometheus |
What does this PR do?
Follow up:
labels_fingerprint
incollector
andquery
datastreamsChecklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots