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.