diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 48b127bd97d..983328d0c12 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -97,7 +97,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add DynamoDB AWS Metricbeat light module {pull}15097[15097] - Release elb module as GA. {pull}15485[15485] - Add a `system/network_summary` metricset {pull}15196[15196] -- Add mesh metricset for Istio Metricbeat module{pull}15535[15535] +- Add mesh metricset for Istio Metricbeat module {pull}15535[15535] +- Add mixer metricset for Istio Metricbeat module {pull}15696[15696] - Make the `system/cpu` metricset collect normalized CPU metrics by default. {issue}15618[15618] {pull}15729[15729] *Packetbeat* diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index 472d6794091..c6acd54d471 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -16901,6 +16901,243 @@ type: keyword -- +[float] +=== mixer + +Contains statistics related to the Istio mixer service + + + +*`istio.mixer.istio.mcp.request.acks`*:: ++ +-- +The number of request acks received by the source. + + +type: long + +-- + +*`istio.mixer.config.adapter.info.errors.config`*:: ++ +-- +The number of errors encountered during processing of the adapter info configuration. + + +type: long + +-- + +*`istio.mixer.config.adapter.info.configs`*:: ++ +-- +The number of known adapters in the current config. + + +type: long + +-- + +*`istio.mixer.config.attributes`*:: ++ +-- +The number of known attributes in the current config. + + +type: long + +-- + +*`istio.mixer.config.handler.configs`*:: ++ +-- +The number of known handlers in the current config. + + +type: long + +-- + +*`istio.mixer.config.handler.errors.validation`*:: ++ +-- +The number of errors encountered because handler validation returned error. + + +type: long + +-- + +*`istio.mixer.config.instance.errors.config`*:: ++ +-- +The number of errors encountered during processing of the instance configuration. + + +type: long + +-- + +*`istio.mixer.config.instance.configs`*:: ++ +-- +The number of known instances in the current config. + + +type: long + +-- + +*`istio.mixer.config.rule.errors.config`*:: ++ +-- +The number of errors encountered during processing of the rule configuration. + + +type: long + +-- + +*`istio.mixer.config.rule.errors.match`*:: ++ +-- +The number of rule conditions that was not parseable. + + +type: long + +-- + +*`istio.mixer.config.rule.configs`*:: ++ +-- +The number of known rules in the current config. + + +type: long + +-- + +*`istio.mixer.config.template.errors.config`*:: ++ +-- +The number of errors encountered during processing of the template configuration. + + +type: long + +-- + +*`istio.mixer.config.template.configs`*:: ++ +-- +The number of known templates in the current config. + + +type: long + +-- + +*`istio.mixer.config.unsatisfied.action_handler`*:: ++ +-- +The number of actions that failed due to handlers being unavailable. + + +type: long + +-- + +*`istio.mixer.dispatcher_destinations_per_variety_total`*:: ++ +-- +The number of Mixer adapter destinations by template variety type. + + +type: long + +-- + +*`istio.mixer.handler.handlers.closed`*:: ++ +-- +The number of handlers that were closed during config transition. + + +type: long + +-- + +*`istio.mixer.handler.daemons`*:: ++ +-- +The current number of active daemon routines in a given adapter environment. + + +type: long + +-- + +*`istio.mixer.handler.failures.build`*:: ++ +-- +The number of handlers that failed creation during config transition. + + +type: long + +-- + +*`istio.mixer.handler.failures.close`*:: ++ +-- +The number of errors encountered while closing handlers during config transition. + + +type: long + +-- + +*`istio.mixer.handler.handlers.new`*:: ++ +-- +The number of handlers that were newly created during config transition. + + +type: long + +-- + +*`istio.mixer.handler.handlers.reused`*:: ++ +-- +The number of handlers that were re-used during config transition. + + +type: long + +-- + +*`istio.mixer.handler`*:: ++ +-- +The name of the daemon handler + + +type: long + +-- + +*`istio.mixer.variety`*:: ++ +-- +The name of the variety + + +type: long + +-- + [[exported-fields-jolokia]] == Jolokia fields diff --git a/metricbeat/docs/modules/istio.asciidoc b/metricbeat/docs/modules/istio.asciidoc index 8d9cd5fe006..796e100032a 100644 --- a/metricbeat/docs/modules/istio.asciidoc +++ b/metricbeat/docs/modules/istio.asciidoc @@ -11,7 +11,7 @@ beta[] This is the Istio module. The Istio module collects metrics from the Istio https://istio.io/docs/tasks/observability/metrics/querying-metrics/#about-the-prometheus-add-on[prometheus exporters endpoints]. -The default metricset is `mesh`. +The default metricsets are `mesh`, `mixer`. [float] === Compatibility @@ -28,10 +28,19 @@ in <>. Here is an example configuration: [source,yaml] ---- metricbeat.modules: +# Istio mesh. To collect all all Mixer-generated metrics - module: istio metricsets: ["mesh"] period: 10s + # use istio-telemetry.istio-system:42422, when deploying Metricbeat in a kuberentes cluster as Pod or Daemonset hosts: ["localhost:42422"] + +# Istio mixer. To monitor Mixer itself. +- module: istio + metricsets: ["mixer"] + period: 10s + # use istio-telemetry.istio-system:15014, when deploying Metricbeat in a kuberentes cluster as Pod or Daemonset + hosts: ["localhost:15014"] ---- [float] @@ -41,5 +50,9 @@ The following metricsets are available: * <> +* <> + include::istio/mesh.asciidoc[] +include::istio/mixer.asciidoc[] + diff --git a/metricbeat/docs/modules/istio/mixer.asciidoc b/metricbeat/docs/modules/istio/mixer.asciidoc new file mode 100644 index 00000000000..70f0776e6f4 --- /dev/null +++ b/metricbeat/docs/modules/istio/mixer.asciidoc @@ -0,0 +1,23 @@ +//// +This file is generated! See scripts/mage/docs_collector.go +//// + +[[metricbeat-metricset-istio-mixer]] +=== istio mixer metricset + +beta[] + +include::../../../../x-pack/metricbeat/module/istio/mixer/_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/istio/mixer/_meta/data.json[] +---- diff --git a/metricbeat/docs/modules_list.asciidoc b/metricbeat/docs/modules_list.asciidoc index c07155249a3..02a4fa63a3b 100644 --- a/metricbeat/docs/modules_list.asciidoc +++ b/metricbeat/docs/modules_list.asciidoc @@ -104,7 +104,8 @@ This file is generated! See scripts/mage/docs_collector.go |<> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] | .1+| .1+| |<> beta[] |<> beta[] |image:./images/icon-no.png[No prebuilt dashboards] | -.1+| .1+| |<> beta[] +.2+| .2+| |<> beta[] +|<> beta[] |<> |image:./images/icon-no.png[No prebuilt dashboards] | .1+| .1+| |<> |<> |image:./images/icon-yes.png[Prebuilt dashboards are available] | diff --git a/x-pack/metricbeat/include/list.go b/x-pack/metricbeat/include/list.go index e1e6943c058..d9ffd317c6f 100644 --- a/x-pack/metricbeat/include/list.go +++ b/x-pack/metricbeat/include/list.go @@ -31,6 +31,7 @@ import ( _ "github.com/elastic/beats/x-pack/metricbeat/module/ibmmq" _ "github.com/elastic/beats/x-pack/metricbeat/module/istio" _ "github.com/elastic/beats/x-pack/metricbeat/module/istio/mesh" + _ "github.com/elastic/beats/x-pack/metricbeat/module/istio/mixer" _ "github.com/elastic/beats/x-pack/metricbeat/module/mssql" _ "github.com/elastic/beats/x-pack/metricbeat/module/mssql/performance" _ "github.com/elastic/beats/x-pack/metricbeat/module/mssql/transaction_log" diff --git a/x-pack/metricbeat/metricbeat.reference.yml b/x-pack/metricbeat/metricbeat.reference.yml index 595fda51dba..e7e28588380 100644 --- a/x-pack/metricbeat/metricbeat.reference.yml +++ b/x-pack/metricbeat/metricbeat.reference.yml @@ -538,11 +538,20 @@ metricbeat.modules: } #-------------------------------- Istio Module -------------------------------- +# Istio mesh. To collect all all Mixer-generated metrics - module: istio metricsets: ["mesh"] period: 10s + # use istio-telemetry.istio-system:42422, when deploying Metricbeat in a kuberentes cluster as Pod or Daemonset hosts: ["localhost:42422"] +# Istio mixer. To monitor Mixer itself. +- module: istio + metricsets: ["mixer"] + period: 10s + # use istio-telemetry.istio-system:15014, when deploying Metricbeat in a kuberentes cluster as Pod or Daemonset + hosts: ["localhost:15014"] + #------------------------------- Jolokia Module ------------------------------- - module: jolokia #metricsets: ["jmx"] diff --git a/x-pack/metricbeat/module/istio/_meta/Dockerfile b/x-pack/metricbeat/module/istio/_meta/Dockerfile deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/x-pack/metricbeat/module/istio/_meta/config.reference.yml b/x-pack/metricbeat/module/istio/_meta/config.reference.yml index 8fe23bdf2ad..60c087484b4 100644 --- a/x-pack/metricbeat/module/istio/_meta/config.reference.yml +++ b/x-pack/metricbeat/module/istio/_meta/config.reference.yml @@ -1,4 +1,13 @@ +# Istio mesh. To collect all all Mixer-generated metrics - module: istio metricsets: ["mesh"] period: 10s + # use istio-telemetry.istio-system:42422, when deploying Metricbeat in a kuberentes cluster as Pod or Daemonset hosts: ["localhost:42422"] + +# Istio mixer. To monitor Mixer itself. +- module: istio + metricsets: ["mixer"] + period: 10s + # use istio-telemetry.istio-system:15014, when deploying Metricbeat in a kuberentes cluster as Pod or Daemonset + hosts: ["localhost:15014"] diff --git a/x-pack/metricbeat/module/istio/_meta/config.yml b/x-pack/metricbeat/module/istio/_meta/config.yml index 8fe23bdf2ad..9e9f33d37e1 100644 --- a/x-pack/metricbeat/module/istio/_meta/config.yml +++ b/x-pack/metricbeat/module/istio/_meta/config.yml @@ -1,4 +1,13 @@ +# Istio mesh. To collect all all Mixer-generated metrics - module: istio metricsets: ["mesh"] period: 10s + # use istio-telemetry.istio-system:42422, when deploying Metricbeat in a kuberentes cluster hosts: ["localhost:42422"] + +# Istio mixer. To monitor Mixer itself. +- module: istio + metricsets: ["mixer"] + period: 10s + # use istio-telemetry.istio-system:15014, when deploying Metricbeat in a kuberentes cluster + hosts: ["localhost:15014"] diff --git a/x-pack/metricbeat/module/istio/_meta/docs.asciidoc b/x-pack/metricbeat/module/istio/_meta/docs.asciidoc index 24b262314e5..7206ba40e3e 100644 --- a/x-pack/metricbeat/module/istio/_meta/docs.asciidoc +++ b/x-pack/metricbeat/module/istio/_meta/docs.asciidoc @@ -1,7 +1,7 @@ This is the Istio module. The Istio module collects metrics from the Istio https://istio.io/docs/tasks/observability/metrics/querying-metrics/#about-the-prometheus-add-on[prometheus exporters endpoints]. -The default metricset is `mesh`. +The default metricsets are `mesh`, `mixer`. [float] === Compatibility diff --git a/x-pack/metricbeat/module/istio/docker-compose.yml b/x-pack/metricbeat/module/istio/docker-compose.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/x-pack/metricbeat/module/istio/fields.go b/x-pack/metricbeat/module/istio/fields.go index a6cfe7f8317..21be91f98ad 100644 --- a/x-pack/metricbeat/module/istio/fields.go +++ b/x-pack/metricbeat/module/istio/fields.go @@ -19,5 +19,5 @@ func init() { // AssetIstio returns asset data. // This is the base64 encoded gzipped contents of module/istio. func AssetIstio() string { - return "eJzUmM9y27gPx+9+CkyPv2n1AD78Znb2sjnsTKebe0uRcMSaIrgEGNd9+h3qj6PIjOI49rqrQyamRHw/AEgQ0ifY4n4NlsXSCkCsOFzDh+73hxWAQdbRBrHk1/D/FQD0z8KfZJLDFUBEh4pxDTWKWgFsLDrD6+7RT+BVi0/m8yX7gGt4iJTCMFLQyNe3btY30ORFWc/AoiSPaQZplMAOI0JEZWATqYW7icgUYgrSIjeHwRLLAk++fi+wRHRK0IAQSIM9RicEjPHRapxYmAdrvOa8z4LnWZR/ZuaJXfCHzG4s4OfrvkEIkVqUBhOXrY/S36kuqm5xv6No3iU8tz1qRvw7IQsXhR35hzeqkih3MAqN8sahgXoPyg+5CpF+7JdYKpOiygJVy1Wd9Bal+l+Rj+rvqOcJ6Qe/nuvBlx4CRghoLAs9RNVCz5KTCK11zjJq8oZP9oVTe2qYNxRbJesDxVk+8GH6R+DUAm0OA+c7oSn5ecjfGespp09tjTGjFlfmnIztT6zqveANV8pf9icer5JTsd+wKM7jmQsssFwht3Oa5xIvgHEgz/jfS+4x9w2zewzzq6Q3UBSMlzvqvgwWwRr0YjcWuesNRqVcTfrf/YqHOwHLwCi5izDIYn1f6+1mmJTvd22O6toKjNPDC5Q3wJSixuIM7Sx6mc6oipHoTVQ7iltHylR59JINgOV5RLJCjsYAPyrDrrG66Vq/SK5/dIA7GZyDeqFpuih9JzMmdObGImyI1msblLsuY0CMcNAaQSWqzcbqkWWyAHcN+n6SStJkU3pYigyJcdknFcJ1vRkCrEKAWjEaIN/9cKpGd04WHjHycTtzYepB5FW+IuikHNxiZ06r0XJEXwS9xU48D/uX2JNToHdvzKmxq+/OadCXt2gxPa97cIvdurySXkUePgJUDXG51bkI9xRyU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+5XG33gZvSvODkZP/nVs/OSkPltRDwjTBNxVqUQ5FVvI4LS+78BAAD//wv4RSk=" } diff --git a/x-pack/metricbeat/module/istio/mixer/_meta/data.json b/x-pack/metricbeat/module/istio/mixer/_meta/data.json new file mode 100644 index 00000000000..d19f35c26bb --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/_meta/data.json @@ -0,0 +1,23 @@ +{ + "@timestamp": "2019-03-01T08:05:34.853Z", + "event": { + "dataset": "istio.mixer", + "duration": 115000, + "module": "istio" + }, + "istio": { + "mixer": { + "handler": { + "daemons": 1 + } + } + }, + "metricset": { + "name": "mixer", + "period": 10000 + }, + "service": { + "address": "127.0.0.1:55555", + "type": "istio" + } +} \ No newline at end of file diff --git a/x-pack/metricbeat/module/istio/mixer/_meta/docs.asciidoc b/x-pack/metricbeat/module/istio/mixer/_meta/docs.asciidoc new file mode 100644 index 00000000000..24a76df7e6e --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/_meta/docs.asciidoc @@ -0,0 +1 @@ +This is the mixer metricset of the module istio. This metricset collects Mixer-specific metrics and can be used to monitor Mixer itself. diff --git a/x-pack/metricbeat/module/istio/mixer/_meta/fields.yml b/x-pack/metricbeat/module/istio/mixer/_meta/fields.yml new file mode 100644 index 00000000000..0e1fe6643ba --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/_meta/fields.yml @@ -0,0 +1,98 @@ +- name: mixer + type: group + description: > + Contains statistics related to the Istio mixer service + release: beta + fields: + - name: istio.mcp.request.acks + type: long + description: > + The number of request acks received by the source. + - name: config.adapter.info.errors.config + type: long + description: > + The number of errors encountered during processing of the adapter info configuration. + - name: config.adapter.info.configs + type: long + description: > + The number of known adapters in the current config. + - name: config.attributes + type: long + description: > + The number of known attributes in the current config. + - name: config.handler.configs + type: long + description: > + The number of known handlers in the current config. + - name: config.handler.errors.validation + type: long + description: > + The number of errors encountered because handler validation returned error. + - name: config.instance.errors.config + type: long + description: > + The number of errors encountered during processing of the instance configuration. + - name: config.instance.configs + type: long + description: > + The number of known instances in the current config. + - name: config.rule.errors.config + type: long + description: > + The number of errors encountered during processing of the rule configuration. + - name: config.rule.errors.match + type: long + description: > + The number of rule conditions that was not parseable. + - name: config.rule.configs + type: long + description: > + The number of known rules in the current config. + - name: config.template.errors.config + type: long + description: > + The number of errors encountered during processing of the template configuration. + - name: config.template.configs + type: long + description: > + The number of known templates in the current config. + - name: config.unsatisfied.action_handler + type: long + description: > + The number of actions that failed due to handlers being unavailable. + - name: dispatcher_destinations_per_variety_total + type: long + description: > + The number of Mixer adapter destinations by template variety type. + - name: handler.handlers.closed + type: long + description: > + The number of handlers that were closed during config transition. + - name: handler.daemons + type: long + description: > + The current number of active daemon routines in a given adapter environment. + - name: handler.failures.build + type: long + description: > + The number of handlers that failed creation during config transition. + - name: handler.failures.close + type: long + description: > + The number of errors encountered while closing handlers during config transition. + - name: handler.handlers.new + type: long + description: > + The number of handlers that were newly created during config transition. + - name: handler.handlers.reused + type: long + description: > + The number of handlers that were re-used during config transition. + - name: handler + type: long + description: > + The name of the daemon handler + - name: variety + type: long + description: > + The name of the variety diff --git a/x-pack/metricbeat/module/istio/mixer/_meta/testdata/config.yml b/x-pack/metricbeat/module/istio/mixer/_meta/testdata/config.yml new file mode 100644 index 00000000000..ab6bf241654 --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/_meta/testdata/config.yml @@ -0,0 +1,3 @@ +type: http +url: "/metrics" +suffix: plain diff --git a/x-pack/metricbeat/module/istio/mixer/_meta/testdata/docs.plain b/x-pack/metricbeat/module/istio/mixer/_meta/testdata/docs.plain new file mode 100644 index 00000000000..73ee7858225 --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/_meta/testdata/docs.plain @@ -0,0 +1,187 @@ +# HELP go_gc_duration_seconds A summary of the GC invocation durations. +# TYPE go_gc_duration_seconds summary +go_gc_duration_seconds{quantile="0"} 4.4967e-05 +go_gc_duration_seconds{quantile="0.25"} 8.9966e-05 +go_gc_duration_seconds{quantile="0.5"} 0.000167823 +go_gc_duration_seconds{quantile="0.75"} 0.000307834 +go_gc_duration_seconds{quantile="1"} 0.000406795 +go_gc_duration_seconds_sum 0.001143664 +go_gc_duration_seconds_count 6 +# HELP go_goroutines Number of goroutines that currently exist. +# TYPE go_goroutines gauge +go_goroutines 2104 +# HELP go_info Information about the Go environment. +# TYPE go_info gauge +go_info{version="go1.13.4"} 1 +# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use. +# TYPE go_memstats_alloc_bytes gauge +go_memstats_alloc_bytes 1.1449296e+07 +# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed. +# TYPE go_memstats_alloc_bytes_total counter +go_memstats_alloc_bytes_total 2.5864624e+07 +# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. +# TYPE go_memstats_buck_hash_sys_bytes gauge +go_memstats_buck_hash_sys_bytes 1.455033e+06 +# HELP go_memstats_frees_total Total number of frees. +# TYPE go_memstats_frees_total counter +go_memstats_frees_total 208299 +# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started. +# TYPE go_memstats_gc_cpu_fraction gauge +go_memstats_gc_cpu_fraction 0.0007062330567889804 +# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. +# TYPE go_memstats_gc_sys_bytes gauge +go_memstats_gc_sys_bytes 2.394112e+06 +# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use. +# TYPE go_memstats_heap_alloc_bytes gauge +go_memstats_heap_alloc_bytes 1.1449296e+07 +# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. +# TYPE go_memstats_heap_idle_bytes gauge +go_memstats_heap_idle_bytes 4.6948352e+07 +# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. +# TYPE go_memstats_heap_inuse_bytes gauge +go_memstats_heap_inuse_bytes 1.4917632e+07 +# HELP go_memstats_heap_objects Number of allocated objects. +# TYPE go_memstats_heap_objects gauge +go_memstats_heap_objects 65319 +# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. +# TYPE go_memstats_heap_released_bytes gauge +go_memstats_heap_released_bytes 4.694016e+07 +# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. +# TYPE go_memstats_heap_sys_bytes gauge +go_memstats_heap_sys_bytes 6.1865984e+07 +# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection. +# TYPE go_memstats_last_gc_time_seconds gauge +go_memstats_last_gc_time_seconds 1.579607381243147e+09 +# HELP go_memstats_lookups_total Total number of pointer lookups. +# TYPE go_memstats_lookups_total counter +go_memstats_lookups_total 0 +# HELP go_memstats_mallocs_total Total number of mallocs. +# TYPE go_memstats_mallocs_total counter +go_memstats_mallocs_total 273618 +# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. +# TYPE go_memstats_mcache_inuse_bytes gauge +go_memstats_mcache_inuse_bytes 10416 +# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. +# TYPE go_memstats_mcache_sys_bytes gauge +go_memstats_mcache_sys_bytes 16384 +# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. +# TYPE go_memstats_mspan_inuse_bytes gauge +go_memstats_mspan_inuse_bytes 178160 +# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. +# TYPE go_memstats_mspan_sys_bytes gauge +go_memstats_mspan_sys_bytes 180224 +# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. +# TYPE go_memstats_next_gc_bytes gauge +go_memstats_next_gc_bytes 1.4764976e+07 +# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. +# TYPE go_memstats_other_sys_bytes gauge +go_memstats_other_sys_bytes 1.656127e+06 +# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator. +# TYPE go_memstats_stack_inuse_bytes gauge +go_memstats_stack_inuse_bytes 5.24288e+06 +# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. +# TYPE go_memstats_stack_sys_bytes gauge +go_memstats_stack_sys_bytes 5.24288e+06 +# HELP go_memstats_sys_bytes Number of bytes obtained from system. +# TYPE go_memstats_sys_bytes gauge +go_memstats_sys_bytes 7.2810744e+07 +# HELP go_threads Number of OS threads created. +# TYPE go_threads gauge +go_threads 14 +# HELP istio_build Istio component build info +# TYPE istio_build gauge +istio_build{component="mixer",tag="1.4.3"} 1 +# HELP istio_mcp_reconnections The number of times the sink has reconnected. +# TYPE istio_mcp_reconnections counter +istio_mcp_reconnections{component="mixer"} 1 +# HELP istio_mcp_request_acks_total The number of request acks received by the source. +# TYPE istio_mcp_request_acks_total counter +istio_mcp_request_acks_total{collection="istio/config/v1alpha2/adapters",component="mixer"} 1 +istio_mcp_request_acks_total{collection="istio/config/v1alpha2/templates",component="mixer"} 1 +istio_mcp_request_acks_total{collection="istio/policy/v1beta1/attributemanifests",component="mixer"} 1 +istio_mcp_request_acks_total{collection="istio/policy/v1beta1/handlers",component="mixer"} 1 +istio_mcp_request_acks_total{collection="istio/policy/v1beta1/instances",component="mixer"} 1 +istio_mcp_request_acks_total{collection="istio/policy/v1beta1/rules",component="mixer"} 1 +# HELP mixer_config_adapter_info_config_errors_total The number of errors encountered during processing of the adapter info configuration. +# TYPE mixer_config_adapter_info_config_errors_total gauge +mixer_config_adapter_info_config_errors_total 0 +# HELP mixer_config_adapter_info_configs_total The number of known adapters in the current config. +# TYPE mixer_config_adapter_info_configs_total gauge +mixer_config_adapter_info_configs_total 0 +# HELP mixer_config_attributes_total The number of known attributes in the current config. +# TYPE mixer_config_attributes_total gauge +mixer_config_attributes_total 113 +# HELP mixer_config_handler_configs_total The number of known handlers in the current config. +# TYPE mixer_config_handler_configs_total gauge +mixer_config_handler_configs_total 3 +# HELP mixer_config_handler_validation_error_total The number of errors encountered because handler validation returned error. +# TYPE mixer_config_handler_validation_error_total gauge +mixer_config_handler_validation_error_total 0 +# HELP mixer_config_instance_config_errors_total The number of errors encountered during processing of the instance configuration. +# TYPE mixer_config_instance_config_errors_total gauge +mixer_config_instance_config_errors_total 0 +# HELP mixer_config_instance_configs_total The number of known instances in the current config. +# TYPE mixer_config_instance_configs_total gauge +mixer_config_instance_configs_total 11 +# HELP mixer_config_rule_config_errors_total The number of errors encountered during processing of the rule configuration. +# TYPE mixer_config_rule_config_errors_total gauge +mixer_config_rule_config_errors_total 0 +# HELP mixer_config_rule_config_match_error_total The number of rule conditions that was not parseable. +# TYPE mixer_config_rule_config_match_error_total gauge +mixer_config_rule_config_match_error_total 0 +# HELP mixer_config_rule_configs_total The number of known rules in the current config. +# TYPE mixer_config_rule_configs_total gauge +mixer_config_rule_configs_total 8 +# HELP mixer_config_template_config_errors_total The number of errors encountered during processing of the template configuration. +# TYPE mixer_config_template_config_errors_total gauge +mixer_config_template_config_errors_total 0 +# HELP mixer_config_template_configs_total The number of known templates in the current config. +# TYPE mixer_config_template_configs_total gauge +mixer_config_template_configs_total 0 +# HELP mixer_config_unsatisfied_action_handler_total The number of actions that failed due to handlers being unavailable. +# TYPE mixer_config_unsatisfied_action_handler_total gauge +mixer_config_unsatisfied_action_handler_total 0 +# HELP mixer_dispatcher_destinations_per_variety_total Number of Mixer adapter destinations by template variety type +# TYPE mixer_dispatcher_destinations_per_variety_total gauge +mixer_dispatcher_destinations_per_variety_total{variety="TEMPLATE_VARIETY_ATTRIBUTE_GENERATOR"} 1 +mixer_dispatcher_destinations_per_variety_total{variety="TEMPLATE_VARIETY_REPORT"} 2 +# HELP mixer_handler_closed_handlers_total The number of handlers that were closed during config transition. +# TYPE mixer_handler_closed_handlers_total gauge +mixer_handler_closed_handlers_total 0 +# HELP mixer_handler_daemons_total The current number of active daemon routines in a given adapter environment. +# TYPE mixer_handler_daemons_total gauge +mixer_handler_daemons_total{handler="kubernetesenv.istio-system"} 4 +mixer_handler_daemons_total{handler="prometheus.istio-system"} 1 +# HELP mixer_handler_handler_build_failures_total The number of handlers that failed creation during config transition. +# TYPE mixer_handler_handler_build_failures_total gauge +mixer_handler_handler_build_failures_total 0 +# HELP mixer_handler_handler_close_failures_total The number of errors encountered while closing handlers during config transition. +# TYPE mixer_handler_handler_close_failures_total gauge +mixer_handler_handler_close_failures_total 0 +# HELP mixer_handler_new_handlers_total The number of handlers that were newly created during config transition. +# TYPE mixer_handler_new_handlers_total gauge +mixer_handler_new_handlers_total 3 +# HELP mixer_handler_reused_handlers_total The number of handlers that were re-used during config transition. +# TYPE mixer_handler_reused_handlers_total gauge +mixer_handler_reused_handlers_total 0 +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total counter +process_cpu_seconds_total 0.23 +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 1.048576e+06 +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 14 +# HELP process_resident_memory_bytes Resident memory size in bytes. +# TYPE process_resident_memory_bytes gauge +process_resident_memory_bytes 5.7409536e+07 +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 1.57960737432e+09 +# HELP process_virtual_memory_bytes Virtual memory size in bytes. +# TYPE process_virtual_memory_bytes gauge +process_virtual_memory_bytes 1.64786176e+08 +# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes. +# TYPE process_virtual_memory_max_bytes gauge +process_virtual_memory_max_bytes -1 diff --git a/x-pack/metricbeat/module/istio/mixer/_meta/testdata/docs.plain-expected.json b/x-pack/metricbeat/module/istio/mixer/_meta/testdata/docs.plain-expected.json new file mode 100644 index 00000000000..600e33e83d5 --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/_meta/testdata/docs.plain-expected.json @@ -0,0 +1,164 @@ +[ + { + "event": { + "dataset": "istio.mixer", + "duration": 115000, + "module": "istio" + }, + "istio": { + "mixer": { + "handler": { + "daemons": 1 + } + } + }, + "metricset": { + "name": "mixer", + "period": 10000 + }, + "service": { + "address": "127.0.0.1:55555", + "type": "istio" + } + }, + { + "event": { + "dataset": "istio.mixer", + "duration": 115000, + "module": "istio" + }, + "istio": { + "mixer": { + "dispatcher_destinations_per_variety_total": 1, + "variety": "TEMPLATE_VARIETY_ATTRIBUTE_GENERATOR" + } + }, + "metricset": { + "name": "mixer", + "period": 10000 + }, + "service": { + "address": "127.0.0.1:55555", + "type": "istio" + } + }, + { + "event": { + "dataset": "istio.mixer", + "duration": 115000, + "module": "istio" + }, + "istio": { + "mixer": { + "config": { + "adapter": { + "info": { + "configs": 0, + "errors": { + "config": 0 + } + } + }, + "attributes": 113, + "handler": { + "configs": 3, + "errors": { + "validation": 0 + } + }, + "instance": { + "configs": 11, + "errors": { + "config": 0 + } + }, + "rule": { + "configs": 8, + "errors": { + "config": 0, + "match": 0 + } + }, + "template": { + "configs": 0, + "errors": { + "config": 0 + } + }, + "unsatisfied": { + "action_handler": 0 + } + }, + "handler": { + "failures": { + "build": 0, + "close": 0 + }, + "handlers": { + "closed": 0, + "new": 3, + "reused": 0 + } + }, + "istio": { + "mcp": { + "request": { + "acks": 1 + } + } + } + } + }, + "metricset": { + "name": "mixer", + "period": 10000 + }, + "service": { + "address": "127.0.0.1:55555", + "type": "istio" + } + }, + { + "event": { + "dataset": "istio.mixer", + "duration": 115000, + "module": "istio" + }, + "istio": { + "mixer": { + "handler": { + "daemons": 4 + } + } + }, + "metricset": { + "name": "mixer", + "period": 10000 + }, + "service": { + "address": "127.0.0.1:55555", + "type": "istio" + } + }, + { + "event": { + "dataset": "istio.mixer", + "duration": 115000, + "module": "istio" + }, + "istio": { + "mixer": { + "dispatcher_destinations_per_variety_total": 2, + "variety": "TEMPLATE_VARIETY_REPORT" + } + }, + "metricset": { + "name": "mixer", + "period": 10000 + }, + "service": { + "address": "127.0.0.1:55555", + "type": "istio" + } + } +] \ No newline at end of file diff --git a/x-pack/metricbeat/module/istio/mixer/mixer.go b/x-pack/metricbeat/module/istio/mixer/mixer.go new file mode 100644 index 00000000000..7c5eb7bce5d --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/mixer.go @@ -0,0 +1,60 @@ +// 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 mesh + +import ( + "github.com/elastic/beats/metricbeat/helper/prometheus" + "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/metricbeat/mb/parse" +) + +const ( + defaultScheme = "http" + defaultPath = "/metrics" +) + +var ( + hostParser = parse.URLHostParserBuilder{ + DefaultScheme: defaultScheme, + DefaultPath: defaultPath, + }.Build() +) + +var mapping = &prometheus.MetricsMapping{ + Metrics: map[string]prometheus.MetricMap{ + "mixer_config_adapter_info_config_errors_total": prometheus.Metric("config.adapter.info.errors.config"), + "mixer_config_adapter_info_configs_total": prometheus.Metric("config.adapter.info.configs"), + "mixer_config_attributes_total": prometheus.Metric("config.attributes"), + "mixer_config_handler_configs_total": prometheus.Metric("config.handler.configs"), + "mixer_config_handler_validation_error_total": prometheus.Metric("config.handler.errors.validation"), + "mixer_config_instance_config_errors_total": prometheus.Metric("config.instance.errors.config"), + "mixer_config_instance_configs_total": prometheus.Metric("config.instance.configs"), + "mixer_config_rule_config_errors_total": prometheus.Metric("config.rule.errors.config"), + "mixer_config_rule_config_match_error_total": prometheus.Metric("config.rule.errors.match"), + "mixer_config_rule_configs_total": prometheus.Metric("config.rule.configs"), + "mixer_config_template_config_errors_total": prometheus.Metric("config.template.errors.config"), + "mixer_config_template_configs_total": prometheus.Metric("config.template.configs"), + "mixer_config_unsatisfied_action_handler_total": prometheus.Metric("config.unsatisfied.action_handler"), + "mixer_dispatcher_destinations_per_variety_total": prometheus.Metric("dispatcher_destinations_per_variety_total"), + "mixer_handler_closed_handlers_total": prometheus.Metric("handler.handlers.closed"), + "mixer_handler_daemons_total": prometheus.Metric("handler.daemons"), + "mixer_handler_handler_build_failures_total": prometheus.Metric("handler.failures.build"), + "mixer_handler_handler_close_failures_total": prometheus.Metric("handler.failures.close"), + "mixer_handler_new_handlers_total": prometheus.Metric("handler.handlers.new"), + "mixer_handler_reused_handlers_total": prometheus.Metric("handler.handlers.reused"), + "istio_mcp_request_acks_total": prometheus.Metric("istio.mcp.request.acks"), + }, + + Labels: map[string]prometheus.LabelMap{ + "handler": prometheus.KeyLabel("handler"), + "variety": prometheus.KeyLabel("variety"), + }, +} + +func init() { + mb.Registry.MustAddMetricSet("istio", "mixer", + prometheus.MetricSetBuilder(mapping), + mb.WithHostParser(hostParser)) +} diff --git a/x-pack/metricbeat/module/istio/mixer/mixer_test.go b/x-pack/metricbeat/module/istio/mixer/mixer_test.go new file mode 100644 index 00000000000..8c10083423e --- /dev/null +++ b/x-pack/metricbeat/module/istio/mixer/mixer_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 mesh + +import ( + "testing" + + mbtest "github.com/elastic/beats/metricbeat/mb/testing" + + _ "github.com/elastic/beats/x-pack/metricbeat/module/istio" +) + +func TestData(t *testing.T) { + mbtest.TestDataFiles(t, "istio", "mixer") +} diff --git a/x-pack/metricbeat/modules.d/istio.yml.disabled b/x-pack/metricbeat/modules.d/istio.yml.disabled index feeefdffe2b..6a87b3428e5 100644 --- a/x-pack/metricbeat/modules.d/istio.yml.disabled +++ b/x-pack/metricbeat/modules.d/istio.yml.disabled @@ -1,7 +1,16 @@ # Module: istio # Docs: https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-istio.html +# Istio mesh. To collect all all Mixer-generated metrics - module: istio metricsets: ["mesh"] period: 10s + # use istio-telemetry.istio-system:42422, when deploying Metricbeat in a kuberentes cluster hosts: ["localhost:42422"] + +# Istio mixer. To monitor Mixer itself. +- module: istio + metricsets: ["mixer"] + period: 10s + # use istio-telemetry.istio-system:15014, when deploying Metricbeat in a kuberentes cluster + hosts: ["localhost:15014"]