diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 4d254fe0a89..6c69ceee264 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -275,6 +275,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add metricsets based on Ceph Manager Daemon to the `ceph` module. {issue}7723[7723] {pull}16254[16254] - Add Load Balancing metricset to GCP {pull}15559[15559] - Release `statsd` module as GA. {pull}16447[16447] {issue}14280[14280] +- Add OpenMetrics Metricbeat module {pull}16596[16596] - Add `redisenterprise` module. {pull}16482[16482] {issue}15269[15269] - Add `cloudfoundry` module to send events from Cloud Foundry. {pull}16671[16671] diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index e4cabfcb168..3b3136afd15 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -60,6 +60,7 @@ grouped in the following categories: * <> * <> * <> +* <> * <> * <> * <> @@ -29048,6 +29049,40 @@ type: long -- +[[exported-fields-openmetrics]] +== Openmetrics fields + +Openmetrics module + + + +[float] +=== openmetrics + +`openmetrics` contains metrics from endpoints that are following Openmetrics format. + + + +*`openmetrics.labels.*`*:: ++ +-- +Prometheus metric labels + + +type: object + +-- + +*`openmetrics.metrics.*`*:: ++ +-- +Prometheus metric + + +type: object + +-- + [[exported-fields-oracle]] == Oracle fields diff --git a/metricbeat/docs/modules/openmetrics.asciidoc b/metricbeat/docs/modules/openmetrics.asciidoc new file mode 100644 index 00000000000..4ef66ff3746 --- /dev/null +++ b/metricbeat/docs/modules/openmetrics.asciidoc @@ -0,0 +1,67 @@ +//// +This file is generated! See scripts/mage/docs_collector.go +//// + +[[metricbeat-module-openmetrics]] +[role="xpack"] +== Openmetrics module + +beta[] + +This module periodically fetches metrics from endpoints following https://openmetrics.io/[Openmetrics] format. + +[float] +=== Filtering metrics + +In order to filter out/in metrics one can make use of `metrics_filters.include` `metrics_filters.exclude` settings: + +[source,yaml] +------------------------------------------------------------------------------------- +- module: openmetrics + metricsets: ['collector'] + period: 10s + hosts: ["localhost:9090"] + metrics_path: /metrics + metrics_filters: + include: ["node_filesystem_*"] + exclude: ["node_filesystem_device_*", "^node_filesystem_readonly$"] +------------------------------------------------------------------------------------- + +The configuration above will include only metrics that match `node_filesystem_*` pattern and do not match `node_filesystem_device_*` +and are not `node_filesystem_readonly` metric. + + +[float] +=== Example configuration + +The Openmetrics module supports the standard configuration options that are described +in <>. Here is an example configuration: + +[source,yaml] +---- +metricbeat.modules: +- module: openmetrics + metricsets: ['collector'] + period: 10s + hosts: ['localhost:9090'] + + # This module uses the Prometheus collector metricset, all + # the options for this metricset are also available here. + metrics_path: /metrics + metrics_filters: + include: [] + exclude: [] +---- + +This module supports TLS connections when using `ssl` config field, as described in <>. +It also supports the options described in <>. + +[float] +=== Metricsets + +The following metricsets are available: + +* <> + +include::openmetrics/collector.asciidoc[] + diff --git a/metricbeat/docs/modules/openmetrics/collector.asciidoc b/metricbeat/docs/modules/openmetrics/collector.asciidoc new file mode 100644 index 00000000000..fd5026ff378 --- /dev/null +++ b/metricbeat/docs/modules/openmetrics/collector.asciidoc @@ -0,0 +1,23 @@ +//// +This file is generated! See scripts/mage/docs_collector.go +//// + +[[metricbeat-metricset-openmetrics-collector]] +=== Openmetrics collector metricset + +beta[] + +include::../../../../x-pack/metricbeat/module/openmetrics/collector/_meta/docs.asciidoc[] + + +==== Fields + +For a description of each field in the metricset, see the +<> section. + +Here is an example document generated by this metricset: + +[source,json] +---- +include::../../../../x-pack/metricbeat/module/openmetrics/collector/_meta/data.json[] +---- diff --git a/metricbeat/docs/modules_list.asciidoc b/metricbeat/docs/modules_list.asciidoc index 4be53b0b1d8..2a15e54e52f 100644 --- a/metricbeat/docs/modules_list.asciidoc +++ b/metricbeat/docs/modules_list.asciidoc @@ -190,6 +190,8 @@ This file is generated! See scripts/mage/docs_collector.go |<> |<> |image:./images/icon-yes.png[Prebuilt dashboards are available] | .1+| .1+| |<> +|<> beta[] |image:./images/icon-no.png[No prebuilt dashboards] | +.1+| .1+| |<> beta[] |<> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] | .2+| .2+| |<> beta[] |<> beta[] @@ -305,6 +307,7 @@ include::modules/munin.asciidoc[] include::modules/mysql.asciidoc[] include::modules/nats.asciidoc[] include::modules/nginx.asciidoc[] +include::modules/openmetrics.asciidoc[] include::modules/oracle.asciidoc[] include::modules/php_fpm.asciidoc[] include::modules/postgresql.asciidoc[] diff --git a/metricbeat/module/prometheus/collector/collector.go b/metricbeat/module/prometheus/collector/collector.go index 3a4ab55be3f..fa78f64294d 100644 --- a/metricbeat/module/prometheus/collector/collector.go +++ b/metricbeat/module/prometheus/collector/collector.go @@ -43,7 +43,7 @@ var ( ) func init() { - mb.Registry.MustAddMetricSet("prometheus", "collector", New, + mb.Registry.MustAddMetricSet("prometheus", "collector", MetricSetBuilder("prometheus"), mb.WithHostParser(hostParser), mb.DefaultMetricSet(), ) @@ -55,45 +55,48 @@ type MetricSet struct { prometheus p.Prometheus includeMetrics []*regexp.Regexp excludeMetrics []*regexp.Regexp + namespace string } -// New creates a new metricset -func New(base mb.BaseMetricSet) (mb.MetricSet, error) { - config := defaultConfig - if err := base.Module().UnpackConfig(&config); err != nil { - return nil, err - } - prometheus, err := p.NewPrometheusClient(base) - if err != nil { - return nil, err - } +// MetricSetBuilder returns a builder function for a new Prometheus metricset using the given namespace +func MetricSetBuilder(namespace string) func(base mb.BaseMetricSet) (mb.MetricSet, error) { + return func(base mb.BaseMetricSet) (mb.MetricSet, error) { + config := defaultConfig + if err := base.Module().UnpackConfig(&config); err != nil { + return nil, err + } + prometheus, err := p.NewPrometheusClient(base) + if err != nil { + return nil, err + } - ms := &MetricSet{ - BaseMetricSet: base, - prometheus: prometheus, - } - ms.excludeMetrics, err = compilePatternList(config.MetricsFilters.ExcludeMetrics) - if err != nil { - return nil, errors.Wrapf(err, "unable to compile exclude patterns") - } - ms.includeMetrics, err = compilePatternList(config.MetricsFilters.IncludeMetrics) - if err != nil { - return nil, errors.Wrapf(err, "unable to compile include patterns") - } + ms := &MetricSet{ + BaseMetricSet: base, + prometheus: prometheus, + namespace: namespace, + } + ms.excludeMetrics, err = compilePatternList(config.MetricsFilters.ExcludeMetrics) + if err != nil { + return nil, errors.Wrapf(err, "unable to compile exclude patterns") + } + ms.includeMetrics, err = compilePatternList(config.MetricsFilters.IncludeMetrics) + if err != nil { + return nil, errors.Wrapf(err, "unable to compile include patterns") + } - return ms, nil + return ms, nil + } } // Fetch fetches data and reports it func (m *MetricSet) Fetch(reporter mb.ReporterV2) error { families, err := m.prometheus.GetFamilies() - eventList := map[string]common.MapStr{} if err != nil { m.addUpEvent(eventList, 0) for _, evt := range eventList { reporter.Event(mb.Event{ - RootFields: common.MapStr{"prometheus": evt}, + RootFields: common.MapStr{m.namespace: evt}, }) } return errors.Wrap(err, "unable to decode response from prometheus endpoint") @@ -137,7 +140,7 @@ func (m *MetricSet) Fetch(reporter mb.ReporterV2) error { // Converts hash list to slice for _, e := range eventList { isOpen := reporter.Event(mb.Event{ - RootFields: common.MapStr{"prometheus": e}, + RootFields: common.MapStr{m.namespace: e}, }) if !isOpen { break diff --git a/x-pack/metricbeat/include/list.go b/x-pack/metricbeat/include/list.go index 61280c1b5ae..d935001f0c5 100644 --- a/x-pack/metricbeat/include/list.go +++ b/x-pack/metricbeat/include/list.go @@ -42,6 +42,8 @@ import ( _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/mssql" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/mssql/performance" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/mssql/transaction_log" + _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/openmetrics" + _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/openmetrics/collector" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/oracle" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/oracle/performance" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/oracle/tablespace" diff --git a/x-pack/metricbeat/metricbeat.reference.yml b/x-pack/metricbeat/metricbeat.reference.yml index a35a1489f7b..8d8e2b57281 100644 --- a/x-pack/metricbeat/metricbeat.reference.yml +++ b/x-pack/metricbeat/metricbeat.reference.yml @@ -919,6 +919,19 @@ metricbeat.modules: # Path to server status. Default nginx_status server_status_path: "nginx_status" +#----------------------------- Openmetrics Module ----------------------------- +- module: openmetrics + metricsets: ['collector'] + period: 10s + hosts: ['localhost:9090'] + + # This module uses the Prometheus collector metricset, all + # the options for this metricset are also available here. + metrics_path: /metrics + metrics_filters: + include: [] + exclude: [] + #-------------------------------- Oracle Module -------------------------------- - module: oracle metricsets: ["tablespace", "performance"] diff --git a/x-pack/metricbeat/module/openmetrics/_meta/config.yml b/x-pack/metricbeat/module/openmetrics/_meta/config.yml new file mode 100644 index 00000000000..26417671cd1 --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/_meta/config.yml @@ -0,0 +1,11 @@ +- module: openmetrics + metricsets: ['collector'] + period: 10s + hosts: ['localhost:9090'] + + # This module uses the Prometheus collector metricset, all + # the options for this metricset are also available here. + metrics_path: /metrics + metrics_filters: + include: [] + exclude: [] diff --git a/x-pack/metricbeat/module/openmetrics/_meta/docs.asciidoc b/x-pack/metricbeat/module/openmetrics/_meta/docs.asciidoc new file mode 100644 index 00000000000..9d6e9ca8572 --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/_meta/docs.asciidoc @@ -0,0 +1,21 @@ +This module periodically fetches metrics from endpoints following https://openmetrics.io/[Openmetrics] format. + +[float] +=== Filtering metrics + +In order to filter out/in metrics one can make use of `metrics_filters.include` `metrics_filters.exclude` settings: + +[source,yaml] +------------------------------------------------------------------------------------- +- module: openmetrics + metricsets: ['collector'] + period: 10s + hosts: ["localhost:9090"] + metrics_path: /metrics + metrics_filters: + include: ["node_filesystem_*"] + exclude: ["node_filesystem_device_*", "^node_filesystem_readonly$"] +------------------------------------------------------------------------------------- + +The configuration above will include only metrics that match `node_filesystem_*` pattern and do not match `node_filesystem_device_*` +and are not `node_filesystem_readonly` metric. diff --git a/x-pack/metricbeat/module/openmetrics/_meta/fields.yml b/x-pack/metricbeat/module/openmetrics/_meta/fields.yml new file mode 100644 index 00000000000..c83c99f1363 --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/_meta/fields.yml @@ -0,0 +1,24 @@ +- key: openmetrics + title: 'Openmetrics' + release: beta + description: > + Openmetrics module + settings: ["http", "ssl"] + fields: + - name: openmetrics + type: group + description: > + `openmetrics` contains metrics from endpoints that are following Openmetrics format. + fields: + # Order is important here, labels will match first, the rest are double + - name: labels.* + type: object + object_type: keyword + description: > + Prometheus metric labels + - name: metrics.* + type: object + object_type: double + object_type_mapping_type: "*" + description: > + Prometheus metric diff --git a/x-pack/metricbeat/module/openmetrics/collector/_meta/data.json b/x-pack/metricbeat/module/openmetrics/collector/_meta/data.json new file mode 100644 index 00000000000..88dba9c9659 --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/_meta/data.json @@ -0,0 +1,25 @@ +{ + "@timestamp": "2019-03-01T08:05:34.853Z", + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-10229e3512d9", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } +} \ No newline at end of file diff --git a/x-pack/metricbeat/module/openmetrics/collector/_meta/docs.asciidoc b/x-pack/metricbeat/module/openmetrics/collector/_meta/docs.asciidoc new file mode 100644 index 00000000000..9057607a004 --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/_meta/docs.asciidoc @@ -0,0 +1 @@ +This is the `collector` metricset of the Openmetrics module. It collects metrics from endpoints that follow Openmetrics format. diff --git a/x-pack/metricbeat/module/openmetrics/collector/_meta/fields.yml b/x-pack/metricbeat/module/openmetrics/collector/_meta/fields.yml new file mode 100644 index 00000000000..8033a27f5ac --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/_meta/fields.yml @@ -0,0 +1 @@ +- release: beta diff --git a/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/config.yml b/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/config.yml new file mode 100644 index 00000000000..a5d8ee128af --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/config.yml @@ -0,0 +1,4 @@ +type: http +url: "/metrics" +suffix: plain +remove_fields_from_comparison: ["openmetrics.labels.instance"] diff --git a/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/docs.plain b/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/docs.plain new file mode 100644 index 00000000000..47c3b38aedb --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/docs.plain @@ -0,0 +1,11 @@ +# HELP node_network_carrier carrier value of /sys/class/net/. +# TYPE node_network_carrier gauge +node_network_carrier{device="br-0cb306323b90"} 0 +node_network_carrier{device="br-10229e3512d9"} 0 +node_network_carrier{device="br-210476dc4ef8"} 0 +node_network_carrier{device="br-33d819d5f834"} 0 +node_network_carrier{device="br-38425a39f36b"} 0 +node_network_carrier{device="br-38feb0aad6ab"} 0 +node_network_carrier{device="br-3a285aa5e58c"} 0 +node_network_carrier{device="br-425cb4c454a6"} 0 +node_network_carrier{device="br-4e623477470e"} 0 diff --git a/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/docs.plain-expected.json b/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/docs.plain-expected.json new file mode 100644 index 00000000000..16f5001ba5e --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/_meta/testdata/docs.plain-expected.json @@ -0,0 +1,251 @@ +[ + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-10229e3512d9", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-425cb4c454a6", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-38425a39f36b", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "instance": "127.0.0.1:50135", + "job": "prometheus" + }, + "metrics": { + "up": 1 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-33d819d5f834", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-4e623477470e", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-210476dc4ef8", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-0cb306323b90", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-38feb0aad6ab", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + }, + { + "event": { + "dataset": "openmetrics.collector", + "duration": 115000, + "module": "openmetrics" + }, + "metricset": { + "name": "collector", + "period": 10000 + }, + "openmetrics": { + "labels": { + "device": "br-3a285aa5e58c", + "instance": "127.0.0.1:50135", + "job": "openmetrics" + }, + "metrics": { + "node_network_carrier": 0 + } + }, + "service": { + "address": "127.0.0.1:55555", + "type": "openmetrics" + } + } +] \ No newline at end of file diff --git a/x-pack/metricbeat/module/openmetrics/collector/collector.go b/x-pack/metricbeat/module/openmetrics/collector/collector.go new file mode 100644 index 00000000000..f0f7c960f65 --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/collector.go @@ -0,0 +1,29 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package collector + +import ( + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/prometheus/collector" +) + +const ( + defaultScheme = "http" + defaultPath = "/metrics" +) + +var ( + hostParser = parse.URLHostParserBuilder{ + DefaultScheme: defaultScheme, + DefaultPath: defaultPath, + }.Build() +) + +func init() { + mb.Registry.MustAddMetricSet("openmetrics", "collector", + collector.MetricSetBuilder("openmetrics"), + mb.WithHostParser(hostParser)) +} diff --git a/x-pack/metricbeat/module/openmetrics/collector/collector_test.go b/x-pack/metricbeat/module/openmetrics/collector/collector_test.go new file mode 100644 index 00000000000..f0e99315dba --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/collector/collector_test.go @@ -0,0 +1,19 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +// +build !integration + +package collector + +import ( + "testing" + + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + + _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/openmetrics" +) + +func TestData(t *testing.T) { + mbtest.TestDataFiles(t, "openmetrics", "collector") +} diff --git a/x-pack/metricbeat/module/openmetrics/fields.go b/x-pack/metricbeat/module/openmetrics/fields.go new file mode 100644 index 00000000000..3440f8c732f --- /dev/null +++ b/x-pack/metricbeat/module/openmetrics/fields.go @@ -0,0 +1,23 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +// Code generated by beats/dev-tools/cmd/asset/asset.go - DO NOT EDIT. + +package openmetrics + +import ( + "github.com/elastic/beats/v7/libbeat/asset" +) + +func init() { + if err := asset.SetFields("metricbeat", "openmetrics", asset.ModuleFieldsPri, AssetOpenmetrics); err != nil { + panic(err) + } +} + +// AssetOpenmetrics returns asset data. +// This is the base64 encoded gzipped contents of module/openmetrics. +func AssetOpenmetrics() string { + return "eJycUsFuqzAQvPMVI94hUpTkAzi8X8i7P1WJwQu4sb3WelGUv68I0JK0PbRznGHYmZH3uNCtAieKgVRckwtAnXqqsDl+sJsCEPJkMlWoSU0BWMqNuKSOY4W/BQCsHAhsB08FkEnVxS5X+F/2qqncoczZly8F0DryNld38x7RBHoOM0JviSp0wkOamS9ujzivvGc0HNW4mLFEaoUDKNrELmqG9kZhhNCy93x1sXso0LIEo4f55+ukI/7gKJYELsOFxKImKnoS2sGbmnzG1XmPYLTp0TrJuoP2BKE8HbU81Pd9JiztJ/Nh+y4s9bl+pUZX9EScJvVCtyuLXcnfTDTin3Ag7WlYppmvfgozT/HjNE/dHtRTMCm52M2fltvyl6FXaR+f5lsAAAD//0qh20E=" +} diff --git a/x-pack/metricbeat/modules.d/openmetrics.yml.disabled b/x-pack/metricbeat/modules.d/openmetrics.yml.disabled new file mode 100644 index 00000000000..25312316001 --- /dev/null +++ b/x-pack/metricbeat/modules.d/openmetrics.yml.disabled @@ -0,0 +1,14 @@ +# Module: openmetrics +# Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.x/metricbeat-module-openmetrics.html + +- module: openmetrics + metricsets: ['collector'] + period: 10s + hosts: ['localhost:9090'] + + # This module uses the Prometheus collector metricset, all + # the options for this metricset are also available here. + metrics_path: /metrics + metrics_filters: + include: [] + exclude: []