Skip to content

Commit 574f292

Browse files
authored
Merge pull request #1716 from rundeck/RUN-2210-log-filter-regular-expression-matching-problems
RUN-2210: Update Key Value Data with new Match Substrings checkbox
2 parents be8103f + 9554e78 commit 574f292

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/manual/log-filters/key-value-data.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ There are only three configuration components:
1515
- Pattern
1616
- Name Data
1717
- Log Data (Checkbox)
18+
- Match Substrings (Checkbox)
1819

1920
The Pattern field matches a regular expression and looks for one or two Capture Groups. If there are two Capture Groups, the first will be mapped to a Rundeck variable key in the data context, while the second will be the value. If there is only one Capture Group, the match will be the value.
2021

2122
The Name Data field is only used when a single Capture Group is defined in the regex statement. The value of that field will be used as the variable key. The variable value will be the content from the Capture Group.
2223

2324
Log Data is a checkbox that, if checked, will add tabular output of what is captured in the filter to the log output of the job that the filter is attached to.
2425

26+
Match Substrings is a checkbox that, if checked, will allow the Pattern to match substrings within a line of log output. If unchecked, the Pattern must match the entire line of log output.
27+
2528
By default, the pattern field is set to: `^RUNDECK:DATA:(.+?)\s*=\s*(.+)$`
2629

2730
This will match output of the attached job if there is a line in the log output that begins with _RUNDECK:DATA:foo=value1_. The data is available in later job steps as the Rundeck variable `$data.foo` with a value of everything after the equals sign to the end of the line. So in this case, the value of `$data.foo` would be _value1_.

0 commit comments

Comments
 (0)