|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Log Redirection to Remote Host
hey,
I need your help. I have a rhel server that runs application, that application writing to her local application log. I want that log will be realtime copying to a another remote rhel server. The thing is that I prohibited touch the application code. Is that possible? Thanks |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
How about: Code:
tail -f log_file | ssh user@host "sh -c 'cat > remote_log_file'" |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
AMAZING.
thank you! how do i permanence this? everyboot and how do i logrotate this? |
|
#4
|
||||
|
||||
|
For starting it during every boot, you can write a script and put it in
/etc/init.d/ . Google for instructions to start a command during boot up.
I think Log-rotation is going to be difficult for above command. May be you can force kill it and start with another file name when log size reaches a defined threshold. |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
It is probably easier to create a syslog-facility for this. Then you can use
syslog to put this log output to another host. See the man page of
syslog for details about how to achieve this.
I hope this helps. bakunin |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
thats what i tought!
doing it with syslog or rsyslog, but i know that the configuration is only by: facility and priority. I search and the facilities are only by: mail.* , cron.* , kern.* ... If you know how to manage an external application log with a syslog or rsyslog, its better and i would like to know how. Thanks alot. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what command for copy a filesystem (local host or remote host) | bora99 | Linux | 1 | 02-29-2012 07:05 AM |
| Help! How to find the local host after few ssh hops to remote host??? | gomes1333 | UNIX for Advanced & Expert Users | 3 | 03-27-2010 10:49 PM |
| running commands to remote host from centralized host | anjum.suri | Shell Programming and Scripting | 6 | 08-18-2009 10:55 AM |
| Run a shell script from one host which connext to remote host and run the commands | SN2009 | Shell Programming and Scripting | 6 | 04-13-2009 04:39 AM |
| How to delete the files from local host to remote host | krishna176 | Solaris | 3 | 03-24-2007 04:48 PM |
|
|