Skip to content

Commit 31d0898

Browse files
authored
Review the documentation for Prometheus Input Package (#14668)
* Review the readme * Update changelog and manifest * Integrate reviewer's comments
1 parent 2346a73 commit 31d0898

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

packages/prometheus_input/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "0.9.1"
3+
changes:
4+
- description: Review the documentation for Prometheus Input Package.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/14668
27
- version: "0.9.0"
38
changes:
49
- description: Add SSL configuration options.

packages/prometheus_input/docs/README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
# Prometheus Input Package
22

3-
This input package can collect metrics from [Prometheus Exporters (Collectors)](https://prometheus.io/docs/instrumenting/exporters/). It gives users the flexibility to add custom mappings and ingest pipelines.
3+
The Prometheus Input package allows you to collect metrics from [Prometheus Exporters (Collectors)](https://prometheus.io/docs/instrumenting/exporters/) and gives you the flexibility to add custom mappings and ingest pipelines.
44

55
## Metrics
66

7-
#### Scraping from a Prometheus exporter
7+
#### Collect metrics from a Prometheus exporter
88

9-
To scrape metrics from a Prometheus exporter, configure the `hosts` setting to it. The path
10-
to retrieve the metrics from (`/metrics` by default) is appended to the hostname as below:
9+
To collect metrics from a Prometheus exporter, configure the `hosts` setting to it and append the <metrics_path> from which you are collecting your metrics (`/metrics` by default), by using the following format:
10+
- `http[s]://<hostname>:<port>/<metrics_path>`
1111

12-
Host Configuration Format: `http[s]://<hostname>:<port>/<metrics_path>`
13-
Example Host Configuration: `http://localhost:9090/metrics`
12+
This is an example of host configuration: `http://localhost:9090/metrics`
1413

1514
#### Histograms and types
1615

17-
`Use Types` parameter (default: `true`) enables a different layout for metrics storage, leveraging Elasticsearch
18-
types, including [histograms](https://www.elastic.co/guide/en/elasticsearch/reference/current/histogram.html)
16+
The parameter `Use Types` (default: `true`) enables a different layout for metrics storage, leveraging Elasticsearch types, including [histograms](https://www.elastic.co/guide/en/elasticsearch/reference/current/histogram.html).
1917

20-
`Rate Counters` parameter (default: `true`) enables calculating a rate out of Prometheus counters. When enabled, integration stores
21-
the counter increment since the last collection. This metric provides better aggregation.
22-
This parameter can only be enabled in combination with `Use Types`.
18+
The parameter `Rate Counters` (default: `true`) allows you to calculate a rate out of Prometheus counters. When enabled, integration stores the counter increment since the last collection. This metric provides better aggregation. This parameter can only be enabled in combination with the parameter `Use Types`.
2319

24-
When `Use Types` and `Rate Counters` are enabled, metrics are stored like this:
20+
When `Use Types` and `Rate Counters` are enabled, metrics are stored as follows:
2521

2622
```json
2723
{
@@ -51,7 +47,7 @@ When `Use Types` and `Rate Counters` are enabled, metrics are stored like this:
5147

5248
#### Filtering metrics
5349

54-
In order to filter out/in metrics one can make use of `Metrics Filters Include`, `Metrics Filters Exclude` settings:
50+
To filter out/in metrics, you can use the following settings:
5551

5652
```yml
5753
Metrics Filters Include: ["node_filesystem_*"]
@@ -60,15 +56,15 @@ Metrics Filters Exclude: ["node_filesystem_device_*"]
6056
6157
The configuration above will include only metrics that match `node_filesystem_*` pattern and do not match `node_filesystem_device_*`.
6258

63-
6459
To keep only specific metrics, anchor the start and the end of the regexp of each metric:
6560

66-
- the caret ^ matches the beginning of a text
67-
- the dollar $ matches the end of a text
61+
- the caret sign `^` matches the beginning of a text
62+
- the dollar sign `$` matches the end of a text
6863

6964
```yml
7065
Metrics Filters Include: ["^node_network_net_dev_group$", "^node_network_up$"]
7166
```
7267

73-
### Datastream Dataset Name
74-
The users of the Prometheus Input Package have the option of adding their own dataset name, to which the events get added. Prometheus Metrics from different services can be collected by adding multiple instances of Input package. The metrics can be filtered on the basis of dataset name.
68+
### Datastream dataset name
69+
70+
By using the Prometheus Input Package, you can add your own dataset name, to which the events get added. You can collect Prometheus metrics from different services by adding multiple instances of the Input package. Metrics can be filtered based on the dataset name.

packages/prometheus_input/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.2"
22
name: prometheus_input
33
title: "Prometheus Input"
4-
version: "0.9.0"
4+
version: "0.9.1"
55
description: "Collects metrics from Prometheus exporter."
66
type: input
77
categories:

0 commit comments

Comments
 (0)