Skip to content
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] Eliminate labels fingerprint #9785

Merged
merged 15 commits into from
Jun 27, 2024
Merged
5 changes: 5 additions & 0 deletions packages/prometheus/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.16.0"
changes:
- description: Remove labels fingerprint for TSDB purposes.
type: enhancement
link: https://github.com/elastic/integrations/pull/9785
- version: "1.15.2"
changes:
- description: Fix typo - Replace "darastream" with "datastream"
Expand Down

This file was deleted.

8 changes: 2 additions & 6 deletions packages/prometheus/data_stream/collector/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
type: group
fields:
- name: labels.*
type: object
object_type: keyword
description: |
Prometheus metric labels
- name: labels_fingerprint
type: keyword
dimension: true
description: Autogenerated ID representing the fingerprint of labels object
description: |
Prometheus metric labels
- name: prometheus.metrics.*
type: object
object_type: double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ processors:
field: "prometheus.labels.query_name"
value: "{{_ingest._key}}"
description: Add query_name as a label to cover cases, when query returns a single value with no labels
- fingerprint:
fields: ["prometheus.labels"]
target_field: "prometheus.labels_fingerprint"
ignore_missing: true
on_failure:
- set:
field: event.kind
Expand Down
8 changes: 2 additions & 6 deletions packages/prometheus/data_stream/query/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
type: group
fields:
- name: labels.*
type: object
object_type: keyword
description: |
Prometheus metric labels
- name: labels_fingerprint
type: keyword
dimension: true
description: Autogenerated ID representing the fingerprint of labels object and includes query name
description: |
Prometheus metric labels
- name: prometheus.query.*
type: object
object_type: double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ processors:
value: ["{{_ingest._key}}"]
description: Add all keys of the 'prometheus' object to the earlier created field, it includes all metric names and key "labels"
- fingerprint:
fields: ["prometheus.labels"]
gpop63 marked this conversation as resolved.
Show resolved Hide resolved
target_field: "prometheus.labels_fingerprint"
fields: ["prometheus.labels.metrics_names"]
target_field: "prometheus.metrics_names_fingerprint"
ignore_missing: true
- remove:
field: "prometheus.labels.metrics_names"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
type: group
fields:
- name: labels.*
type: object
object_type: keyword
type: keyword
dimension: true
description: |
Prometheus metric labels
- name: labels_fingerprint
- name: metrics_names_fingerprint
type: keyword
dimension: true
description: Autogenerated ID representing the fingerprint of all labels and the list of metrics names
description: Autogenerated ID representing the fingerprint of the list of metrics names
- name: metrics.*
type: object
object_type: double
Expand Down
10 changes: 4 additions & 6 deletions packages/prometheus/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ The fields reported are:
| prometheus.\*.histogram | Prometheus histogram metric | object | |
| prometheus.\*.rate | Prometheus rated counter metric | object | gauge |
| prometheus.\*.value | Prometheus gauge metric | object | gauge |
| prometheus.labels.\* | Prometheus metric labels | object | |
| prometheus.labels_fingerprint | Autogenerated ID representing the fingerprint of labels object | keyword | |
| prometheus.labels.\* | Prometheus metric labels | keyword | |
| prometheus.metrics.\* | Prometheus metric | object | gauge |
| service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword | |
| service.type | The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. | keyword | |
Expand Down Expand Up @@ -437,9 +436,9 @@ The fields reported are:
| prometheus.\*.histogram | Prometheus histogram metric | object | |
| prometheus.\*.rate | Prometheus rated counter metric | object | gauge |
| prometheus.\*.value | Prometheus gauge metric | object | gauge |
| prometheus.labels.\* | Prometheus metric labels | object | |
| prometheus.labels_fingerprint | Autogenerated ID representing the fingerprint of all labels and the list of metrics names | keyword | |
| prometheus.labels.\* | Prometheus metric labels | keyword | |
| prometheus.metrics.\* | Prometheus metric | object | gauge |
| prometheus.metrics_names_fingerprint | Autogenerated ID representing the fingerprint of the list of metrics names | keyword | |
| service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword | |
| service.type | The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. | keyword | |

Expand Down Expand Up @@ -660,8 +659,7 @@ The fields reported are:
| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | |
| host.os.version | Operating system version as a raw string. | keyword | |
| host.type | Type of host. For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment. | keyword | |
| prometheus.labels.\* | Prometheus metric labels | object | |
| prometheus.labels_fingerprint | Autogenerated ID representing the fingerprint of labels object and includes query name | keyword | |
| prometheus.labels.\* | Prometheus metric labels | keyword | |
| prometheus.query.\* | Prometheus value resulted from PromQL | object | gauge |
| service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword | |
| service.type | The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. | keyword | |
Expand Down
4 changes: 2 additions & 2 deletions packages/prometheus/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
format_version: 2.10.0
name: prometheus
title: Prometheus
version: 1.15.2
version: 1.16.0
description: Collect metrics from Prometheus servers with Elastic Agent.
type: integration
categories:
- observability
- monitoring
- containers
conditions:
kibana.version: "^8.12.1"
kibana.version: "^8.14.0"
screenshots:
- src: /img/prometheus-server-overview.png
title: Metricbeat Prometheus Overview
Expand Down