Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c01bbf2
Add support for optional metricsets in xpack mode
joshdover Jan 16, 2023
983b95a
Merge remote-tracking branch 'upstream/main' into xpack-optional
joshdover Jan 20, 2023
afd63ff
Simplify metricset loop
joshdover Jan 20, 2023
b5d0437
Merge remote-tracking branch 'upstream/main' into xpack-optional
joshdover Jan 24, 2023
60b85e3
go mod tidy
joshdover Jan 24, 2023
b086da7
Remove dependency on exp/slices
joshdover Jan 24, 2023
570637a
Add elasticsearch.ingest metricset
joshdover Dec 10, 2022
ed0762a
Add processor level metrics with sampling
joshdover Dec 14, 2022
a088039
mage fmt
joshdover Dec 14, 2022
3e2c253
Add unit tests for event mapper
joshdover Jan 16, 2023
00342d3
Remame pipeline time fields
joshdover Jan 16, 2023
fd056fd
Make ingest metricset optional in xpack mode
joshdover Jan 16, 2023
9783b05
Update x-pack metricbeat reference yml
joshdover Jan 16, 2023
399be78
Update changelog and docs
joshdover Jan 16, 2023
111a3b0
Update fields
joshdover Jan 17, 2023
682f01f
Rename metricset to ingest_pipeline
joshdover Jan 19, 2023
60fae09
Rename time fields to match node_stats metricset
joshdover Jan 19, 2023
e223a20
Add example event
joshdover Jan 19, 2023
a13b2b7
Fix docs mentioning host module
joshdover Jan 19, 2023
35931c4
Update docs and fields
joshdover Jan 19, 2023
d09de60
Remove useless unit test
joshdover Jan 20, 2023
2c0b9b2
Merge remote-tracking branch 'upstream/main' into es-ingest
joshdover Jan 24, 2023
f912521
Merge branch 'main' into es-ingest
joshdover Jan 25, 2023
605f3e6
Merge branch 'main' into es-ingest
joshdover Jan 26, 2023
ed09ca6
Use realistic cluster and node ids
joshdover Jan 27, 2023
3f8dbed
Remove ShouldSkipFetch call
joshdover Jan 27, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff]
- Add GCP Redis regions support {pull}33728[33728]
- Add namespace metadata to all namespaced kubernetes resources. {pull}33763[33763]
- Changed cloudwatch module to call ListMetrics API only once per region, instead of per AWS namespace {pull}34055[34055]
- Add beta ingest_pipeline metricset to Elasticsearch module for ingest pipeline monitoring {pull}34012[34012]
- Handle duplicated TYPE line for prometheus metrics {issue}18813[18813] {pull}33865[33865]

*Packetbeat*
Expand Down
122 changes: 122 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29995,6 +29995,16 @@ type: keyword
Node name.


type: keyword

--

*`elasticsearch.node.roles`*::
+
--
Node roles.


type: keyword

--
Expand Down Expand Up @@ -31677,6 +31687,118 @@ type: long

--

[float]
=== ingest_pipeline

Runtime metrics on ingest pipeline execution


*`elasticsearch.ingest_pipeline.name`*::
+
--
Name / id of the ingest pipeline

type: wildcard

--

[float]
=== total

Metrics on the total ingest pipeline execution, including all processors.


*`elasticsearch.ingest_pipeline.total.count`*::
+
--
Number of documents processed by this pipeline

type: long

--

*`elasticsearch.ingest_pipeline.total.failed`*::
+
--
Number of documented failed to process by this pipeline

type: long

--

*`elasticsearch.ingest_pipeline.total.time.total.ms`*::
+
--
Total time spent processing documents through this pipeline, inclusive of other pipelines called

type: long

--

*`elasticsearch.ingest_pipeline.total.time.self.ms`*::
+
--
Time spent processing documents through this pipeline, exclusive of other pipelines called

type: long

--


*`elasticsearch.ingest_pipeline.processor.type`*::
+
--
The type of ingest processor

type: keyword

--

*`elasticsearch.ingest_pipeline.processor.type_tag`*::
+
--
The type and the tag for this processor in the format "<type>:<tag>"

type: keyword

--

*`elasticsearch.ingest_pipeline.processor.order_index`*::
+
--
The order this processor appears in the pipeline definition

type: long

--

*`elasticsearch.ingest_pipeline.processor.count`*::
+
--
Number of documents processed by this processor

type: long

--

*`elasticsearch.ingest_pipeline.processor.failed`*::
+
--
Number of documented failed to process by this processor

type: long

--

*`elasticsearch.ingest_pipeline.processor.time.total.ms`*::
+
--
Total time spent processing documents through this processor

type: long

--

[float]
=== ml.job

Expand Down
6 changes: 6 additions & 0 deletions metricbeat/docs/modules/elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ metricbeat.modules:
#- index
#- index_recovery
#- index_summary
#- ingest_pipeline
#- shard
#- ml_job
period: 10s
Expand All @@ -73,6 +74,7 @@ metricbeat.modules:
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

#index_recovery.active_only: true
#ingest_pipeline.processor_sample_rate: 0.25
#xpack.enabled: false
#scope: node
----
Expand All @@ -97,6 +99,8 @@ The following metricsets are available:

* <<metricbeat-metricset-elasticsearch-index_summary,index_summary>>

* <<metricbeat-metricset-elasticsearch-ingest_pipeline,ingest_pipeline>>

* <<metricbeat-metricset-elasticsearch-ml_job,ml_job>>

* <<metricbeat-metricset-elasticsearch-node,node>>
Expand All @@ -119,6 +123,8 @@ include::elasticsearch/index_recovery.asciidoc[]

include::elasticsearch/index_summary.asciidoc[]

include::elasticsearch/ingest_pipeline.asciidoc[]

include::elasticsearch/ml_job.asciidoc[]

include::elasticsearch/node.asciidoc[]
Expand Down
29 changes: 29 additions & 0 deletions metricbeat/docs/modules/elasticsearch/ingest_pipeline.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
////
This file is generated! See scripts/mage/docs_collector.go
////
:edit_url: https://github.com/elastic/beats/edit/main/metricbeat/module/elasticsearch/ingest_pipeline/_meta/docs.asciidoc


[[metricbeat-metricset-elasticsearch-ingest_pipeline]]
=== Elasticsearch ingest_pipeline metricset

beta[]

include::../../../module/elasticsearch/ingest_pipeline/_meta/docs.asciidoc[]

This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.

:edit_url:

==== Fields

For a description of each field in the metricset, see the
<<exported-fields-elasticsearch,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/elasticsearch/ingest_pipeline/_meta/data.json[]
----
:edit_url!:
3 changes: 2 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-module-dropwizard,Dropwizard>> |image:./images/icon-no.png[No prebuilt dashboards] |
.1+| .1+| |<<metricbeat-metricset-dropwizard-collector,collector>>
|<<metricbeat-module-elasticsearch,Elasticsearch>> |image:./images/icon-no.png[No prebuilt dashboards] |
.11+| .11+| |<<metricbeat-metricset-elasticsearch-ccr,ccr>>
.12+| .12+| |<<metricbeat-metricset-elasticsearch-ccr,ccr>>
|<<metricbeat-metricset-elasticsearch-cluster_stats,cluster_stats>>
|<<metricbeat-metricset-elasticsearch-enrich,enrich>>
|<<metricbeat-metricset-elasticsearch-index,index>>
|<<metricbeat-metricset-elasticsearch-index_recovery,index_recovery>>
|<<metricbeat-metricset-elasticsearch-index_summary,index_summary>>
|<<metricbeat-metricset-elasticsearch-ingest_pipeline,ingest_pipeline>> beta[]
|<<metricbeat-metricset-elasticsearch-ml_job,ml_job>>
|<<metricbeat-metricset-elasticsearch-node,node>>
|<<metricbeat-metricset-elasticsearch-node_stats,node_stats>>
Expand Down
1 change: 1 addition & 0 deletions metricbeat/include/list_common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ metricbeat.modules:
#- index
#- index_recovery
#- index_summary
#- ingest_pipeline
#- shard
#- ml_job
period: 10s
Expand All @@ -284,6 +285,7 @@ metricbeat.modules:
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

#index_recovery.active_only: true
#ingest_pipeline.processor_sample_rate: 0.25
#xpack.enabled: false
#scope: node

Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/elasticsearch/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#- index
#- index_recovery
#- index_summary
#- ingest_pipeline
#- shard
#- ml_job
period: 10s
Expand All @@ -14,5 +15,6 @@
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

#index_recovery.active_only: true
#ingest_pipeline.processor_sample_rate: 0.25
#xpack.enabled: false
#scope: node
4 changes: 4 additions & 0 deletions metricbeat/module/elasticsearch/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@
type: keyword
description: >
Node name.
- name: roles
type: keyword
description: >
Node roles.
- name: master
type: boolean
description: >
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/module/elasticsearch/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func NewModule(base mb.BaseModule) (mb.Module, error) {
"node_stats",
"shard",
}
return elastic.NewModule(&base, xpackEnabledMetricSets, []string{}, logp.NewLogger(ModuleName))
optionalXpackMetricsets := []string{"ingest_pipeline"}
return elastic.NewModule(&base, xpackEnabledMetricSets, optionalXpackMetricsets, logp.NewLogger(ModuleName))
}

var (
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/elasticsearch/fields.go

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions metricbeat/module/elasticsearch/ingest_pipeline/_meta/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"@timestamp": "2023-01-19T19:08:28.770Z",
"elasticsearch": {
"cluster": {
"id": "WocBBA0QRma0sGpdQ7vLfQ",
"name": "my-cluster"
},
"node": {
"name": "27fb1c2fd783",
"roles": [
"ingest",
"remote_cluster_client"
],
"id": "f5i3v9hMT_q__q6B9WOo5A"
},
"ingest_pipeline": {
"name": "my-pipeline",
"total": {
"count": 64,
"failed": 0,
"time": {
"total": {
"ms": 39
},
"self": {
"ms": 39
}
}
}
}
},
"ecs": {
"version": "8.0.0"
},
"host": {
"name": "myhost.local"
},
"agent": {
"type": "metricbeat",
"version": "8.7.0",
"ephemeral_id": "80fe51b6-57df-46d1-9240-20424df6d675",
"id": "faab8154-7ceb-470f-b2ca-0aee636951c3",
"name": "myhost.local"
},
"event": {
"dataset": "elasticsearch.ingest_pipeline",
"module": "elasticsearch",
"duration": 558169708
},
"metricset": {
"period": 10000,
"name": "ingest_pipeline"
},
"service": {
"address": "https://localhost:9200",
"type": "elasticsearch"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
This is the ingest_pipeline metricset of the module elasticsearch.

Collects metrics on ingest pipeline executions, with processor-level granularity.

[float]
=== Processor-level metrics sampling

Processor-level metrics can produce a high volume of data, so the default behavior is to collect those metrics less
frequently than the `period` for pipeline-level metrics, by applying a sampling strategy. By default, the
processor-level metrics will be collected during 25% of the time. This can be configured with the
`ingest.processor_sample_rate` setting:

[float]
=== Configuration example
[source,yaml]
----
- module: elasticsearch
period: 10s
metricsets:
- ingest
ingest.processor_sample_rate: 0.1 # decrease to 10% of fetches
----
Loading