[rsyslog] Porting rsyslog to an OS that does not support dynamic linking or shared libraries

2018-10-16 Thread Satyam Sharma via rsyslog
Hello all, I am porting rsyslog (latest) to an embedded OS that does not support shared libraries or dynamic linking at all. My system does not provide dlopen()/dlsym() and friends, and my toolchain does not create .so's in the first place, so my porting effort is having to update the sources

Re: [rsyslog] Porting rsyslog to an OS that does not support dynamic linking or shared libraries

2018-10-16 Thread Rainer Gerhards
just a quick answer after having just a glimpse over your mail: look into libtool, it supports that use case. Fully utilizing this may require some changes to rsyslog, e.g. replacing dlopen() by the libtool equivalent. IIRC it should be fairly trivial. PRs are happily accepted. HTH Rainer El

Re: [rsyslog] TCP Keepalive on client and server side

2018-10-16 Thread Rainer Gerhards
You need to update to the current verson (8.38.0) first before I can look at this. Rainer El jue., 11 oct. 2018 a las 15:32, Peter Viskup () escribió: > > Thank you Rainer, > the Changelog answered why client is not answering keepalive packets > (bug fixed in 8.18). > > What about the TCP session

Re: [rsyslog] Porting rsyslog to an OS that does not support dynamic linking or shared libraries

2018-10-16 Thread Rainer Gerhards
El mar., 16 oct. 2018 a las 15:48, Satyam Sharma () escribió: > > Hi Rainer, > > Thanks much for responding. > > Your recommendation to use libtool's dlopen()-equivalent API for > static libraries does seem nicely workable for my problem without much > disturbance to existing code. I will

Re: [rsyslog] How to syslog to log to both local files (e.g /var/log/messages) _and_ remotly to syslog server?

2018-10-16 Thread John Chivian
To be honest I'm not sure about the configuration you have shown below as I don't use that old style syntax.  In that scenario I'm not clear how the queue gets bound to either of the outputs.  The new style syntax (RanierScript as in my example) makes it easier to implement a much finer level

Re: [rsyslog] How to syslog to log to both local files (e.g /var/log/messages) _and_ remotly to syslog server?

2018-10-16 Thread David Lang
The queue only applies to the next action (this is why the new syntax was created, the old syntax was too confusing) so if syslog1 blocks, it will queue to memory and up to 1G on disk, while it is queueing everything else will continue to log but if syslog2 blocks, all processing will be

Re: [rsyslog] how to get the original IP address in a relay chain

2018-10-16 Thread David Lang
On Wed, 17 Oct 2018, wuhe wrote: Hi : want to check how to get the original IP address after forward twice in a relay chain? like in this chain, how can the "Log Server" get the IP address (not hostname ) of "Client A/B/C" {Client A, Client B, Client C} > {Relay Server} >

[rsyslog] how to get the original IP address in a relay chain

2018-10-16 Thread wuhe
Hi : want to check how to get the original IP address after forward twice in a relay chain? like in this chain, how can the "Log Server" get the IP address (not hostname ) of "Client A/B/C" {Client A, Client B, Client C} > {Relay Server} > {Log Server} (udp is

Re: [rsyslog] how to get the original IP address in a relay chain

2018-10-16 Thread David Lang
My method does not require disk I/O on the relay. I'm about to experiment with the hash module to store only samples of relayed logs on the relay (and using a lookup table to set what percentage is saved, possibly allowing for different percentages for different message types) David Lang On

Re: [rsyslog] Porting rsyslog to an OS that does not support dynamic linking or shared libraries

2018-10-16 Thread Satyam Sharma via rsyslog
Hi Rainer, Thanks much for responding. Your recommendation to use libtool's dlopen()-equivalent API for static libraries does seem nicely workable for my problem without much disturbance to existing code. I will definitely try this, and would be happy to contribute a generalized patch if it

Re: [rsyslog] how to get the original IP address in a relay chain

2018-10-16 Thread wuhe
Thanks David for your reply, Actually i do the similar thing , i store the msg to "Relay Server" and use template to append the "fromhost-ip" , then use "imfile " to resend the msg with fromhost-ip to "log server" but this cause disk IO on relay server which worried about the disk