Skip to content

Commit e373daa

Browse files
Merge branch 'main' into fix/s3-poller-backup-delete
2 parents 826a574 + 8e39946 commit e373daa

33 files changed

Lines changed: 844 additions & 268 deletions

NOTICE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12840,11 +12840,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1284012840

1284112841
--------------------------------------------------------------------------------
1284212842
Dependency : github.com/elastic/go-quark
12843-
Version: v0.3.0
12843+
Version: v0.6.0
1284412844
Licence type (autodetected): Apache-2.0
1284512845
--------------------------------------------------------------------------------
1284612846

12847-
Contents of probable licence file $GOMODCACHE/github.com/elastic/go-quark@v0.3.0/LICENSE.txt:
12847+
Contents of probable licence file $GOMODCACHE/github.com/elastic/go-quark@v0.6.0/LICENSE.txt:
1284812848

1284912849

1285012850
Apache License

changelog/fragments/1776242399-filestream-include-file-fingerprint-opt-in.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
kind: enhancement
2+
summary: "Filestream: include_file_fingerprint controls log.file.fingerprint in events."
3+
description: |
4+
Add an `include_file_fingerprint` option (default: `true`) to the filestream
5+
input. By default `log.file.fingerprint` is included in published events when
6+
`file_identity.fingerprint` is configured, preserving the previous behaviour.
7+
Set `include_file_fingerprint: false` to omit the field and reduce network,
8+
indexing, and storage costs at scale. A still-growing fingerprint is never
9+
added to events; only the completed SHA-256 is published.
10+
component: filebeat
11+
pr: https://github.com/elastic/beats/pull/50129
12+
issue: https://github.com/elastic/beats/issues/50724
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
kind: enhancement
2+
summary: Add Filestream harvester metrics to monitoring logs
3+
description: |
4+
The following Filestream metrics are added to the logs and the `/stats` HTTP endpoint:
5+
- files_ingested_percent_100
6+
- files_ingested_percent_95_99
7+
- files_ingested_percent_lt_95
8+
9+
These gauges are aggregated across all running Filestream inputs and
10+
count active plain-file harvesters only.
11+
12+
component: filebeat
13+
issue: https://github.com/elastic/beats/issues/36653
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: enhancement
2+
summary: update quark to 0.6.0
3+
component: auditbeat

docs/reference/filebeat/faq-deleted-files-are-not-freed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ applies_to:
1010

1111
In the default behaviour, Filebeat opens the files and keeps them open until it reaches the end of them. In situations when the configured output is blocked (e.g. {{es}} or {{ls}} is unavailable) for a long time, this can cause Filebeat to keep file handlers to files that were deleted from the file system in the mean time. As long as Filebeat keeps the deleted files open, the operating system doesn’t free up the space on disk, which can lead to increase disk utilisation or even out of disk situations.
1212

13-
To mitigate this issue, you can set the [`close_timeout`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-close-timeout) setting to `5m`. This will ensure every file handler is closed once every 5 minutes, regardless of whether it reached EOF or not. Note that this option can lead to data loss if the file is deleted before Filebeat reaches the end of the file.
13+
To mitigate this issue, you can set the [`close.reader.after_interval`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-close-timeout) setting to `5m`. This will ensure every file handler is closed once every 5 minutes, regardless of whether it reached EOF or not. Note that this option can lead to data loss if the file is deleted before Filebeat reaches the end of the file.
1414

docs/reference/filebeat/filebeat-cpu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ applies_to:
88

99
# Filebeat is using too much CPU [filebeat-cpu]
1010

11-
Filebeat might be configured to scan for files too frequently. Check the setting for `scan_frequency` in the `filebeat.yml` config file. Setting `scan_frequency` to less than 1s may cause Filebeat to scan the disk in a tight loop.
11+
Filebeat might be configured to scan for files too frequently. Check the setting for [`prospector.scanner.check_interval`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-scan-frequency)) in the `filebeat.yml` config file. Setting `prospector.scanner.check_interval` to less than 1s may cause Filebeat to scan the disk in a tight loop.
1212

docs/reference/filebeat/filebeat-input-filestream.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,14 @@ file_identity.fingerprint: ~
441441

442442
`growing` {applies_to}`stack: ga 9.5.0+`
443443
: When `true` (default), files smaller than the fingerprint size (`offset` + `length`) are tracked using the bytes available so far, instead of being skipped until they grow large enough. Once a file reaches the fingerprint size, it's automatically migrated to the regular SHA-256 fingerprint, with no data duplication. Refer to [Enhanced fingerprint](/reference/filebeat/file-identity.md#file-identity-fingerprint-growing) for details.
444-
444+
445445
Set to `false` to restore the pre-9.5 behavior.
446446

447447
```yaml
448448
file_identity.fingerprint:
449449
growing: true
450450
```
451-
451+
452452

453453
**`native`**
454454
: Differentiates between files using their inodes and device IDs. This is the default file identity in Filebeat versions prior to 9.0.0.
@@ -723,7 +723,7 @@ This option is not supported on Windows.
723723
```yaml {applies_to}
724724
stack: ga 9.5.0
725725
```
726-
Controls whether `log.file.fingerprint` is added to published events. Only takes effect when `file_identity.fingerprint` is configured. Defaults to `false`. The file path (`log.file.path`) is always present in events regardless of this setting.
726+
Controls whether `log.file.fingerprint` is added to published events. Only takes effect when `file_identity.fingerprint` is configured. Defaults to `true`. The file path (`log.file.path`) is always present in events regardless of this setting.
727727

728728
### `exclude_lines` [filebeat-input-filestream-exclude-lines]
729729

@@ -1371,22 +1371,28 @@ Note: Each metric listed has a corresponding gzip_* counterpart (e.g.,
13711371
the same data but exclusively for GZIP compressed files. The original metrics
13721372
provide the total count, including both plain and GZIP files.
13731373

1374-
### Harvester metrics [_harvester_metrics]
1374+
### Scanner and harvester metrics [_harvester_metrics]
13751375

13761376
```{applies_to}
13771377
stack: ga 9.5+
13781378
```
13791379

1380-
The `filestream` input also exposes scanner metrics under
1380+
The `filestream` input also exposes scanner and harvester progress metrics under
13811381
`.monitoring.metrics.filebeat.filestream` in monitoring logs and under
13821382
`filebeat.filestream` in the `/stats` HTTP endpoint output. These metrics are
13831383
aggregate gauges across all running `filestream` inputs. They are updated after
1384-
each scanner pass and reset when inputs stop.
1384+
each scanner pass and reset when inputs stop. Harvester progress metrics measure
1385+
how much data active plain-file harvesters have read from their files. They do
1386+
not measure output publishing or acknowledgment progress. GZIP files and files
1387+
ignored by `filestream` settings or state are excluded.
13851388

13861389
| Metric | Description |
13871390
| --- | --- |
13881391
| `files_empty` | Number of matched files that are empty. |
13891392
| `files_ignored` | Number of matched files ignored by `filestream` settings or state, such as `prospector.scanner.exclude_files`, `ignore_older`, or `ignore_inactive`. |
1393+
| `files_ingested_percent_100` | Number of active plain-file harvesters whose read offset is at or beyond the scanner-observed file size. |
1394+
| `files_ingested_percent_95_99` | Number of active plain-file harvesters whose read offset is at least 95% and less than 100% of the scanner-observed file size. |
1395+
| `files_ingested_percent_lt_95` | Number of active plain-file harvesters whose read offset is less than 95% of the scanner-observed file size. |
13901396
| `files_matched` | Number of filesystem path matches returned by the configured `paths` globs before duplicate, ignore, and ingestibility filtering. |
13911397
| `files_no_ingest_target` | Number of matched non-empty files that did not produce an ingest target, such as duplicate matches, files that are too small to fingerprint or symlinks to already known files. |
13921398
| `files_unique` | Number of unique files that produced ingest targets after scanner filtering and de-duplication. |

docs/reference/filebeat/filebeat-not-collecting-lines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ applies_to:
1111
Filebeat might be incorrectly configured or unable to send events to the output. To resolve the issue:
1212

1313
* If using modules, make sure the `var.paths` setting points to the file. If configuring an input manually, make sure the `paths` setting is correct.
14-
* Verify that the file is not older than the value specified by [`ignore_older`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-ignore-older). `ignore_older` is disable by default so this depends on the value you have set. You can change this behavior by specifying a different value for [`ignore_older`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-ignore-older).
14+
* Verify that the file is not older than the value specified by [`ignore_older`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-ignore-older). `ignore_older` is disabled by default so this depends on the value you have set. You can change this behavior by specifying a different value for [`ignore_older`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-ignore-older).
1515
* Make sure that Filebeat is able to send events to the configured output. Run Filebeat in debug mode to determine whether it’s publishing events successfully:
1616

1717
```sh

docs/reference/filebeat/open-file-handlers.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ applies_to:
88

99
# Too many open file handlers [open-file-handlers]
1010

11-
Filebeat keeps the file handler open in case it reaches the end of a file so that it can read new log lines in near real time. If Filebeat is harvesting a large number of files, the number of open files can become an issue. In most environments, the number of files that are actively updated is low. The `close_inactive` configuration option should be set accordingly to close files that are no longer active.
11+
Filebeat keeps the file handler open in case it reaches the end of a file so that it can read new log lines in near real time. If Filebeat is harvesting a large number of files, the number of open files can become an issue. In most environments, the number of files that are actively updated is low. The [`close.on_state_change.inactive`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-close-inactive) configuration option should be set accordingly to close files that are no longer active.
1212

1313
There are additional configuration options that you can use to close file handlers, but all of them should be used carefully because they can have side effects. The options are:
1414

15-
* [`close_renamed`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-close-renamed)
16-
* [`close_removed`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-close-removed)
17-
* [`close_eof`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-close-eof)
18-
* [`close_timeout`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-close-timeout)
19-
* [`harvester_limit`](/reference/filebeat/filebeat-input-log.md#filebeat-input-log-harvester-limit)
15+
* [`close.on_state_change.renamed`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-close-renamed)
16+
* [`close.on_state_change.removed`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-close-removed)
17+
* [`close.reader.on_eof`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-close-eof)
18+
* [`close.reader.after_interval`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-close-timeout)
19+
* [`harvester_limit`](/reference/filebeat/filebeat-input-filestream.md#filebeat-input-filestream-harvester-limit)
2020

21-
The `close_renamed` and `close_removed` options can be useful on Windows to resolve issues related to file rotation. See [Open file handlers cause issues with Windows file rotation](/reference/filebeat/windows-file-rotation.md). The `close_eof` option can be useful in environments with a large number of files that have only very few entries. The `close_timeout` option is useful in environments where closing file handlers is more important than sending all log lines. For more details, see [Inputs](/reference/filebeat/configuration-filebeat-options.md).
21+
The `close.on_state_change.renamed` and `close.on_state_change.removed` options can be useful on Windows to resolve issues related to file rotation. See [Open file handlers cause issues with Windows file rotation](/reference/filebeat/windows-file-rotation.md). The `close.reader.on_eof` option can be useful in environments with a large number of files that have only very few entries. The `close.reader.after_interval` option is useful in environments where closing file handlers is more important than sending all log lines. For more details, see [Inputs](/reference/filebeat/configuration-filebeat-options.md).
2222

2323
Make sure that you read the documentation for these configuration options before using any of them.
24-

0 commit comments

Comments
 (0)