forked from axoflow/axosyslog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FilterX entries since 4.8.0. Any other missing entries since 4.8.1. Signed-off-by: Attila Szakacs <[email protected]>
- Loading branch information
Showing
31 changed files
with
228 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`stats`: Fixed `free_window` counters. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
`syslog-ng-ctl`: Added `attach` subcommand. | ||
|
||
With `attach`, it is possible to attach to the | ||
standard IO of the `syslog-ng` proccess. | ||
|
||
Example usage: | ||
``` | ||
# takes the stdio fds for 10 seconds and displays syslog-ng output in that time period | ||
$ syslog-ng-ctl attach stdio --seconds 10 | ||
``` | ||
``` | ||
# steal trace level log messages for 10 seconds | ||
$ syslog-ng-ctl attach logs --seconds 10 --level trace | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
socked based sources: Added new flag, called `exit-on-eof` | ||
|
||
Setting this flag to a source makes AxoSyslog stop, | ||
when EOF is received. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
socked based sources: Added a new option called `idle-timeout()`. | ||
|
||
Setting this option makes AxoSyslog close the client connection | ||
if no data is received for the set amount of seconds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
`regexp_subst()`: Added various pcre flags. | ||
|
||
* `jit`: | ||
* enables or disables JIT compliling | ||
* default: `true` | ||
* `global`: | ||
* sets whether all found matches should be replaced | ||
* default: `false` | ||
* `utf8`: | ||
* enables or disables UTF-8 validation | ||
* default: `false` | ||
* `ignorecase` | ||
* sets case sensitivity | ||
* default: `false` (case-sensitive) | ||
* `newline` | ||
* configures the behavior of end of line finding | ||
* `false` returns end of line when CR, LF and CRLF characters are found | ||
* `true` makes the matcher process CR, LF, CRLF characters | ||
* default: `false` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`unset()`: Now accepts any number of variables to unset. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Added `+` operator. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`format_csv()`: Fixed delimiter formatting. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`parse_csv()`: Changed strip whitespace default to `false`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`parse_csv()`: Renamed `strip_whitespaces` argument to `strip_whitespace`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`update_metric()`: Added a new function similar to `metrics-probe` parser. | ||
|
||
Example usage: | ||
``` | ||
update_metric("filterx_metric", labels={"msg": $MSG, "foo": "foovalue"}, level=1, increment=$INCREMENT); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
`flatten()`: Added new function to flatten dicts and lists. | ||
|
||
The function modifies the object in-place. | ||
The separator can be set with the `separator` argument, | ||
which is `.` by default. | ||
|
||
Example usage: | ||
``` | ||
flatten(my_dict_or_list, separator="->"); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`json`: Fixed a crash that occured when doubles were stored and accessed. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Added `!~` operator as the negated `=~` operator. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Added new RFC5424 SDATA related functions. | ||
|
||
All of the functions require traditional syslog parsing beforehand. | ||
|
||
* `has_sdata()` | ||
* Returns whether the current log has SDATA information. | ||
* Example: `sdata_avail = has_sdata(;)` | ||
* `is_sdata_from_enterprise()` | ||
* Checks if there is SDATA that corresponds to the given enterprise ID. | ||
* Example: `sdata_from_6876 = is_sdata_from_enterprise("6876");` | ||
* `get_sdata()` | ||
* Returns a 2 level dict of the available SDATAs. | ||
* Example: `sdata = get_sdata();` | ||
* Returns: `{"Originator@6876": {"sub": "Vimsvc.ha-eventmgr", "opID": "esxui-13c6-6b16"}}` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`parse_csv()`: Fixed a race condition. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
`parse_xml()`: Added new function to parse XMLs. | ||
|
||
Example usage: | ||
``` | ||
my_structured_data = parse_xml(raw_xml); | ||
``` | ||
|
||
Converting XML to a dict is not standardized. | ||
|
||
Our intention is to create the most compact dict as possible, | ||
which means certain nodes will have different types and | ||
structures based on a number of different qualities of the | ||
input XML element. | ||
|
||
The following points will demonstrate the choices we made in our parser. | ||
In the examples we will use the JSON dict implementation. | ||
|
||
1. Empty XML elements become empty strings. | ||
``` | ||
XML: <foo></foo> | ||
JSON: {"foo": ""} | ||
``` | ||
|
||
2. Attributions are stored in `@attr` key-value pairs, | ||
similarly to some other converters (e.g.: python xmltodict). | ||
``` | ||
XML: <foo bar="123" baz="bad"/> | ||
JSON: {"foo": {"@bar": "123", "@baz": "bad"}} | ||
``` | ||
|
||
3. If an XML element has both attributes and a value, | ||
we need to store them in a dict, and the value needs a key. | ||
We store the text value under the #text key. | ||
``` | ||
XML: <foo bar="123">baz</foo> | ||
JSON: {"foo": {"@bar": "123", "#text": "baz"}} | ||
``` | ||
|
||
4. An XML element can have both a value and inner elements. | ||
We use the `#text` key here, too. | ||
``` | ||
XML: <foo>bar<baz>123</baz></foo> | ||
JSON: {"foo": {"#text": "bar", "baz": "123"}} | ||
``` | ||
|
||
5. An XML element can have multiple values separated by inner elements. | ||
In that case we concatenate the values. | ||
``` | ||
XML: <foo>bar<a></a>baz</foo> | ||
JSON: {"foo": {"#text": "barbaz", "a": ""}} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Use `json` and `json_array` as default types for dict and list literals. | ||
|
||
This is now a valid config and creates `json` and `json_array` objects: | ||
``` | ||
my_json_object = {"foo": "bar"}; | ||
my_json_array = ["foo", "bar"]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fixed race conditions in several functions. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`json`: Fixed race condition in marshalling. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Added new filterx control flow controls. | ||
|
||
* `drop`: Drops the currently processed message and returns success. | ||
* `done`: Stops the processing and returns success. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`json_array`: Fixed failing to return `null` values. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
`unset_empties()`: Added advanced options. | ||
|
||
`unset_empties` removes elements from the given dictionary or list that match | ||
the empties set. If the `recursive` argument is provided, the function will | ||
process nested dictionaries as well. The `replacement` argument allows | ||
replacing target elements with a specified object, and the targets | ||
argument customizes which elements are removed or replaced, overriding | ||
the default empties set. | ||
|
||
* Optional named arguments: | ||
* recursive: Enables recursive processing of nested dictionaries. default: `true` | ||
* ignorecase: Enables case-insensitive matching. default: `true` | ||
* replacement: Specifies an object to replace target elements instead of removing them. | ||
default: nothing (remove) | ||
* targets: A list of elements to identify for removal or replacement, clearing the default empty set. | ||
default: `["", null, [], {}]` | ||
|
||
Example usage: | ||
``` | ||
unset_empties(js1, targets=["foo", "bar", null, "", [], {}], ignorecase=false, replacement="N/A", recursive=false); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
`parse_windows_eventlog_xml()`: Added a new function to parse Windows EventLog XMLs. | ||
|
||
This parser is really similar to `parse_xml()` with | ||
a couple of small differences: | ||
|
||
1. There is a quick schema validation. | ||
2. The `Event`->`EventData` field automatically handles named `Data` elements. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`datetime`: 0 valued `datetime` objects are now falsy. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`datetime`: `datetime` objects can now be cased to `integer` and `double`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Declared variables now can be set with dict and list literals. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`parse_csv()`: Fixed an invalid read. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
`startswith()`, `endswith()`, `includes()`: Added string matching functions. | ||
|
||
* First argument is the string that is being matched. | ||
* Second argument is either a single substring or a list of substrings. | ||
* Optionally the `ignorecase` argument can be set to configure case sensitivity | ||
* default: `false` | ||
|
||
Example usage: | ||
``` | ||
startswith(string, prefix, ignorecase=false); | ||
startswith(string, [prefix_1, prefix_2], ignorecase=true); | ||
endswith(string, suffix, ignorecase=false); | ||
endswith(string, [suffix_1, suffix_2], ignorecase=true); | ||
includes(string, substring, ignorecase=false); | ||
includes(string, [substring_1, substring_2], ignorecase=true); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
`parse_cef()`, `parse_leef()`: Added CEF and LEEF parsers. | ||
|
||
* The first argument is the raw message. | ||
* Optionally `pair_separator` and `value_separator` arguments | ||
can be set to override the respective extension parsing behavior. | ||
|
||
Example usage: | ||
``` | ||
my_structured_leef = parse_leef(leef_message); | ||
my_structured_cef = parse_cef(cef_message); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fixed LogMessage -> FilterX variable synchronization. | ||
|