Comments (3)
hmm... yup, that NULL setting is incorrect. it has been a performance
optimization (and probably premature at that).
Probably, way earlier the source driver didn't do anything but forward the
message, now it has some actual functionality. The entire NULL stuff could
probably be removed, I doubt it'd have any kind of measurable performance
drop. and if that would happen, I would go to the configuration compiler to
optimize the tree instead of trying to microoptimize function calls.
On Mon, Aug 4, 2014 at 2:34 PM, Gergely Nagy [email protected]
wrote:
Assuming I have this configuration:
@Version: 3.5
source s_foo { tcp(port(12345)); };
log { source(s_foo); destination { file("/dev/stdout", template("SRC: $SOURCE\n")); }; };If I send a log message, $SOURCE will not be set, and stats for the
center counter will not be incremented, either. This is because in
afsocket_sd_init_instance()
https://github.com/balabit/syslog-ng/blob/416d3159c133a99134cf75607b74b2650cb73688/modules/afsocket/afsocket-source.c#L679,
we explicitly set the queue method to NULL, which will then fall back to
log_pipe_forward_msg(), which does not set SOURCE, nor does it increment
the center counter.My first idea would be to remove that line, and have
log_src_driver_queue_method() do its thing. But I am unsure about the
implications.@bazsi https://github.com/bazsi: Any insight?
(Thanks @faxm0dem https://github.com/faxm0dem for the report!)
—
Reply to this email directly or view it on GitHub
#186.
from syslog-ng.
Thanks! That was my suspicion too. Will requeue this for 3.6 though, as the problem has not been reported until now (it was broken for a good while now), and this may break existing scripts when fixed.
Btw, I just checked, and in versions prior a24a380, it was, indeed, set to log_pipe_forward_msg()
, and that commit turned it into a NULL. Sometime after, in 0e858cb, log_src_driver_queue_method()
was changed. So this has been broken since 3.4 alpha, roughly.
from syslog-ng.
I'm checking the code, and it seems that it's not only afsocket that is affected. The file()
source does not go through log_src_driver_queue_method()
either. streams()
and program()
sources appear to be unaffected.
from syslog-ng.
Related Issues (20)
- Support role in s3 destination
- Sending logs to OpenSearch using panos parser produces JSON error in OpenSearch HOT 2
- default-network-drivers() is not getting fortigate logs hostname ($HOST) correctly HOT 4
- stats(healthcheck-freq()) problems HOT 4
- On a stressed system, some logs are not being written to the log file. HOT 2
- openobserve config is incorrect HOT 2
- Syslog-ng stops writing logs to a file from a custom systemd-journald namespace after a server restart HOT 2
- Support aws:kms encryption in the s3 destination
- [4.7.1] can't compile cloud-auth when using libressl HOT 2
- compile error in otel when ipv6 support is disabled
- clang c++ support HOT 1
- trusted-keys: support a secure hash algorithm HOT 1
- Add macro for certificate fingerprint HOT 1
- Unexpected behavior with multiple conditions including 'not' in the filter HOT 4
- There is no problem starting syslog-ng, but Verify reports an error. HOT 1
- OpenTelemetry/OTLP: add support for certificate pinning, like with `trusted-keys()` HOT 3
- Config failing with kafka and template HOT 3
- syslog-ng 3.24.1 sometimes crash in log_pipe_queue HOT 2
- libcloud-auth is underlinked HOT 1
- Fuzzing discovery HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syslog-ng.