You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The command has checked 2 pos entries for duplication check.
198
-
* The command has checked 2 files for collection ratio check.
199
-
* It is detected that the version of your Fluentd is v1.15.0.
200
-
* There is no anomalies.
201
-
202
-
#### Pos duplication found
203
-
204
-
```
205
-
Check /path/to/pos.
206
-
Done duplication check for 3 PosEntries.
207
-
Duplicated PosEntries are found. This is a known log missing issue that was fixed in Fluentd v1.16.3 (fluent-package v5.0.2, td-agent v4.5.2). If you are using any version older than these, updating Fluentd will resolve the issue.
208
-
Duplicated paths:
209
-
/test/foo.log
210
-
Done collection ratio check for 0 files.
211
-
212
-
All check completed. (Fluentd v1.15.0)
213
-
Some anomalies are found. Please check the logs for details.
214
-
If you have any questions or issues, please report them to the following:
About this command (日本語可): https://github.com/clear-code/fluent-tail_checker/issues
218
-
```
219
-
220
-
In this case, some the pos entries are duplicated.
221
-
It is a known log missing issue that was fixed in Fluentd v1.16.3.
222
-
223
-
> *https://github.com/fluent/fluentd/issues/3614
224
-
> * In case `follow_inodes false` (default setting), collection of a file may stop and continue to stop after log rotation.
225
-
> * Fixed since Fluentd v1.16.3 (fluent-package v5.0.2, td-agent v4.5.2).
91
+
### Result examples
226
92
227
-
So, you should check whether there is any log missing, and consider updating Fluentd, especially, if you are using any version older than Fluentd v1.16.3 (fluent-package v5.0.2, td-agent v4.5.2).
228
-
229
-
#### Too low collection ratio file found
230
-
231
-
```
232
-
Check /path/to/pos.
233
-
Done duplication check for 2 PosEntries.
234
-
Done collection ratio check for 2 files.
235
-
Collection ratio of some files are too low. Collection of those files may not be keeping up. Or it may have stopped with some anomalies. This can be a known log missing issue of the follow_inodes feature that was fixed in Fluentd v1.16.2 (fluent-package v5.0.0, td-agent v4.5.1). If you are using any version older than these, updating Fluentd will resolve the issue.
236
-
Filepaths with too low collection ratio (threshold: 0.5):
237
-
/test/bar.log (ratio: 0.2)
238
-
/test/foo.log (ratio: 0.1)
239
-
240
-
All check completed. (Fluentd v1.15.0)
241
-
Some anomalies are found. Please check the logs for details.
242
-
If you have any questions or issues, please report them to the following:
About this command (日本語可): https://github.com/clear-code/fluent-tail_checker/issues
246
-
```
247
-
248
-
In this case, collection ratio of some target files are too low.
249
-
Collection of those files may have stopped or may not be keeping up.
250
-
251
-
> /test/bar.log (ratio: 0.2)
252
-
253
-
This means that only 20% of the data of the file is collected for the filesize.
254
-
If it is not keeping up temporarily, then it is no problem.
255
-
If this is always the case, or if collection has stopped completely, then log missing may occur.
256
-
257
-
Especially, if the `in_tail` uses [follow_inodes](https://docs.fluentd.org/input/tail#follow_inodes), there is a known log missing issue that was fixed in Fluentd v1.16.2.
258
-
259
-
> *https://github.com/fluent/fluentd/issues/4190
260
-
> * In case `follow_inodes true`, collection of a file may stop and continue to stop after log rotation.
261
-
> * Fixed since Fluentd v1.16.2 (fluent-package v5.0.0, td-agent v4.5.1).
262
-
263
-
Please consider updating Fluentd if you are using any version older than Fluentd v1.16.2 (td-agent v4.5.1).
93
+
*[Result examples](doc/result-examples.md)
264
94
265
95
## Feature
266
96
267
-
`fluent-tailcheck` performs the following checks on the specified pos file.
268
-
269
-
* duplication check
270
-
* collection ratio check
271
-
272
-
### Duplication check
273
-
274
-
`fluent-tailcheck` checks whether there is any dulication in the specified pos files.
275
-
276
-
The keys of watching pos entries in one pos file must be unique.
277
-
278
-
By default, the key is the path of the target log file.
279
-
When using [follow_inodes](https://docs.fluentd.org/input/tail#follow_inodes), the key is the inode.
280
-
281
-
If duplication occurs, it means some anomalies occurs in that `in_tail`.
282
-
Especially, the following log missing issue causes this duplication.
283
-
284
-
> *https://github.com/fluent/fluentd/issues/3614
285
-
> * In case `follow_inodes false` (default setting), collection of a file may stop and continue to stop after log rotation.
286
-
> * Fixed since Fluentd v1.16.3 (fluent-package v5.0.2, td-agent v4.5.2).
287
-
288
-
### Collection ratio check
289
-
290
-
`fluent-tailcheck` checks collection ratio of each watching pos entry.
291
-
292
-
By default, `fluent-tailcheck` detects log files that have not been collected up to 50% of the filesize.
293
-
You can change this threshold by `--ratio` option.
294
-
Please see `Usage` section for details.
295
-
296
-
If this it too low, collection of those files may not be keeping up.
297
-
Or it may have stopped with some anomalies.
298
-
299
-
Especially, if the `in_tail` uses [follow_inodes](https://docs.fluentd.org/input/tail#follow_inodes), there is a known log missing issue that was fixed in Fluentd v1.16.2.
300
-
301
-
> *https://github.com/fluent/fluentd/issues/4190
302
-
> * In case `follow_inodes true`, collection of a file may stop and continue to stop after log rotation.
303
-
> * Fixed since Fluentd v1.16.2 (fluent-package v5.0.0, td-agent v4.5.1).
304
-
305
-
#### Limitation
306
-
307
-
`fluent-tailcheck` checks the sizes of logfiles based on the paths recorded in the pos files (except already unwatched pos entries).
308
-
309
-
However, if using `--follow-inodes`, there is a restriction on which files can be checked.
310
-
If using `--follow-inodes`, it is possible that `fluent-tailcheck` can not check the already rotated logfiles even if they are recorded in the pos files and are not unwatched yet.
311
-
Since the path recorded in the pos file is not updated after log rotation, the current path and inode may differ.
312
-
`fluent-tailcheck` checks only log files whose path and inode in the pos file match.
313
-
At least, it can check the current log files.
314
-
315
-
If not using `--follow-inodes`, this limitation does not exist.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
0 commit comments