Skip to content

[Prometheus] Revert prometheus metrics field definition to the format used before introducing metric_type #7324

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.7.0"
changes:
- description: Revert metrics field definition to the format used before introducing metric_type
type: enhancement
link: https://github.com/elastic/integrations/pull/7324
- version: "1.6.0"
changes:
- description: Add metric_type fields to collector and query datastreams for TSDB support
Expand Down
16 changes: 12 additions & 4 deletions packages/prometheus/data_stream/collector/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,32 @@
dimension: true
description: Autogenerated ID representing the fingerprint of labels object
- name: prometheus.metrics.*
type: double
type: object
object_type: double
object_type_mapping_type: "*"
metric_type: gauge
description: |
Prometheus metric
- name: prometheus.*.value
type: double
type: object
object_type: double
object_type_mapping_type: "*"
metric_type: gauge
description: >
Prometheus gauge metric

- name: prometheus.*.counter
type: double
type: object
object_type: double
object_type_mapping_type: "*"
metric_type: counter
description: >
Prometheus counter metric

- name: prometheus.*.rate
type: double
type: object
object_type: double
object_type_mapping_type: "*"
metric_type: gauge
description: >
Prometheus rated counter metric
Expand Down
4 changes: 3 additions & 1 deletion packages/prometheus/data_stream/query/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
dimension: true
description: Autogenerated ID representing the fingerprint of labels object
- name: prometheus.query.*
type: double
type: object
object_type: double
object_type_mapping_type: "*"
metric_type: gauge
description: |
Prometheus value resulted from PromQL
10 changes: 5 additions & 5 deletions packages/prometheus/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ 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.\*.counter | Prometheus counter metric | double | counter |
| prometheus.\*.counter | Prometheus counter metric | object | counter |
| prometheus.\*.histogram | Prometheus histogram metric | object | |
| prometheus.\*.rate | Prometheus rated counter metric | double | gauge |
| prometheus.\*.value | Prometheus gauge metric | double | gauge |
| prometheus.\*.rate | Prometheus rated counter metric | object | gauge |
| prometheus.\*.value | Prometheus gauge metric | object | gauge |
| prometheus.labels.\* | Prometheus metric labels | object | |
| prometheus.labels_id | Autogenerated ID representing the fingerprint of labels object | keyword | |
| prometheus.metrics.\* | Prometheus metric | double | gauge |
| 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 @@ -657,7 +657,7 @@ The fields reported are:
| 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_id | Autogenerated ID representing the fingerprint of labels object | keyword | |
| prometheus.query.\* | Prometheus value resulted from PromQL | double | gauge |
| 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
2 changes: 1 addition & 1 deletion packages/prometheus/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 1.0.0
name: prometheus
title: Prometheus
version: 1.6.0
version: 1.7.0
license: basic
description: Collect metrics from Prometheus servers with Elastic Agent.
type: integration
Expand Down