Skip to content

Commit 6aa02e4

Browse files
authored
Merge pull request #371 from alltilla/4.9.0-news-entries
news: add missing 4.9.0 news entries
2 parents bfc93a7 + 7ea67b7 commit 6aa02e4

33 files changed

+234
-0
lines changed

news/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ How to create a newsfile entry
44
1. Create a file in the `news/` directory called `<type>-<pr-id>.md`, where `<type>` is either:
55
* `feature`: New functionality.
66
* `bugfix`: Fix to a reported bug.
7+
* `fx-feature`: FilterX related feature.
8+
* `fx-bugfix`: FilterX related bugfix.
79
* `packaging`: Packaging related change.
810
* `developer-note`: Changes, that are only interesting to developers. (internal API change, etc...)
911
* `other`: Other important, but not categorized change.

news/bugfix-296.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`stats`: Fixed `free_window` counters.
2+

news/create-newsfile.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
22
#############################################################################
3+
# Copyright (c) 2024 Axoflow
4+
# Copyright (c) 2024 Attila Szakacs <attila.szakacs@axoflow.com>
35
# Copyright (c) 2020 Balabit
46
#
57
# This program is free software; you can redistribute it and/or modify it
@@ -41,6 +43,8 @@
4143
blocks = [
4244
('Features', 'feature-*.md'),
4345
('Bugfixes', 'bugfix-*.md'),
46+
('FilterX features', 'fx-feature-*.md'),
47+
('FilterX bugfixes', 'fx-bugfix-*.md'),
4448
('Packaging', 'packaging-*.md'),
4549
('Notes to developers', 'developer-note-*.md'),
4650
('Other changes', 'other-*.md'),

news/feature-326.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
`syslog-ng-ctl`: Added `attach` subcommand.
2+
3+
With `attach`, it is possible to attach to the
4+
standard IO of the `syslog-ng` proccess.
5+
6+
Example usage:
7+
```
8+
# takes the stdio fds for 10 seconds and displays syslog-ng output in that time period
9+
$ syslog-ng-ctl attach stdio --seconds 10
10+
```
11+
```
12+
# steal trace level log messages for 10 seconds
13+
$ syslog-ng-ctl attach logs --seconds 10 --log-level trace
14+
```

news/feature-351.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
socked based sources: Added new flag, called `exit-on-eof`
2+
3+
Setting this flag to a source makes AxoSyslog stop,
4+
when EOF is received.

news/feature-355.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
socked based sources: Added a new option called `idle-timeout()`.
2+
3+
Setting this option makes AxoSyslog close the client connection
4+
if no data is received for the set amount of seconds.

news/fx-bugfix-218.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`format_csv()`: Fixed delimiter formatting.
2+

news/fx-bugfix-230.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`json`: Fixed a crash that occured when doubles were stored and accessed.
2+

news/fx-bugfix-249.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`parse_csv()`: Fixed a race condition.
2+

news/fx-bugfix-257.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed race conditions in several functions.
2+

news/fx-bugfix-258.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`json`: Fixed race condition in marshalling.
2+

news/fx-bugfix-273.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`json_array`: Fixed failing to return `null` values.
2+

news/fx-bugfix-287-2.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`parse_csv()`: Fixed an invalid read.
2+

news/fx-bugfix-333.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed LogMessage -> FilterX variable synchronization.
2+

news/fx-feature-203.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
`regexp_subst()`: Added various pcre flags.
2+
3+
* `jit`:
4+
* enables or disables JIT compliling
5+
* default: `true`
6+
* `global`:
7+
* sets whether all found matches should be replaced
8+
* default: `false`
9+
* `utf8`:
10+
* enables or disables UTF-8 validation
11+
* default: `false`
12+
* `ignorecase`
13+
* sets case sensitivity
14+
* default: `false` (case-sensitive)
15+
* `newline`
16+
* configures the behavior of end of line finding
17+
* `false` returns end of line when CR, LF and CRLF characters are found
18+
* `true` makes the matcher process CR, LF, CRLF characters
19+
* default: `false`

news/fx-feature-215.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`unset()`: Now accepts any number of variables to unset.
2+

news/fx-feature-217.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added `+` operator.
2+

news/fx-feature-219-1.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`parse_csv()`: Changed strip whitespace default to `false`.
2+

news/fx-feature-219-2.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`parse_csv()`: Renamed `strip_whitespaces` argument to `strip_whitespace`.
2+

news/fx-feature-220.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
`update_metric()`: Added a new function similar to `metrics-probe` parser.
2+
3+
Example usage:
4+
```
5+
update_metric("filterx_metric", labels={"msg": $MSG, "foo": "foovalue"}, level=1, increment=$INCREMENT);
6+
```

news/fx-feature-221.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
`flatten()`: Added new function to flatten dicts and lists.
2+
3+
The function modifies the object in-place.
4+
The separator can be set with the `separator` argument,
5+
which is `.` by default.
6+
7+
Example usage:
8+
```
9+
flatten(my_dict_or_list, separator="->");
10+
```

news/fx-feature-238.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added `!~` operator as the negated `=~` operator.
2+

news/fx-feature-242.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Added new RFC5424 SDATA related functions.
2+
3+
All of the functions require traditional syslog parsing beforehand.
4+
5+
* `has_sdata()`
6+
* Returns whether the current log has SDATA information.
7+
* Example: `sdata_avail = has_sdata(;)`
8+
* `is_sdata_from_enterprise()`
9+
* Checks if there is SDATA that corresponds to the given enterprise ID.
10+
* Example: `sdata_from_6876 = is_sdata_from_enterprise("6876");`
11+
* `get_sdata()`
12+
* Returns a 2 level dict of the available SDATAs.
13+
* Example: `sdata = get_sdata();`
14+
* Returns: `{"Originator@6876": {"sub": "Vimsvc.ha-eventmgr", "opID": "esxui-13c6-6b16"}}`
15+

news/fx-feature-251.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
`parse_xml()`: Added new function to parse XMLs.
2+
3+
Example usage:
4+
```
5+
my_structured_data = parse_xml(raw_xml);
6+
```
7+
8+
Converting XML to a dict is not standardized.
9+
10+
Our intention is to create the most compact dict as possible,
11+
which means certain nodes will have different types and
12+
structures based on a number of different qualities of the
13+
input XML element.
14+
15+
The following points will demonstrate the choices we made in our parser.
16+
In the examples we will use the JSON dict implementation.
17+
18+
1. Empty XML elements become empty strings.
19+
```
20+
XML: <foo></foo>
21+
JSON: {"foo": ""}
22+
```
23+
24+
2. Attributions are stored in `@attr` key-value pairs,
25+
similarly to some other converters (e.g.: python xmltodict).
26+
```
27+
XML: <foo bar="123" baz="bad"/>
28+
JSON: {"foo": {"@bar": "123", "@baz": "bad"}}
29+
```
30+
31+
3. If an XML element has both attributes and a value,
32+
we need to store them in a dict, and the value needs a key.
33+
We store the text value under the #text key.
34+
```
35+
XML: <foo bar="123">baz</foo>
36+
JSON: {"foo": {"@bar": "123", "#text": "baz"}}
37+
```
38+
39+
4. An XML element can have both a value and inner elements.
40+
We use the `#text` key here, too.
41+
```
42+
XML: <foo>bar<baz>123</baz></foo>
43+
JSON: {"foo": {"#text": "bar", "baz": "123"}}
44+
```
45+
46+
5. An XML element can have multiple values separated by inner elements.
47+
In that case we concatenate the values.
48+
```
49+
XML: <foo>bar<a></a>baz</foo>
50+
JSON: {"foo": {"#text": "barbaz", "a": ""}}
51+
```
52+

news/fx-feature-255.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Use `json` and `json_array` as default types for dict and list literals.
2+
3+
This is now a valid config and creates `json` and `json_array` objects:
4+
```
5+
my_json_object = {"foo": "bar"};
6+
my_json_array = ["foo", "bar"];
7+
```

news/fx-feature-269.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Added new filterx control flow controls.
2+
3+
* `drop`: Drops the currently processed message and returns success.
4+
* `done`: Stops the processing and returns success.
5+

news/fx-feature-275.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
`unset_empties()`: Added advanced options.
2+
3+
`unset_empties` removes elements from the given dictionary or list that match
4+
the empties set. If the `recursive` argument is provided, the function will
5+
process nested dictionaries as well. The `replacement` argument allows
6+
replacing target elements with a specified object, and the targets
7+
argument customizes which elements are removed or replaced, overriding
8+
the default empties set.
9+
10+
* Optional named arguments:
11+
* recursive: Enables recursive processing of nested dictionaries. default: `true`
12+
* ignorecase: Enables case-insensitive matching. default: `true`
13+
* replacement: Specifies an object to replace target elements instead of removing them.
14+
default: nothing (remove)
15+
* targets: A list of elements to identify for removal or replacement, clearing the default empty set.
16+
default: `["", null, [], {}]`
17+
18+
Example usage:
19+
```
20+
unset_empties(js1, targets=["foo", "bar", null, "", [], {}], ignorecase=false, replacement="N/A", recursive=false);
21+
```

news/fx-feature-282.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
`parse_windows_eventlog_xml()`: Added a new function to parse Windows EventLog XMLs.
2+
3+
This parser is really similar to `parse_xml()` with
4+
a couple of small differences:
5+
6+
1. There is a quick schema validation.
7+
2. The `Event`->`EventData` field automatically handles named `Data` elements.
8+

news/fx-feature-283.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`datetime`: 0 valued `datetime` objects are now falsy.
2+

news/fx-feature-284.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`datetime`: `datetime` objects can now be cased to `integer` and `double`.
2+

news/fx-feature-287-1.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Declared variables now can be set with dict and list literals.
2+

news/fx-feature-297.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
`startswith()`, `endswith()`, `includes()`: Added string matching functions.
2+
3+
* First argument is the string that is being matched.
4+
* Second argument is either a single substring or a list of substrings.
5+
* Optionally the `ignorecase` argument can be set to configure case sensitivity
6+
* default: `false`
7+
8+
Example usage:
9+
```
10+
startswith(string, prefix, ignorecase=false);
11+
startswith(string, [prefix_1, prefix_2], ignorecase=true);
12+
13+
endswith(string, suffix, ignorecase=false);
14+
endswith(string, [suffix_1, suffix_2], ignorecase=true);
15+
16+
includes(string, substring, ignorecase=false);
17+
includes(string, [substring_1, substring_2], ignorecase=true);
18+
```

news/fx-feature-324.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
`parse_cef()`, `parse_leef()`: Added CEF and LEEF parsers.
2+
3+
* The first argument is the raw message.
4+
* Optionally `pair_separator` and `value_separator` arguments
5+
can be set to override the respective extension parsing behavior.
6+
7+
Example usage:
8+
```
9+
my_structured_leef = parse_leef(leef_message);
10+
my_structured_cef = parse_cef(cef_message);
11+
```

0 commit comments

Comments
 (0)