-
Notifications
You must be signed in to change notification settings - Fork 477
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
Type support add-contextual-data (4.0) #4051
Merged
OverOrion
merged 4 commits into
syslog-ng:master
from
bazsi:type-support-add-contextual-data
Jul 8, 2022
Merged
Type support add-contextual-data (4.0) #4051
OverOrion
merged 4 commits into
syslog-ng:master
from
bazsi:type-support-add-contextual-data
Jul 8, 2022
Conversation
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
Build SUCCESS |
…m value-pairs This function takes a "type(template-expr)" formatted string and compiles it into a template with a type hint, just as we did that in value-pairs/cmdline.c Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
bazsi
force-pushed
the
type-support-add-contextual-data
branch
from
June 23, 2022 07:16
13c0127
to
056b509
Compare
Build SUCCESS |
MrAnno
approved these changes
Jul 7, 2022
OverOrion
approved these changes
Jul 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Dec 15, 2022
snmp module untested since net-snmp doesn't currently build on NetBSD-current Changes: 3.38.1 ====== ## Highlights ### Sneak peek into syslog-ng v4.0 syslog-ng v4.0 is right around the corner. This release (v3.38.1) contains all major changes, however, they are currently all hidden behind a feature flag. To enable and try those features, you need to specify `@version: 4.0` at the top of the configuration file. You can find out more about the 4.0 changes and features [here](https://github.com/syslog-ng/syslog-ng/blob/master/NEWS-4.0.md). Read our practical introduction to typing at [syslog-ng-future.blog](https://syslog-ng-future.blog/syslog-ng-4-progress-3-38-1-release/). ## Features * `grouping-by()`: added `inject-mode(aggregate-only)` This inject mode will drop individual messages that make up the correlation context (`key()` groups) and would only yield the aggregate messages (e.g. the results of the correlation). ([#3998](syslog-ng/syslog-ng#3998)) * `add-contextual-data()`: add support for type propagation, e.g. set the type of name-value pairs as they are created/updated to the value returned by the template expression that we use to set the value. The 3rd column in the CSV file (e.g. the template expression) now supports specifying a type-hint, in the format of "type-hint(template-expr)". Example line in the CSV database: selector-value,name-value-pair-to-be-created,list(foo,bar,baz) ([#4051](syslog-ng/syslog-ng#4051)) * `$(format-json)`: add --key-delimiter option to reconstruct JSON objects using an alternative structure separator, that was created using the key-delimiter() option of json-parser(). ([#4093](syslog-ng/syslog-ng#4093)) * `json-parser()`: add key-delimiter() option to extract JSON structure members into name-value pairs, so that the names are flattened using the character specified, instead of dot. Example: Input: {"foo":{"key":"value"}} Using json-parser() without key-delimiter() this is extracted to: foo.key="value" Using json-parser(key-delimiter("~")) this is extracted to: foo~key="value" This feature is useful in case the JSON keys contain dots themselves, in those cases the syslog-ng representation is ambigious. ([#4093](syslog-ng/syslog-ng#4093)) ## Bugfixes * Fixed buffer handling of syslog and timestamp parsers Multiple buffer out-of-bounds issues have been fixed, which could cause hangs, high CPU usage, or other undefined behavior. ([#4110](syslog-ng/syslog-ng#4110)) * Fixed building with LibreSSL ([#4081](syslog-ng/syslog-ng#4081)) * `network()`: Fixed a bug, where syslog-ng halted the input instead of skipping a character in case of a character conversion error. ([#4084](syslog-ng/syslog-ng#4084)) * `redis()`: Fixed bug where using redis driver without the `batch-lines` option caused program crash. ([#4114](syslog-ng/syslog-ng#4114)) * `pdbtool`: fix a SIGABRT on FreeBSD that was triggered right before pdbtool exits. Apart from being an ugly crash that produces a core file, functionally the tool behaved correctly and this case does not affect syslog-ng itself. ([#4037](syslog-ng/syslog-ng#4037)) * `regexp-parser()`: due to a change introduced in 3.37, named capture groups are stored indirectly in the LogMessage to avoid copying of the value. In this case the name-value pair created with the regexp is only stored as a reference (name + length of the original value), which improves performance and makes such name-value pairs use less memory. One omission in the original change in 3.37 is that syslog-ng does not allow builtin values to be stored indirectly (e.g. $MESSAGE and a few of others) and this case causes an assertion to fail and syslog-ng to crash with a SIGABRT. This abort is now fixed. Here's a sample config that reproduces the issue: regexp-parser(patterns('(?<MESSAGE>.*)')); ([#4043](syslog-ng/syslog-ng#4043)) * set-tag: fix cloning issue when string literal were used (see #4062) ([#4065](syslog-ng/syslog-ng#4065)) * `add-contextual-data()`: fix high memory usage when using large CSV files ([#4067](syslog-ng/syslog-ng#4067)) ## Other changes * The `json-c` library is no longer bundled in the syslog-ng source tarball Since all known OS package managers provide json-c packages nowadays, the json-c submodule has been removed from the source tarball. The `--with-jsonc=internal` option of the `configure` script has been removed accordingly, system libraries will be used instead. For special cases, the JSON support can be disabled by specifying `--with-jsonc=no`. ([#4078](syslog-ng/syslog-ng#4078)) * platforms: Dropped support for ubuntu-impish as it became EOL ([#4088](syslog-ng/syslog-ng#4088))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds type support to add-contextual-data(), two things: