From 347759933fd2b492cb195a0d06c901a77b4e123a Mon Sep 17 00:00:00 2001 From: MarNicGit <47538428+MarNicGit@users.noreply.github.com> Date: Tue, 18 Oct 2022 10:27:57 +0200 Subject: [PATCH 1/2] Update collector.process.md Documented IIS worker process apppool matching. Discovered this feature at [process.go:221](https://github.com/prometheus-community/windows_exporter/blob/eb73859393991318a6ae08da53f863cee4a9d2a1/collector/process.go#L221). This also solves issue #1074. Signed-off-by: MarNicGit <47538428+MarNicGit@users.noreply.github.com> --- docs/collector.process.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/collector.process.md b/docs/collector.process.md index 500b209b7..404ce0dbf 100644 --- a/docs/collector.process.md +++ b/docs/collector.process.md @@ -1,6 +1,6 @@ -# process collector +# Process collector -The process collector exposes metrics about processes +The process collector exposes metrics about processes. ||| -|- @@ -37,6 +37,21 @@ To specify multiple names, use the pipe `|` character: ``` This will match all processes named `firefox`, `FIREFOX` or `chrome` . +## IIS Worker processes + +The process collector also queries the `root\\WebAdministration` WMI namespace to check for running IIS workers. If it succesfully retrieves a list from this namespace, it will append the name of the worker's application pool to the corresponding process. Whitelist/blacklist matching occurs before this name is appended, so you don't have to take this name in consideration when writing your expression. + +Note that this specific feature **only works** if the [IIS Management Scripts and Tools](https://learn.microsoft.com/en-us/iis/manage/scripting/managing-sites-with-the-iis-wmi-provider) are installed. If they are not installed then all worker processes return as just `w3wp`. + +### Example + +Given an IIS server with two websites called "Prometheus.io" and "Example.com" running under the application pools "Public website" and "Test", the process names returned will look as follows: + +``` +w3wp_Public website +w3wp_Test +``` + ## Metrics Name | Description | Type | Labels From 8f8369a35683a431391fed2c09753a8b83f6a053 Mon Sep 17 00:00:00 2001 From: MarNicGit <47538428+MarNicGit@users.noreply.github.com> Date: Tue, 18 Oct 2022 10:33:40 +0200 Subject: [PATCH 2/2] Fixed spelling error Signed-off-by: MarNicGit <47538428+MarNicGit@users.noreply.github.com> --- docs/collector.process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/collector.process.md b/docs/collector.process.md index 404ce0dbf..0d9bf5595 100644 --- a/docs/collector.process.md +++ b/docs/collector.process.md @@ -39,7 +39,7 @@ This will match all processes named `firefox`, `FIREFOX` or `chrome` . ## IIS Worker processes -The process collector also queries the `root\\WebAdministration` WMI namespace to check for running IIS workers. If it succesfully retrieves a list from this namespace, it will append the name of the worker's application pool to the corresponding process. Whitelist/blacklist matching occurs before this name is appended, so you don't have to take this name in consideration when writing your expression. +The process collector also queries the `root\\WebAdministration` WMI namespace to check for running IIS workers. If it successfully retrieves a list from this namespace, it will append the name of the worker's application pool to the corresponding process. Whitelist/blacklist matching occurs before this name is appended, so you don't have to take this name in consideration when writing your expression. Note that this specific feature **only works** if the [IIS Management Scripts and Tools](https://learn.microsoft.com/en-us/iis/manage/scripting/managing-sites-with-the-iis-wmi-provider) are installed. If they are not installed then all worker processes return as just `w3wp`.