From 938e66ccf352e2925b99fc988b28c46fc3ee304e Mon Sep 17 00:00:00 2001 From: Mariana Date: Thu, 23 Jul 2020 11:01:08 +0200 Subject: [PATCH 1/3] mofidy doc --- .../module/azure/app_insights/_meta/docs.asciidoc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/x-pack/metricbeat/module/azure/app_insights/_meta/docs.asciidoc b/x-pack/metricbeat/module/azure/app_insights/_meta/docs.asciidoc index 2ba1150078b..2b587acbbdd 100644 --- a/x-pack/metricbeat/module/azure/app_insights/_meta/docs.asciidoc +++ b/x-pack/metricbeat/module/azure/app_insights/_meta/docs.asciidoc @@ -45,17 +45,15 @@ This value is only valid when segment is specified. `filter`:: (_string_) An expression used to filter the results. This value should be a valid OData filter expression where the keys of each clause should be applicable dimensions for the metric you are retrieving. -Users can select the options to retrieve all metrics from a specific namespace using the following: +Example configuration: ["source","yaml"] ---- - metrics: - - id: ["*"] - timespan: "Microsoft.Storage/storageAccounts" +metrics: + - id: ["requests/count", "requests/failed"] + segment: "request/name" + aggregation: ["sum"] ---- -A default non configurable timegrain of 5 min is set so users are advised to configure an interval of 300s or a multiply of it. - - From edc49bfeaadb6be1f7f689415130f822fa07ac78 Mon Sep 17 00:00:00 2001 From: Mariana Date: Mon, 14 Sep 2020 14:20:15 +0200 Subject: [PATCH 2/3] fix --- .../iis/application_pool/application_pool.go | 1 - .../module/iis/application_pool/reader.go | 24 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/x-pack/metricbeat/module/iis/application_pool/application_pool.go b/x-pack/metricbeat/module/iis/application_pool/application_pool.go index 508e7b465e0..9c92894fb29 100644 --- a/x-pack/metricbeat/module/iis/application_pool/application_pool.go +++ b/x-pack/metricbeat/module/iis/application_pool/application_pool.go @@ -84,7 +84,6 @@ func (m *MetricSet) Fetch(report mb.ReporterV2) error { break } } - return nil } diff --git a/x-pack/metricbeat/module/iis/application_pool/reader.go b/x-pack/metricbeat/module/iis/application_pool/reader.go index c4285c270c0..0273ac523ab 100644 --- a/x-pack/metricbeat/module/iis/application_pool/reader.go +++ b/x-pack/metricbeat/module/iis/application_pool/reader.go @@ -45,16 +45,16 @@ type WorkerProcess struct { } var appPoolCounters = map[string]string{ - "process.pid": "\\Process(w3wp*)\\ID Process", - "process.cpu_usage_perc": "\\Process(w3wp*)\\% Processor Time", - "process.handle_count": "\\Process(w3wp*)\\Handle Count", - "process.thread_count": "\\Process(w3wp*)\\Thread Count", - "process.working_set": "\\Process(w3wp*)\\Working Set", - "process.private_bytes": "\\Process(w3wp*)\\Private Bytes", - "process.virtual_bytes": "\\Process(w3wp*)\\Virtual Bytes", - "process.page_faults_per_sec": "\\Process(w3wp*)\\Page Faults/sec", - "process.io_read_operations_per_sec": "\\Process(w3wp*)\\IO Read Operations/sec", - "process.io_write_operations_per_sec": "\\Process(w3wp*)\\IO Write Operations/sec", + "process.pid": "\\Process(w3wp*)\\ID Process", + //"process.cpu_usage_perc": "\\Process(w3wp*)\\% Processor Time", + //"process.handle_count": "\\Process(w3wp*)\\Handle Count", + //"process.thread_count": "\\Process(w3wp*)\\Thread Count", + //"process.working_set": "\\Process(w3wp*)\\Working Set", + //"process.private_bytes": "\\Process(w3wp*)\\Private Bytes", + //"process.virtual_bytes": "\\Process(w3wp*)\\Virtual Bytes", + //"process.page_faults_per_sec": "\\Process(w3wp*)\\Page Faults/sec", + //"process.io_read_operations_per_sec": "\\Process(w3wp*)\\IO Read Operations/sec", + //"process.io_write_operations_per_sec": "\\Process(w3wp*)\\IO Write Operations/sec", "net_clr.total_exceptions_thrown": "\\.NET CLR Exceptions(w3wp*)\\# of Exceps Thrown", "net_clr.exceptions_thrown_per_sec": "\\.NET CLR Exceptions(w3wp*)\\# of Exceps Thrown / sec", "net_clr.filters_per_sec": "\\.NET CLR Exceptions(w3wp*)\\# of Filters / sec", @@ -101,10 +101,10 @@ func (r *Reader) initAppPools() error { if err == pdh.PDH_CSTATUS_NO_COUNTER || err == pdh.PDH_CSTATUS_NO_COUNTERNAME || err == pdh.PDH_CSTATUS_NO_INSTANCE || err == pdh.PDH_CSTATUS_NO_OBJECT { r.log.Infow("Ignoring non existent counter", "error", err, logp.Namespace("application pool"), "query", value) - continue } else { - return errors.Wrapf(err, `failed to expand counter (query="%v")`, value) + r.log.Error(err, `failed to expand counter path (query= "%v")`, value) } + continue } newQueries = append(newQueries, childQueries...) // check if the pdhexpandcounterpath/pdhexpandwildcardpath functions have expanded the counter successfully. From 1d28431a1ae0ba3c282bb11a42254d399ad28252 Mon Sep 17 00:00:00 2001 From: Mariana Date: Mon, 14 Sep 2020 14:25:28 +0200 Subject: [PATCH 3/3] changelog --- CHANGELOG.next.asciidoc | 1 + .../module/iis/application_pool/reader.go | 20 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 27a2a77064e..84391e4ac76 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -341,6 +341,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Update fields.yml in the azure module, missing metrics field. {pull}20918[20918] - The `elasticsearch/index` metricset only requests wildcard expansion for hidden indices if the monitored Elasticsearch cluster supports it. {pull}20938[20938] - Disable Kafka metricsets based on Jolokia by default. They require a different configuration. {pull}20989[20989] +- Handle missing counters in the application_pool metricset. {pull}21071[21071] *Packetbeat* diff --git a/x-pack/metricbeat/module/iis/application_pool/reader.go b/x-pack/metricbeat/module/iis/application_pool/reader.go index 0273ac523ab..32c0c2d7ec3 100644 --- a/x-pack/metricbeat/module/iis/application_pool/reader.go +++ b/x-pack/metricbeat/module/iis/application_pool/reader.go @@ -45,16 +45,16 @@ type WorkerProcess struct { } var appPoolCounters = map[string]string{ - "process.pid": "\\Process(w3wp*)\\ID Process", - //"process.cpu_usage_perc": "\\Process(w3wp*)\\% Processor Time", - //"process.handle_count": "\\Process(w3wp*)\\Handle Count", - //"process.thread_count": "\\Process(w3wp*)\\Thread Count", - //"process.working_set": "\\Process(w3wp*)\\Working Set", - //"process.private_bytes": "\\Process(w3wp*)\\Private Bytes", - //"process.virtual_bytes": "\\Process(w3wp*)\\Virtual Bytes", - //"process.page_faults_per_sec": "\\Process(w3wp*)\\Page Faults/sec", - //"process.io_read_operations_per_sec": "\\Process(w3wp*)\\IO Read Operations/sec", - //"process.io_write_operations_per_sec": "\\Process(w3wp*)\\IO Write Operations/sec", + "process.pid": "\\Process(w3wp*)\\ID Process", + "process.cpu_usage_perc": "\\Process(w3wp*)\\% Processor Time", + "process.handle_count": "\\Process(w3wp*)\\Handle Count", + "process.thread_count": "\\Process(w3wp*)\\Thread Count", + "process.working_set": "\\Process(w3wp*)\\Working Set", + "process.private_bytes": "\\Process(w3wp*)\\Private Bytes", + "process.virtual_bytes": "\\Process(w3wp*)\\Virtual Bytes", + "process.page_faults_per_sec": "\\Process(w3wp*)\\Page Faults/sec", + "process.io_read_operations_per_sec": "\\Process(w3wp*)\\IO Read Operations/sec", + "process.io_write_operations_per_sec": "\\Process(w3wp*)\\IO Write Operations/sec", "net_clr.total_exceptions_thrown": "\\.NET CLR Exceptions(w3wp*)\\# of Exceps Thrown", "net_clr.exceptions_thrown_per_sec": "\\.NET CLR Exceptions(w3wp*)\\# of Exceps Thrown / sec", "net_clr.filters_per_sec": "\\.NET CLR Exceptions(w3wp*)\\# of Filters / sec",