Prometheus Input Package
Stack Serverless Observability Serverless Security
Version | 1.0.0 (View all) |
Subscription level What's this? |
Basic |
Level of support What's this? |
Elastic |
The Prometheus Input package allows you to collect metrics from Prometheus Exporters (Collectors) and gives you the flexibility to add custom mappings and ingest pipelines.
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:
http[s]://<hostname>:<port>/<metrics_path>
This is an example of host configuration: http://localhost:9090/metrics
The parameter Use Types
(default: true
) enables a different layout for metrics storage, leveraging Elasticsearch types, including histograms.
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
.
When Use Types
and Rate Counters
are enabled, metrics are stored as follows:
{
"prometheus": {
"labels": {
"instance": "172.27.0.2:9090",
"job": "prometheus"
},
"prometheus_target_interval_length_seconds_count": {
"counter": 1,
"rate": 0
},
"prometheus_target_interval_length_seconds_sum": {
"counter": 15.000401344,
"rate": 0
},
"prometheus_tsdb_compaction_chunk_range_seconds": {
"histogram": {
"values": [50, 300, 1000, 4000, 16000],
"counts": [10, 2, 34, 7]
}
}
},
}
To filter out/in metrics, you can use the following settings:
Metrics Filters Include: ["node_filesystem_*"]
Metrics Filters Exclude: ["node_filesystem_device_*"]
The configuration above will include only metrics that match node_filesystem_*
pattern and do not match node_filesystem_device_*
.
To keep only specific metrics, anchor the start and the end of the regexp of each metric:
- the caret sign
^
matches the beginning of a text - the dollar sign
$
matches the end of a text
Metrics Filters Include: ["^node_network_net_dev_group$", "^node_network_up$"]
The certificates can be passed both as file paths and certificate content.
Example of certificate passed as file path:
verification_mode: full
certificate_authorities:
- /path/to/ca.pem
Example with the certificate content "embedded":
verification_mode: full
certificate_authorities:
- |
-----BEGIN CERTIFICATE-----
MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF
ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2
MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n
fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl
94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t
/D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDWv68ZOvG7eoWnP
PsvZStEVEimjvK5NSESEQa9xWyJOmlOKXhkdymtcUd/nXnx6UTCFgnkgzSdTWV41
CI6B6aJ9svCTI2QuoIq2HxX/ix7OvW1huVmcyHVxyUECAwEAAaNTMFEwHQYDVR0O
BBYEFPwN1OceFGm9v6ux8G+DZ3TUDYxqMB8GA1UdIwQYMBaAFPwN1OceFGm9v6ux
8G+DZ3TUDYxqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG5D
874A4YI7YUwOVsVAdbWtgp1d0zKcPRR+r2OdSbTAV5/gcS3jgBJ3i1BN34JuDVFw
3DeJSYT3nxy2Y56lLnxDeF8CUTUtVQx3CuGkRg1ouGAHpO/6OqOhwLLorEmxi7tA
H2O8mtT0poX5AnOAhzVy7QW0D/k4WaoLyckM5hUa6RtvgvLxOwA0U+VGurCDoctu
8F4QOgTAWyh8EZIwaKCliFRSynDpv3JTUwtfZkxo6K6nce1RhCWFAsMvDZL8Dgc0
yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk
sxSmbIUfc2SGJGCJD4I=
-----END CERTIFICATE-----
For the list of all supported SSL configuration options, check the Client configuration options.
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.
Changelog
Version | Details | Kibana version(s) |
---|---|---|
1.0.0 | Enhancement (View pull request) Make Prometheus input package GA |
8.13.0 or higher 9.0.0 or higher |
0.10.0 | Enhancement (View pull request) Update README to include information about SSL configuration. |
— |
0.9.1 | Enhancement (View pull request) Review the documentation for Prometheus Input Package. |
— |
0.9.0 | Enhancement (View pull request) Add SSL configuration options. |
— |
0.8.0 | Enhancement (View pull request) Add support for defining Leader Election and Conditions |
— |
0.7.1 | Bug fix (View pull request) Added description to ssl nodes in package level manifest.yml file to including links to documentation. |
— |
0.7.0 | Enhancement (View pull request) Add support for Kibana 9.0.0 . |
— |
0.6.1 | Enhancement (View pull request) Add observability category. |
— |
0.6.0 | Enhancement (View pull request) Add processor support for input data stream. |
— |
0.5.0 | Enhancement (View pull request) ECS version updated to 8.11.0. Update the kibana constraint to ^8.13.0. Modified the field definitions to remove ECS fields made redundant by the ecs@mappings component template. |
— |
0.4.0 | Enhancement (View pull request) Enable secrets for sensitive fields. For more details, refer https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-secret-values |
— |
0.3.1 | Bug fix (View pull request) Disable secrets for older stack versions due to errors. |
— |
0.3.0 | Enhancement (View pull request) Enable 'secret' for the sensitive fields, supported from 8.12. |
— |
0.2.0 | Enhancement (View pull request) Update the package format_version to 3.0.0. |
— |
0.1.4 | Bug fix (View pull request) Fix test failure by upgrading the docker image version to the latest. |
— |
0.1.3 | Enhancement (View pull request) Add system test cases |
— |
0.1.2 | Bug fix (View pull request) Fix the typos in package |
— |
0.1.1 | Bug fix (View pull request) Update the url's in README |
— |
0.1.0 | Enhancement (View pull request) Rename ownership from obs-service-integrations to obs-infraobs-integrations |
— |
0.0.2 | Enhancement (View pull request) Add base fields mappings |
— |
0.0.1 | Enhancement (View pull request) Initial draft of the Prometheus Input Package |
— |