LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-27-2007, 11:09 PM   #1
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Rep: Reputation: 0
Question Remote syslog and CentOS5.


Hello,

I have a log file (/var/log/mir/messages) which has up-to-date information pouring in. I also have a php parser script, which parses for some information I like. This PHP script is supposed to give me real-time information when I look for it.

So, ideally, something like
Code:
(tail -F /var/log/mir/messages | grep hello | parser.php) &
is what I'm trying to do. Tailing the realtime "feed" of messages, grepping what I want, and running a parser on it (don't even really need a parser to that because the grep is getting what I want, but I guess there's 2-3 types of information that the grep gives out, and I still want to segregate it, but anyways)

Now, I'm looking to ask the parser a question, and based on this realtime 'feed', I want it to answer me.

That's aspect one.
Aspect two, is I have about 10 boxes doing this same thing, and I want to get data from all of these boxes, and get a combined result when I ask the parser a question.

For this, I'm looking to log only /var/log/mir/messages to a central syslog server.


I'm looking for help in these.
First, I'd really appreciate it if someone can tell me what I'm trying to do with a parser can also be done in a different, less CPU intensive, and easier way.

Second, I'd really like to know how (if possible, step by step, I know, asking for a lot.. but you know.) I could do the remote logging. Google is good, man is good, but I'm just not able to get it going on CentOS 5.


A central server where all these 10 boxes log to, and I run the parser there. (That's if you like the parser idea.)


Thank you very much in advance.
 
Old 10-02-2007, 06:36 AM   #2
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Hello again.
So, no one willing to help?
 
Old 10-02-2007, 07:44 AM   #3
noran01
LQ Newbie
 
Registered: Oct 2007
Posts: 12

Rep: Reputation: 0
If you wish to have all your boxes log syslog messages to ONE host:

1. on each of the 'client' servers, add an entry into /etc/hosts in the following format:

IP-Address FQDN hostname loghost

Be sure to add the 'loghost' at the end.

2. edit /etc/syslog.conf and add the following line:

*.info @loghost

3. restart syslog (i.e. /etc/init.d/syslog restart

There is still one more important step to do. Depending on what box you want to be the syslog 'server' you have to make sure you add the '-r' option to the syslog startup script.

Edit /etc/sysconfig/syslog and add the -r option so it is similar to below:

SYSLOGD_OPTIONS="-m 0 -r"

Restart syslog like stated above. You should be all set.

I don't know if there is any better way to parse everything, but i would look at an enterprise EM system (event management). Good luck
 
Old 10-02-2007, 10:18 AM   #4
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Thank you, noran.
Appreciate your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
syslog to accept remote messages ilnli Linux - Software 1 08-02-2006 06:19 AM
Syslog to a Remote Server Antonius_Block Linux - Software 1 05-06-2006 03:29 AM
Getting logs from a remote syslog ganninu Linux - Newbie 4 09-10-2003 09:05 AM
SYSLOG - logging to Remote Host dvong3 Linux - Networking 4 09-24-2002 07:14 AM
can't get syslog to log to remote host o4m Linux - Software 1 08-25-2002 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration