|
Hi Luis, Look on previous answers on the same topic : inserting the logs in a database. The idea is that it can be done, in fact I have written some time ago a perl script called from crontab to do this. You must take into account the following issues: 1) It is not such real-time as it may seems. Depending on your traffic it may take up to a few minutes to get the last line. 2) The system must handle the overhead of the operation. In such cases, depending on the information you need I recommend pooling the status of the Kannel instance you work with (for instance failed sms). If the status changes, you go down to logs to look for specific information. Hope it helps. Regards, Mihai Luis Valencia wrote: Thanks Rodrigo, I have try this, but I need to do it at real time so many times.I have to check for Failed sms for every sms that I insert on the table. And when I put the double piped grep's on a bash script it doesn't work. So I thought on insert the access.log to a database on realtime, so I can run queries any time. What do you think? Thanks for the help -----Original Message----- From: Rodrigo Cremaschi [mailto:[EMAIL PROTECTED]] Sent: Jueves, 24 de Abril de 2008 07:46 a.m. To: Luis Valencia Cc: [email protected] Subject: Re: dump access.log to a database It's quite easy to process kannel log files using "cat" and "grep" (or fgrep) commands. If you want to know the number of sent SMS for a certain short number, you may try something like: cat access.log | grep "Sent SMS" | grep "\[from: 8888\]" | wc -l If your log file is already compressed: zcat access.log.gz | ... Hope this can help you. On Wed, Apr 23, 2008 at 10:08 PM, Luis Valencia <[EMAIL PROTECTED]> wrote: --
Telemedia Consult srl tel: +40 21 316 0577 mobil: +40 746 091 360 |
- dump access.log to a database Luis Valencia
- Re: dump access.log to a database Rodrigo Cremaschi
- RE: dump access.log to a database Luis Valencia
- Re: dump access.log to a database Alejandro Guerrieri
- Re: dump access.log to a database Mihai Zsigmond
- Re: dump access.log to a database Rodrigo Cremaschi
- Re: dump access.log to a database nemam pojma
- Re: dump access.log to a database nemam pojma
