File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 62
62
type: file
63
63
path: /var/log/sample.log
64
64
readall: false
65
+ poll_interval_seconds: 5 # should not be needed in most cases, see below
65
66
` ` `
66
67
67
68
The `readall` flag defines if `grok_exporter` starts reading from the beginning or the end of the file.
@@ -70,6 +71,15 @@ True is good for debugging, because we process all available log lines.
70
71
False is good for production, because we avoid to process lines multiple times when `grok_exporter` is restarted.
71
72
The default value for `readall` is `false`.
72
73
74
+ On `poll_interval_seconds` : You probably don't need this. The internal implementation of `grok_exporter`'s
75
+ file input is based on the operating system's file system notification mechanism, which is `inotify` on Linux,
76
+ ` kevent` on BSD (or macOS), and `ReadDirectoryChangesW` on Windows. These tools will inform `grok_exporter` as
77
+ soon as a new log line is written to the log file, and let `grok_exporter` sleep as long as the log file doesn't
78
+ change. There is no need for configuring a poll interval. However, there is one combination where the above
79
+ notifications don't work : If the logging application keeps the logfile open and the underlying file system is NTFS
80
+ (see [#17](https://github.com/fstab/grok_exporter/issues/17)). For this specific case you can configure a
81
+ ` poll_interval_seconds` . This will disable file system notifications and instead check the log file periodically.
82
+
73
83
# ## Stdin Input Type
74
84
75
85
The configuration for the `stdin` input type does not have any additional parameters :
Original file line number Diff line number Diff line change 10
10
cd $GOPATH /src/github.com/fstab/grok_exporter
11
11
rm -rf dist
12
12
13
- export VERSION=0.2.2-SNAPSHOT
13
+ export VERSION=0.2.2
14
14
15
15
export VERSION_FLAGS=" \
16
16
-X github.com/fstab/grok_exporter/exporter.Version=$VERSION \
You can’t perform that action at this time.
0 commit comments