LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   I can send syslog log to rsyslog server? how? (https://www.linuxquestions.org/questions/linux-server-73/i-can-send-syslog-log-to-rsyslog-server-how-907613/)

JohnV2 10-11-2011 12:49 PM

I can send syslog log to rsyslog server? how?
 
Hi,

I already configured to send log through rsyslog to another rsyslog, using logger (Ex: ErrorLog "|/usr/bin/logger -t httpd -p local7.err"
). And I don't have any problem.

1) But I need to know, if I can without install rsyslog, I mean through syslog to send some log to the server with have rsyslog previously configure. If is possible, how?

2) If is possible without using |/usr/bin/logger? because logger changes the log and I can't read (some app read that log, and then I need to modify all the regular expression).

I already test send some log through syslog to rsyslog, but without luck.

Additional information: I used httpd log

Thank for the help.

John

unSpawn 10-11-2011 02:22 PM

Quote:

Originally Posted by JohnV2 (Post 4495676)
I already configured to send log through rsyslog to another rsyslog, using logger (..) If is possible without using |/usr/bin/logger? (..) I already test send some log through syslog to rsyslog, but without luck.

Syslog can not read files itself but Rsyslog can, so you do not need to pipe through 'logger'. Here is an example:
Code:

$InputFileName /path/to/process.log
$InputFileTag tagname
$InputFileStateFile processname.state
$InputFileSeverity info
$InputFileFacility local1
$InputRunFileMonitor


JohnV2 10-11-2011 06:09 PM

Hi,

Thanks for the replay, Ok, but hmmm I think I don't follow you... some application uses syslog:localX in the config file but other use or "I believe that use" |/usr/bin/logger like this example (httpd.conf), because is no other way:
Quote:

CustomLog "|/usr/bin/logger -t httpd -p local6.info" combined
so, where I use this, in rsyslog righ?:
Quote:

$InputFileName /path/to/process.log
$InputFileTag tagname
$InputFileStateFile processname.state
$InputFileSeverity info
$InputFileFacility local1
$InputRunFileMonitor
I configure this you give and then I send to the other server, righ? I ask for to be sure because I'm not working right now.

John.

unSpawn 10-11-2011 06:50 PM

Quote:

Originally Posted by JohnV2 (Post 4495944)
because is no other way

You mean you can't use a CustomLog directove without directing output straight to file which rsyslog then can read?..


Quote:

Originally Posted by JohnV2 (Post 4495944)
so, where I use this, in rsyslog righ?:

Yes.


Quote:

Originally Posted by JohnV2 (Post 4495944)
I configure this you give and then I send to the other server, righ?

Yes. File gets read by rsyslog directly. Rsyslog then sends to remote rsyslog.

JohnV2 10-11-2011 08:29 PM

Quote:

Originally Posted by unSpawn (Post 4495969)
You mean you can't use a CustomLog directove without directing output straight to file which rsyslog then can read?..

Sorry about that :D I was a little distracted, I know what you mean. Thanks unSpawn ;) is very useful... Question 2 Done! :D


John

unSpawn 10-12-2011 11:39 AM

Please mark your thread "solved" then.

JohnV2 10-13-2011 08:55 AM

Quote:

Originally Posted by unSpawn (Post 4496645)
Please mark your thread "solved" then.

Yes, thanks... sorry I was busy yesterday... I ask here about the other questions (the firts one): link

Thanks unSpawn.

John


All times are GMT -5. The time now is 02:27 PM.