Skip to content

Commit

Permalink
[prometheus] Eliminate labels fingerprint (#9785)
Browse files Browse the repository at this point in the history
* remove collector labels fingerprint

* remove query labels fingerprint

* remove remote_write labels fingerprint

* update docs

* bump package version

* fix PR link

* bump kibana version

* fingerprint metrics_names for remote_write

* bump minor version

* build readme

* add metrics_names_fingerprint field

* update changelog description
  • Loading branch information
gpop63 authored Jun 27, 2024
1 parent 3177699 commit 2d5a3ba
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 44 deletions.
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.17.0"
changes:
- description: Remove labels fingerprint, leading to better TSDB performance and storage reduction.
type: enhancement
link: https://github.com/elastic/integrations/pull/9785
- version: "1.16.0"
changes:
- description: Add global filter on data_stream.dataset to improve performance.
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"]
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.16.0
version: 1.17.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

0 comments on commit 2d5a3ba

Please sign in to comment.