Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 45 additions & 0 deletions changelog/fragments/1769821387-iis-add-cpu-number-information.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# REQUIRED
# Kind can be one of:
# - breaking-change: a change to previously-documented behavior
# - deprecation: functionality that is being removed in a later release
# - bug-fix: fixes a problem in a previous version
# - enhancement: extends functionality but does not break or fix existing behavior
# - feature: new functionality
# - known-issue: problems that we are aware of in a given version
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: feature

# REQUIRED for all kinds
# Change summary; a 80ish characters long description of the change.
summary: Adds cpu number information to iis module and windows perfmon dataset

# REQUIRED for breaking-change, deprecation, known-issue
# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# description:

# REQUIRED for breaking-change, deprecation, known-issue
# impact:

# REQUIRED for breaking-change, deprecation, known-issue
# action:

# REQUIRED for all kinds
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component: metricbeat

# AUTOMATED
# OPTIONAL to manually add other PR URLs
# PR URL: A link the PR that added the changeset.
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
# Please provide it if you are adding a fragment for a different PR.
# pr: https://github.com/owner/repo/1234

# AUTOMATED
# OPTIONAL to manually add other issue URLs
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
# If not present is automatically filled by the tooling with the issue linked to the PR number.
# issue: https://github.com/owner/repo/1234
18 changes: 18 additions & 0 deletions docs/reference/metricbeat/exported-fields-iis.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ iis module

Application pool process stats.

**`iis.application_pool.host.cpu.count`**
: Number of CPUs the host has

type: long


**`iis.application_pool.name`**
: application pool name

Expand Down Expand Up @@ -207,6 +213,12 @@ LocksAndThreads overview.

Webserver related metrics.

**`iis.webserver.host.cpu.count`**
: Number of CPUs the host has

type: long


## process [_process]

The process related stats.
Expand Down Expand Up @@ -531,6 +543,12 @@ The network related stats.

Website related metrics.

**`iis.website.host.cpu.count`**
: Number of CPUs the host has

type: long


**`iis.website.name`**
: website name

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,45 +32,30 @@ Here is an example document generated by this metricset:

```json
{
"@timestamp": "2017-10-12T08:05:34.853Z",
"@timestamp": "2026-01-31T00:26:10.412Z",
"event": {
"dataset": "iis.application_pool",
"duration": 115000,
"module": "iis"
"module": "iis",
"duration": 32222100
},
"iis": {
"application_pool": {
"name": "test.local",
"net_clr": {
"total_exceptions_thrown": 0,
"finallys_per_sec": 0,
"exceptions_thrown_per_sec": 0,
"locks_and_threads": {
"current_queue_length": 0,
"contention_rate_per_sec": 0
},
"memory": {
"gen_2_heap_size": 0,
"large_object_heap_size": 0,
"gen_1_heap_size": 0,
"gen_1_collections": 0,
"gen_0_heap_size": 0,
"bytes_in_all_heaps": 0,
"total_committed_bytes": 0,
"gen_0_collections": 0,
"gen_2_collections": 0,
"allocated_bytes_per_sec": 0,
"time_in_gc_perc": 0
},
"filters_per_sec": 0,
"throw_to_catch_depth_per_sec": 0
},
"name": "DefaultAppPool",
"process": {
"handle_count": 532,
"private_byte": 35258368,
"thread_count": 29,
"virtual_bytes": 667226112,
"working_set": 36044800
"working_set": 19296256,
"virtual_bytes": 2203429777408,
"page_faults_per_sec": 0,
"io_write_operations_per_sec": 0.500673761687841,
"private_bytes": 6021120,
"thread_count": 22,
"handle_count": 239,
"cpu_usage_perc": 1.5646088737165276,
"io_read_operations_per_sec": 0.500673761687841
},
"host": {
"cpu": {
"count": 16
}
}
}
},
Expand All @@ -79,7 +64,7 @@ Here is an example document generated by this metricset:
"period": 10000
},
"process": {
"pid": 748
"pid": 24056
},
"service": {
"type": "iis"
Expand Down
89 changes: 51 additions & 38 deletions docs/reference/metricbeat/metricbeat-metricset-iis-webserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,59 +40,72 @@ Here is an example document generated by this metricset:

```json
{
"@timestamp": "2017-10-12T08:05:34.853Z",
"@timestamp": "2026-01-31T00:26:01.417Z",
"event": {
"dataset": "iis.webserver",
"duration": 115000,
"module": "iis"
"module": "iis",
"duration": 1008973300
},
"iis": {
"webserver": {
"asp_net": {
"application_restarts": 0,
"request_wait_time": 0
"process": {
"virtual_bytes": 2203429777408,
"page_faults_per_sec": 0,
"io_write_operations_per_sec": 0.9948381826057318,
"working_set": 19296256,
"cpu_usage_perc": 1.5542392185533886,
"private_bytes": 6021120,
"handle_count": 239,
"thread_count": 22,
"io_read_operations_per_sec": 0.9948381826057318
},
"asp_net_application": {
"pipeline_instance_count": 3,
"requests_executing": 0,
"requests_in_application_queue": 0
"host": {
"cpu": {
"count": 16
}
},
"network": {
"total_connection_attempts": 6,
"anonymous_users_per_sec": 196.9779601559349,
"current_connections": 1,
"total_bytes_sent": 342999814,
"bytes_received_per_sec": 25607.134820271538,
"current_anonymous_users": 0,
"total_post_requests": 0,
"delete_requests_per_sec": 0,
"total_non_anonymous_users": 0,
"post_requests_per_sec": 0,
"total_bytes_received": 48402066,
"current_non_anonymous_users": 0,
"get_requests_per_sec": 196.9779601559349,
"maximum_connections": 1,
"total_anonymous_users": 372311,
"bytes_sent_per_sec": 181416.70130361605,
"total_delete_requests": 0,
"service_uptime": 82841,
"total_get_requests": 372311
},
"cache": {
"output_cache_current_items": 0,
"output_cache_total_hits": 0,
"total_files_cached": 9,
"uri_cache_misses": 24,
"maximum_file_cache_memory_usage": 696,
"current_file_cache_memory_usage": 696,
"current_files_cached": 2,
"current_uris_cached": 0,
"file_cache_hits": 1,
"file_cache_misses": 7,
"maximum_file_cache_memory_usage": 696,
"output_cache_current_items": 0,
"uri_cache_hits": 744596,
"file_cache_misses": 1489252,
"current_uris_cached": 2,
"output_cache_current_memory_usage": 0,
"output_cache_total_hits": 0,
"output_cache_total_misses": 8,
"total_files_cached": 2,
"total_uris_cached": 1,
"uri_cache_hits": 0,
"uri_cache_misses": 8
},
"network": {
"current_anonymous_users": 0,
"current_connections": 0,
"current_nonanonymous_users": 0,
"maximum_connections": 3,
"service_uptime": 343447,
"total_anonymous_users": 6,
"total_bytes_received": 2715,
"total_bytes_sent": 89432,
"total_connection_attempts": 4,
"total_delete_requests": 0,
"total_get_requests": 6,
"total_nonanonymous_users": 0,
"total_post_requests": 0
"output_cache_total_misses": 744620,
"file_cache_hits": 744615,
"total_uris_cached": 10
}
}
},
"metricset": {
"name": "webserver",
"period": 10000
"period": 10000,
"name": "webserver"
},
"service": {
"type": "iis"
Expand Down
36 changes: 21 additions & 15 deletions docs/reference/metricbeat/metricbeat-metricset-iis-website.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,38 @@ Here is an example document generated by this metricset:

```json
{
"@timestamp": "2017-10-12T08:05:34.853Z",
"@timestamp": "2026-01-31T00:26:03.136Z",
"event": {
"dataset": "iis.website",
"duration": 115000,
"module": "iis"
"module": "iis",
"duration": 1000299700
},
"iis": {
"website": {
"network": {
"bytes_sent_per_sec": 0,
"total_get_requests": 372352,
"post_requests_per_sec": 0,
"delete_requests_per_sec": 0,
"maximum_connections": 1,
"total_post_requests": 0,
"post_requests_per_sec": 0,
"total_connection_attempts": 1,
"service_uptime": 114161,
"get_requests_per_sec": 0,
"total_put_requests": 0,
"current_connections": 0,
"total_delete_requests": 0,
"bytes_received_per_sec": 0,
"bytes_sent_per_sec": 13811.723859100623,
"bytes_received_per_sec": 1949.53756968847,
"total_connection_attempts": 6,
"put_requests_per_sec": 0,
"total_bytes_sent": 944,
"total_get_requests": 1,
"delete_requests_per_sec": 0
"total_bytes_received": 48407396,
"total_put_requests": 0,
"service_uptime": 82843,
"total_bytes_sent": 343037575,
"get_requests_per_sec": 14.996442843757462,
"current_connections": 1
},
"name": "Default Web Site"
"name": "Default Web Site",
"host": {
"cpu": {
"count": 16
}
}
}
},
"metricset": {
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/windows/perfmon/perfmon.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package perfmon

import (
"fmt"
"runtime"

"github.com/elastic/beats/v7/metricbeat/mb/parse"

Expand Down Expand Up @@ -78,6 +79,7 @@ func (m *MetricSet) Fetch(report mb.ReporterV2) error {
}

for _, event := range events {
event.MetricSetFields.Put("host.cpu.count", runtime.NumCPU())
isOpen := report.Event(event)
if !isOpen {
break
Expand Down
Loading
Loading