-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
syslog-ng add logread alternative and minor config update #22763
base: master
Are you sure you want to change the base?
Conversation
Hello, Thank you for your contribution. I briefly looked at it. 1st commit - yeah, it can go. 👍 |
The second is disabled by default as previously. It will work only if uncomment the source. |
Yeah, I know also how to use telnet and get from it, heh. However, syslog-ng is at least from my point of view critical process on the router and once you don't have logs, you are completely blind. So, I wanted to test it on my end before merging it. Rather safe than regret. |
CC @bkil you a contrubutor to both the OpenWrt and syslog-ng so kindly review |
@BKPepe friendly reminder on this |
@stokito
Please note: getopts transfers an unknown option in a question mark
So it might be not the best idea to remove such checks from the original wrapper. Bottom line: ATM, this looks quite unfinished. |
I agree with @dibdot move your logread changes to different PR and leave
this PR only for minor config update
Dne ne 3. 3. 2024 20:12 uživatel Dirk Brenken ***@***.***>
napsal:
… @stokito <https://github.com/stokito>
Regardless of your logread changes, I don't understand why you have
extended the already faltering pull request with this?
Anyway, I briefly tested your changes on a current Openwrt (not Turris)
... i.e. without "/var/log/messages".
-
printf to echo migration - why? "Simple" for whom?
-
No longer check for log file existence ends up with ...
***@***.***:~# ./logread.sh
tail: can't open '/var/log/messages': No such file or directory
tail: no files
- An unknown option ends up with ...
***@***.***:~# ./logread.sh -s
Illegal option -s
Unsupported option ?. See ./logread.sh -h
tail: can't open '/var/log/messages': No such file or directory
tail: no files
Please note: getopts transfers an unknown option in a question mark
- A non number count as input ends up with ...
***@***.***:~# ./logread.sh -l dsfds
tail: invalid number 'dsfds'
So it might be not the best idea to remove such checks from the original
wrapper.
Bottom line: ATM, this looks quite unfinished.
—
Reply to this email directly, view it on GitHub
<#22763 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7IDVDEXVHFN5WG5RQDQ6TYWNYYVAVCNFSM6AAAAAA73R6VOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVGI3DONZRG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I removed last commits for the logread |
Commit: 37d2d69 pushed to master, thanks! The other two, I will look into it. |
I fixed the merge conflict, dropped one commit, and now the PR should be ready to be merged. |
Fixed merge conflict. The PR to ubox was merged openwrt/openwrt#14775 |
Getting :
[EDIT] or make /usr/share/syslog-ng/include/scl/network_localhost/detect.sh as a executable in the running OpenWRT. |
When the syslog-ng installed it records all messages to /var/log/messages. This makes the default OpenWrt's ubox /sbin/logread useless and return nothing. The logread script was added to the syslog-ng as a shim. It's based on `tail /var/log/messages` and repeats basic options that the ubox logread have. The script is installed instead of the /sbin/logread and this is causes an error. Instead install it to /usr/libexec/logread.sh and specify as an alternative /sbin/logread. The ubox logread also needs to be made as alternative in /usr/libexec/logread-ubox. So we need to give it a separate name. The most simple and clear would be logread-shell or just logread.sh. Suggested-by: Andreas Gnau <andreas.gnau@iopsys.eu> Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
@BKPepe I rebased on top of latest changes. Please merge |
Friendly reminder on this. |
Friendly remind on this. |
Maintainer: @BKPepe @flyn-org
Compile tested: not complied, only config
Run tested: Turris Omnia
Description:
When started the syslog-ng prints the message:
WARNING: Your configuration file uses an obsoleted keyword, please update your configuration; keyword='stats_freq', change='Use the stats() block. E.g. stats(freq(1));', location='/etc/syslog-ng.conf:18:6'
The PR fixes it.
Also I added sample of destination for remote logs and made comments shorter.
UPD Added a fix for "syslog-ng: conflicts with logd package" #22451
Closes: #11535
Closes: #22451
See also https://gitlab.nic.cz/turris/os/packages/-/issues/307
The corresponding PR to the ubox loread here openwrt/openwrt#14775
UPD2
I also improved the logread script and made it more stable and shorter.
Dear @dibdot please review