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

Fix the range examples from the docs #2241

Merged
merged 3 commits into from
Aug 11, 2016
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
38 changes: 21 additions & 17 deletions libbeat/docs/processors-config.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ For example, the following condition checks if the response code of the HTTP tra
[source,yaml]
-------
equals:
http.code: 200
http.response.code: 200
-------

[[condition-contains]]
Expand All @@ -111,12 +111,12 @@ contains:

The `regexp` condition checks the field against a regular expression. The condition accepts only strings.

For example, the following condition checks if the process name contains `foo`:
For example, the following condition checks if the process name starts with `foo`:

[source,yaml]
-----
reqexp:
proc.name: "foo.*"
system.process.name: "foo.*"
-----

[[condition-range]]
Expand All @@ -125,28 +125,32 @@ reqexp:
The `range` condition checks if the field is in a certain range of values. The condition supports `lt`, `lte`, `gt` and `gte`. The
condition accepts only integer or float values.

For example, the following condition checks for the status of the transaction by comparing the `proc.code` field with
300.
For example, the following condition checks for failed HTTP transaction by comparing the `http.response.code` field with
400.


[source,yaml]
------
range:
gte:
proc.code: 300
http.response.code:
gte: 400
------

NOTE: The `range` condition accepts only one `gte`, one `gt`, one `lt` and one `lte` condition.
that can be also translated to:

[source,yaml]
----
range:
http.response.code.gte: 400
----

For example, the following condition checks if the CPU usage in percentage has a value between 0.5 and 0.8.

[source,yaml]
------
range:
gte:
cpu.user_p: 0.5
lt:
cpu.user_p: 0.8
system.cpu.user.pct.gte: 0.5
system.cpu.user.pct.lt: 0.8
------


Expand All @@ -167,15 +171,15 @@ or:

-------

For example the condition `http.code = 304 OR http.code = 404` translates to:
For example the condition `http.response.code = 304 OR http.response.code = 404` translates to:

[source,yaml]
------
or:
- equals:
http.code: 304
http.response.code: 304
- equals:
http.code: 404
http.response.code: 404
------


Expand All @@ -194,13 +198,13 @@ and:

-------

For example the condition `http.code = 200 AND status = OK` translates to:
For example the condition `http.response.code = 200 AND status = OK` translates to:

[source,yaml]
------
and:
- equals:
http.code: 200
http.response.code: 200
- equals:
status: OK
------
Expand Down