Vadim I'm sorry you weren't able to get my version working, the minimum amount of work you need to fix the defaul version is to copy the lines that re-load the table list into memory and paste them in a second time to run after the old tables are cleaned and before the merge table is re-created.

----- Original Message ----
From: Vadim Pushkin <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; php-syslog-ng-support@lists.sourceforge.net
Cc: [EMAIL PROTECTED]
Sent: Wednesday, July 19, 2006 6:15:37 PM
Subject: Re: [Php-syslog-ng-support] LogRotate (V2.9.2 tested)




>From: "Freeman, Michael" <[EMAIL PROTECTED]>

>What is the "modified" version? I am only familiar with the one that
>comes in current.tgz from cdukes (2.9.2), it is about 110 lines, and
>seems to have support for merge tables..

The "modified" version is the one that     Joel <[EMAIL PROTECTED]> had been
running, albeit for 2.8.  He's stated that his was working under 2.8, but
with so many changes under current, it does not for me.

>Where does this LOGROTATE value come from? I didn't see it in config.php

Sorry, it is LOGROTATERETENTION, not LOGROTATE.


>I'm also confused as to why/how we're actually using merge tables. So if
>you're rotating your logs every 2 days, and at the end of the year you'd
>have 180 tables, the all_logs merge table refers to all 180 tables? How
>does this speed up queries? Shouldn't merge tables be created
>dynamically? For instance, if a user is only searching through data of
>CURRENT_MONTH - CURRENT_MONTH(-2) (two months), why would you need to
>search through 180 tables?

No, the idea should be to rotate whenever logrotate.php is run.  In my case,
I would run logrotate daily at slighltly past midnight.  What I feel should
happen is the following:

1.   Rename the table logs to logsYESTERSDATE.
2.   Drop table(s) older than what LOGROTATERETENTION has stated.
3a.  Drop table all_logs, then re-create this table and MERGE all logs into
that one.

OR

3b. PURGE from all_logs all data from this table where  datetime is older
than what LOGROTATERETENTION has stated.

With regards to the all_logs.MRG having names of tables no longer contained
within the syslog DB, I suspect that this is because the MySql server may
have to be issued a restart command at the end of the logrotate.  Does
anyone know if this is true?

>Or does it not matter due to the nature of MERGE tables? Can someone
>please clue me in? 8)

What version of MySql are you running?


.vp

>-----Original Message-----
>From: Vadim Pushkin [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, July 19, 2006 3:23 PM
>To: Freeman, Michael; php-syslog-ng-support@lists.sourceforge.net
>Subject: RE: [Php-syslog-ng-support] LogRotate (V2.9.2 tested)
>
>Hello Mikael;
>
>Here are my current issues.
>
>1.  Logrotate (the one that comes stock because I was unable to work out
>several bugs with the "modified" version) does not rotate to the correct
>number of days. My LOGROTATE entry has a 2.  Here is what my syslog DB
>has in terms of tables as of right now:
>
>mysql> show tables;
>+------------------
>| Tables_in_syslog
>+-----------------
>| actions
>| all_logs
>| cemdb
>| logs
>| logs20060717
>| logs20060718
>| logs20060719
>| search_cache
>| user_access
>| users
>+-----------------
>10 rows in set (0.00 sec)
>
>2. This AM, I had to edit all_logs.MRG, had to remove logs20060716,
>which was no longer available, presumably dropped as it should have
>been, but why not logs20060717 as well?
>
>PS I am running logrotate at 00:15 HRS and without the removal of
>logs20060716, the front-end would not work.
>
>The below is as of right now (mid-day).
>
>[root /]# cat /var/lib/mysql/syslog/all_logs.MRG
>
>logs
>logs20060717
>logs20060718
>logs20060719
>
>3. Within mysql, tablename "search_cache" shows hostnames in "logs" for
>srv-www-001, this was one of the "canned" hostnames that Clayton
>provided as a test.  They *do not* live in the logs table, though they
>*may* live under all_logs, so why are they still there?  And how do I
>remove them?
>
>With regads to MERGE tables, what version of MySql are you running?  I
>*believe* that this feature will not work on earlier version of MySql.
>
>I hope someone, hopefully someone with far more ability to do something
>about this than I, will find this info useful :)
>
>.vp
>
>
> >From: "Freeman, Michael" <[EMAIL PROTECTED]>
>
> >Did you get anywhere with logrotate.php?
>
> >Can someone please explain to me what is going on with MERGE tables in
> >2.9.2?
>
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED] On Behalf
> >Of Vadim Pushkin
> >Sent: Saturday, July 15, 2006 2:00 PM
> >To: php-syslog-ng-support@lists.sourceforge.net
> >Subject: [Php-syslog-ng-support] LogRotate (V2.9.2 tested)
> >
> >Hello All;
> >
> >I've downloaded and am testing the latest (2.9.2) and have set
> >LOGROTATE to
> >2 within my config.php file.  So far, I now have 3 days worth of data,
> >when I should have just 2.
> >
> >I have *not* re-created my SQL db, and assuming this does not matter,
> >am I the only one with this problem?
> >
> >Thanks,
> >
> >.vp



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Php-syslog-ng-support mailing list
Php-syslog-ng-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/php-syslog-ng-support

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Php-syslog-ng-support mailing list
Php-syslog-ng-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/php-syslog-ng-support

Reply via email to