mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-05 01:56:35 +00:00
readme & text changes
Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
This commit is contained in:
@@ -64,7 +64,7 @@ type textFileCollector struct {
|
|||||||
func newTextFileCollectorFlags(app *kingpin.Application) {
|
func newTextFileCollectorFlags(app *kingpin.Application) {
|
||||||
textFileDirectory = app.Flag(
|
textFileDirectory = app.Flag(
|
||||||
FlagTextFileDirectory,
|
FlagTextFileDirectory,
|
||||||
"Directory or Directories to read text files with metrics from.",
|
"DEPRECATED: Use --collector.textfile.directories",
|
||||||
).Default("").String()
|
).Default("").String()
|
||||||
textFileDirectories = app.Flag(
|
textFileDirectories = app.Flag(
|
||||||
FlagTextFileDirectories,
|
FlagTextFileDirectories,
|
||||||
|
|||||||
@@ -11,14 +11,24 @@ Enabled by default? | Yes
|
|||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
### `--collector.textfile.directory`
|
### `--collector.textfile.directory`
|
||||||
|
:warning: DEPRECATED Use `--collector.textfile.directories`
|
||||||
|
|
||||||
The directory containing the files to be ingested. Only files with the extension `.prom` are read. The `.prom` file must end with an empty line feed to work properly.
|
<br>
|
||||||
|
|
||||||
|
### `--collector.textfile.directories`
|
||||||
|
One or multiple directories containing the files to be ingested.
|
||||||
|
|
||||||
|
E.G. `--collector.textfile.directories="C:\MyDir1,C:\MyDir2"`
|
||||||
|
|
||||||
Default value: `C:\Program Files\windows_exporter\textfile_inputs`
|
Default value: `C:\Program Files\windows_exporter\textfile_inputs`
|
||||||
|
|
||||||
Required: No
|
Required: No
|
||||||
|
|
||||||
## Metrics
|
> **Note:**
|
||||||
|
> - If there are duplicated filenames among the directories, only the first one found will be read. For any other files with the same name, the `windows_textfile_scrape_error` metric will be set to 1 and a error message will be logged.
|
||||||
|
> - Only files with the extension `.prom` are read. The `.prom` file must end with an empty line feed to work properly.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Metrics will primarily come from the files on disk. The below listed metrics
|
Metrics will primarily come from the files on disk. The below listed metrics
|
||||||
are collected to give information about the reading of the metrics themselves.
|
are collected to give information about the reading of the metrics themselves.
|
||||||
@@ -38,7 +48,7 @@ _This collector does not yet have any useful queries added, we would appreciate
|
|||||||
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
||||||
|
|
||||||
# Example use
|
# Example use
|
||||||
This Powershell script, when run in the `collector.textfile.directory` (default `C:\Program Files\windows_exporter\textfile_inputs`), generates a valid `.prom` file that should successfully ingested by windows_exporter.
|
This Powershell script, when run in the `--collector.textfile.directories` (default `C:\Program Files\windows_exporter\textfile_inputs`), generates a valid `.prom` file that should successfully ingested by windows_exporter.
|
||||||
|
|
||||||
```Powershell
|
```Powershell
|
||||||
$alpha = 42
|
$alpha = 42
|
||||||
|
|||||||
Reference in New Issue
Block a user