Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ This section includes:

* <<endpoint-diagnostic-data>>
* <<self-healing-rollback>>
* <<linux-file-monitoring>>

[discrete]
[[save-policy]]
Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ include::install-elastic-endpoint.asciidoc[leveloffset=+1]
include::configure-integration-policy.asciidoc[leveloffset=+1]
include::endpoint-diagnostic-data.asciidoc[leveloffset=+2]
include::self-healing-rollback.asciidoc[leveloffset=+2]
include::linux-file-monitoring.asciidoc[leveloffset=+2]
include::threat-intel-integrations.asciidoc[leveloffset=+1]
include::advanced-setting.asciidoc[leveloffset=+1]
include::uninstall-endpoint.asciidoc[leveloffset=+1]
80 changes: 80 additions & 0 deletions docs/getting-started/linux-file-monitoring.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[[linux-file-monitoring]]
= Configure Linux file system monitoring

By default, {endpoint-cloud-sec} monitors specific Linux file system types that Elastic has tested for compatibility. If your network includes nonstandard, proprietary, or otherwise unrecognized Linux file systems, you can configure the integration policy to extend monitoring and protections to those additional file systems. You can also have {endpoint-cloud-sec} ignore unrecognized file system types if they don't require monitoring or cause unexpected problems.

CAUTION: Ignoring file systems can create gaps in your security coverage. Use additional security layers for any file systems ignored by {endpoint-cloud-sec}.

To monitor or ignore additional file systems, configure the following advanced settings related to *fanotify*, a Linux feature that monitors file system events. Go to *Manage* -> *Policies*, click a policy's name, then scroll down and select *Show advanced settings*.

NOTE: Even when configured to monitor all file systems (`ignore_unknown_filesystems` is `false`), {endpoint-cloud-sec} will still ignore specific file systems that Elastic has internally identified as incompatible. The following settings apply to any _other_ file systems.

[[ignore-unknown-filesystems]]
`linux.advanced.fanotify.ignore_unknown_filesystems`:: Determines whether to ignore unrecognized file systems. Enter one of the following:
+
--
* `true`: (Default) Monitor only Elastic-tested file systems, and ignore all others. You can still monitor or ignore specific file systems with `monitored_filesystems` and `ignored_filesystems`, respectively.

* `false`: Monitor all file systems. You can still ignore specific file systems with `ignored_filesystems`.
--
+
NOTE: If you've upgraded from 8.3 or earlier, this value will be `false` for backwards compatibility. If you don't need to monitor additional file systems, it's recommended to change `ignore_unknown_filesystems` to `true` after upgrading.

[[monitored-filesystems]]
`linux.advanced.fanotify.monitored_filesystems`:: Specifies additional file systems to monitor. Enter a comma-separated list of <<find-file-system-names,file system names>> as they appear in `/proc/filesystems` (for example: `jfs,ufs,ramfs`).
+
NOTE: It's recommended to avoid monitoring network-backed file systems.
+
This setting isn't recognized if `ignore_unknown_filesystems` is `false`, since that would mean you're already monitoring _all_ file systems.
+
Entries in this setting are overridden by entries in `ignored_filesystems`.

[[ignored-filesystems]]
`linux.advanced.fanotify.ignored_filesystems`:: Specifies additional file systems to ignore. Enter a comma-separated list of <<find-file-system-names,file system names>> as they appear in `/proc/filesystems` (for example: `ext4,tmpfs`).
+
Entries in this setting override entries in `monitored_filesystems`.

[[find-file-system-names]]
== Find file system names

This section provides a few ways to determine the file system names needed for `linux.advanced.fanotify.monitored_filesystems` and `linux.advanced.fanotify.ignored_filesystems`.

In a typical setup, when you install {agent}, {filebeat} is installed alongside {elastic-endpoint} and will automatically ship {elastic-endpoint} logs to {es}. {elastic-endpoint} will generate a log message about the file that was scanned when an event occurs.

To find the system file name:

. From the Hosts page (*Explore* -> *Hosts*), search for `message: "Current sync path"` to reveal the file path.

. If you have access to the endpoint, run `findmnt -o FSTYPE -T <file path>` to return the file system. For example:
+
[source,shell]
----
> findmnt -o FSTYPE -T /etc/passwd
FSTYPE
ext4
----
+
This returns the file system name as `ext4`.

Alternatively, you can also find the file system name by correlating data from two other log messages:

. Search the logs for `message: "Current fdinfo"` to reveal the `mnt_id` value of the file path. In this example, the `mnt_id` value is `29`:
+
[source,shell]
----
pos: 12288
flags: 02500002
mnt_id: 29
ino: 2367737
----

. Search the logs for `message: "Current mountinfo"` to reveal the file system that corresponds to the `mnt_id` value you found in the previous step:
+
[source,shell]
----
<snip>
29 1 8:2 / / rw,relatime shared:1 - ext4 /dev/sda2 rw,errors=remount-ro
<snip>
----
+
The first number, `29`, is the `mnt_id`, and the first field after the hyphen (`-`) is the file system name, `ext4`.
20 changes: 19 additions & 1 deletion docs/troubleshooting/management/ts-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,25 @@ TIP: If the {endpoint-cloud-sec} integration policy is not the cause of the `Unh
.Disabled to avoid potential system deadlock (Linux)
[%collapsible]
====
This section is a placeholder for future documentation.
If you have an `Unhealthy` {agent} status with the message `Disabled due to potential system deadlock`, that means malware protection was disabled on the {endpoint-cloud-sec} integration policy due to errors while monitoring a Linux host.

You can resolve the issue by configuring the policy's <<linux-file-monitoring,advanced settings>> related to *fanotify*, a Linux feature that monitors file system events. By default, {endpoint-cloud-sec} works with fanotify to monitor specific file system types that Elastic has tested for compatibility, and ignores other unknown file system types.

If your network includes nonstandard, proprietary, or otherwise unrecognized Linux file systems that cause errors while being monitored, you can configure {endpoint-cloud-sec} to ignore those file systems. This allows {endpoint-cloud-sec} to resume monitoring and protecting the hosts on the integration policy.

CAUTION: Ignoring file systems can create gaps in your security coverage. Use additional security layers for any file systems ignored by {endpoint-cloud-sec}.

To resolve the potential system deadlock error:

. Go to *Manage* -> *Policies*, then click a policy's name.

. Scroll to the bottom of the policy and click *Show advanced settings*.

. In the setting `linux.advanced.fanotify.ignored_filesystems`, enter a comma-separated list of file system names to ignore, as they appear in `/proc/filesystems` (for example: `ext4,tmpfs`). Refer to <<find-file-system-names>> for more on determining the file system names.

. Click *Save*.
+
Once you save the policy, malware protection is re-enabled.
====

[discrete]
Expand Down