Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Document kernelVersion analyser example and other updates #568

Merged
merged 2 commits into from
Jul 24, 2024
Merged
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
7 changes: 6 additions & 1 deletion docs/source/host-collect-analyze/hostOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ Example of the resulting JSON file:

The `hostOS` analyzer supports multiple outcomes by validating the name and version of the detected operating system. For example:

- `centos = 7`: The detected OS is CentOS 7.
- `centos = 7`: The detected OS is CentOS 7. `7` in this example is the platform version. The format here is `<platform> = <platformVersion>`
- `ubuntu = 20.04`: The detected OS is Ubuntu 20.04.
- `kernelVersion > 5.12.0`: Check if `kernelVersion` value in the JSON output, regardless of OS, is greater than 5.12.0
- `ubuntu-16.04-kernel >= 4.14`: Detect whether Ubuntu 16.04 has a kernel version greater or equal to `4.14`. This string follows `<platform>-<platformVersion>-kernel = <kernelVersion>` format.

### Example Analyzer Definition

Expand Down Expand Up @@ -75,4 +77,7 @@ spec:
- pass:
when: "ubuntu = 20.04"
message: "Ubuntu 20.04 is supported"
- pass:
when: "kernelVersion > 5.12.0"
message: "kernel version is supported"
```