mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-15 01:16:35 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7890c9ce91 | ||
|
|
bcb6f2b218 | ||
|
|
91a64fecb8 | ||
|
|
9148728b87 | ||
|
|
2290969596 |
@@ -97,11 +97,9 @@ The prometheus metrics will be exposed on [localhost:9182](http://localhost:9182
|
|||||||
|
|
||||||
### Enable only process collector and specify a custom query
|
### Enable only process collector and specify a custom query
|
||||||
|
|
||||||
.\wmi_exporter.exe --collectors.enabled "process" --collector.process.processes-where "Name LIKE 'firefox%'"
|
.\wmi_exporter.exe --collectors.enabled "process" --collector.process.whitelist="firefox.+"
|
||||||
|
|
||||||
When there are multiple processes with the same name, WMI represents those after the first instance as `process-name#index`. So to get them all, rather than just the first one, the query needs to be a wildcard search using a `%` character.
|
When there are multiple processes with the same name, WMI represents those after the first instance as `process-name#index`. So to get them all, rather than just the first one, the [regular expression](https://en.wikipedia.org/wiki/Regular_expression) must use `.+`. See [process](docs/collector.process.md) for more information.
|
||||||
|
|
||||||
Please note that in Windows batch scripts (and when using the `cmd` command prompt), the `%` character is reserved, so it has to be escaped with another `%`. For example, the wildcard syntax for searching for all firefox processes is `firefox%%`.
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
registerCollector("adfs", newADFSCollector)
|
registerCollector("adfs", newADFSCollector, "AD FS")
|
||||||
}
|
}
|
||||||
|
|
||||||
type adfsCollector struct {
|
type adfsCollector struct {
|
||||||
|
|||||||
@@ -26,9 +26,17 @@ metrics.
|
|||||||
### Example
|
### Example
|
||||||
To match all firefox processes: `--collector.process.whitelist="firefox.+"`.
|
To match all firefox processes: `--collector.process.whitelist="firefox.+"`.
|
||||||
Note that multiple processes with the same name will be disambiguated by
|
Note that multiple processes with the same name will be disambiguated by
|
||||||
Windows by adding a number suffix, such as `firefox#2`. Your regexp must take
|
Windows by adding a number suffix, such as `firefox#2`. Your [regexp](https://en.wikipedia.org/wiki/Regular_expression) must take
|
||||||
these suffixes into consideration.
|
these suffixes into consideration.
|
||||||
|
|
||||||
|
:warning: The regexp is case-sensitive, so `--collector.process.whitelist="FIREFOX.+"` will **NOT** match a process named `firefox` .
|
||||||
|
|
||||||
|
To specify multiple names, use the pipe `|` character:
|
||||||
|
```
|
||||||
|
--collector.process.whitelist="firefox.+|FIREFOX.+|chrome.+"
|
||||||
|
```
|
||||||
|
This will match all processes named `firefox`, `FIREFOX` or `chrome` .
|
||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
Name | Description | Type | Labels
|
Name | Description | Type | Labels
|
||||||
|
|||||||
Reference in New Issue
Block a user