Home > Archive > PERL Beginners > October 2005 > log filtering
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Mynullvoid 2005-10-25, 6:56 pm |
|
FIRST STAGE
My idea is to check auth.log file for it changes and create files based on it's source IP, for example, if there are login request from 192.168.0.1, so the system shall filter the log and create db.192.168.0.1; in this new filtered log file, it shall cons
ist of the time and the destination port number.
SECOND STAGE
If the logs in certian file consist of correct sequence of port numbers (cronjob will do the checking and if all is correct, it will execute other shell command)
Those are what I want to achieve, at least you can assist me in the first stage, if you can help me in second stage, it will be very nice of you.
Thank you
Regards
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
| |
| Steve Bertrand 2005-10-25, 6:56 pm |
|
> My idea is to check auth.log file for it changes and create
> files based on it's source IP, for example, if there are
> login request from 192.168.0.1, so the system shall filter
> the log and create db.192.168.0.1; in this new filtered log
> file, it shall consist of the time and the destination port number.
Well, since you haven't shown any code, we don't know what approach you
want to take. I would start by reading the following:
perldoc -f grep
perldoc Data::Dumper
The first will aid extracting the data, the second will keep data
managed in an efficient way that you can pull it back later and
manipulate at will.
Steve
>
>
> SECOND STAGE
>
> If the logs in certian file consist of correct sequence of
> port numbers (cronjob will do the checking and if all is
> correct, it will execute other shell command)
>
> Those are what I want to achieve, at least you can assist me
> in the first stage, if you can help me in second stage, it
> will be very nice of you.
>
> Thank you
>
> Regards
>
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
| |
| Steve Bertrand 2005-10-25, 6:56 pm |
| > My idea is to check auth.log file for it changes and create
> files based on it's source IP, for example, if there are
> login request from 192.168.0.1, so the system shall filter
> the log and create db.192.168.0.1; in this new filtered log
> file, it shall consist of the time and the destination port number.
My apologies, those perldocs should have been:
perldoc -f grep
perldoc Storable (not Dumper)
Steve
>
>
> SECOND STAGE
>
> If the logs in certian file consist of correct sequence of
> port numbers (cronjob will do the checking and if all is
> correct, it will execute other shell command)
>
> Those are what I want to achieve, at least you can assist me
> in the first stage, if you can help me in second stage, it
> will be very nice of you.
>
> Thank you
>
> Regards
>
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
| |
| Mynullvoid 2005-10-25, 9:55 pm |
| Dear Steve Bertrand,
At the moment I only have my script in bash, and found that there are many issues with my script. I would appreciate if anyone can write me a script that can accomplish what this.
I shall take it from there and enhance to suit my environment. Please assist.
I am running Linux (debian-sid) on i386 machine.
Steve Bertrand <iaccounts@ibctech.ca> wrote:
> My idea is to check auth.log file for it changes and create
> files based on it's source IP, for example, if there are
> login request from 192.168.0.1, so the system shall filter
> the log and create db.192.168.0.1; in this new filtered log
> file, it shall consist of the time and the destination port number.
My apologies, those perldocs should have been:
perldoc -f grep
perldoc Storable (not Dumper)
Steve
>
>
> SECOND STAGE
>
> If the logs in certian file consist of correct sequence of
> port numbers (cronjob will do the checking and if all is
> correct, it will execute other shell command)
>
> Those are what I want to achieve, at least you can assist me
> in the first stage, if you can help me in second stage, it
> will be very nice of you.
>
> Thank you
>
> Regards
>
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
| |
| Chris Devers 2005-10-25, 9:55 pm |
| On Tue, 25 Oct 2005, mynullvoid wrote:
> At the moment I only have my script in bash, and found that there are
> many issues with my script. I would appreciate if anyone can write me
> a script that can accomplish what this.
Super. How much were you thinking of paying? Are you taking bids?
(Hint: this is not a free script writing service. We can help you
improve the code you're writing yourself, but if you want people to do
your job or your homework for you, this is the wrong place to ask.)
Posting the bash code would at least be a start.
Showing, concretely, how you want to translate it to Perl is better.
Showing, specifically, what you've tried so far is best.
--
Chris Devers
|
|
|
|
|