Ahh yes, that problem arose for one of my customers using the program.
I've written a user guide which outlines the need to do that, but it
has sensitive customer data in it. I'll see if I can scrub the doc and
send it out for inclusion in the next release.
On 9/20/06, Vadim Pushkin <[EMAIL PROTECTED]> wrote:
> Hi Clayton;
>
> 1. The attached logtotate.php script seems to have worked, but so was the
> one before posted by Ian. The problem that I was having was due to user
> error, not application error. :-( I realized that when you are doing a
> search using old logs that you need to specify the date ranges to match the
> logs you are browsing. I took a look at the SQL statement that the search
> was using, changed it to match the dates for the log I chose, and voila, I
> had data.
>
> 2. Is there any way, when choosing an old log, to automatically alter the
> SQL statement in the GUI to peform a search using the same date ranges as
> the log itself? I.e., when searching logs20060704, then also limit the
> search to dates 20060704? Like this "WHERE datetime > '2006-07-04"?
>
> Many thanks to Clayton, Ian, Matt and all others for the great help!
>
> .vp
>
>
> >
> >OK, this is diff from what I am running and from what Ian posted, but I
> >will
> >run this and let you know my results tomorrow.'
> >
> >Thanks!
> >
> >.vp
> >
> > >Hmmm...
> > >Not sure, try this script:
> > >
> > >#!/usr/bin/php
> >>
> >>[...SNIP...]
> > >
> > >
> > >On 9/19/06, Vadim Pushkin <[EMAIL PROTECTED]> wrote:
> > >>but both logs20060917 and logs20060917 are *not* older than 2. If I
> >set
> > >>this to 90, then I will have to wait 90 days to encounter this bug.
> > >>
> > >>It keeps the proper tablename in the pulldown, the tables exist, and
> > >>contain
> > >>data, but I am unable to search them using the GUI.
> > >>
> > >>.vp
> > >>
> > >> >Well that's why, if you set retention to 2, it will delete anything
> > >>older.
> > >> >Try setting to 90
> > >> >
> > >> >
> > >> >On 9/19/06, Vadim Pushkin <[EMAIL PROTECTED]> wrote:
> > >> >>HI Clayton;
> > >> >>
> > >> >>Welcome back!
> > >> >>
> > >> >>I am still having one issue, I am able to see data when using the
> > >>pulldown
> > >> >>for either:
> > >> >>
> > >> >>logs
> > >> >>all_logs
> > >> >>logs20060919 (today)
> > >> >>
> > >> >>I am *unable* to see any data for either:
> > >> >>
> > >> >>logs20060917 (two days ago)
> > >> >>logs20060918 (yesterday)
> > >> >>
> > >> >>Incidentally, all_logs and logs contain only what is contained in
> > >>todays
> > >> >>(logs20060919) logs.
> > >> >>
> > >> >>So, while the logrotate is better, and I am able to see a login
> >screen
> > >>and
> > >> >>login sucessfully, I am no longer able to see any data that is older
> > >>than
> > >> >>todays date.
> > >> >>
> > >> >>Lastly, I have my logrotate set to 2 (reasoning why I am only seeing
> > >>two
> > >> >>days worth of options in my pulldown) within my config.php as:
> > >> >>
> > >> >>define('LOGROTATERETENTION', 2);
> > >> >>
> > >> >>Thanks in advance all,
> > >> >>
> > >> >>.vp
> > >> >>
> > >> >> >I've confirmed that the logrotate fixes are working as well.
> > >> >> >
> > >> >> >
> > >> >> >On 8/31/06, Vadim Pushkin <[EMAIL PROTECTED]> wrote:
> > >> >> >>Great news Ian. Are you also able to see data within the various
> > >>logs
> > >> >> >>with
> > >> >> >>a date?
> > >> >> >>
> > >> >> >>Regards,
> > >> >> >>
> > >> >> >>.vp
> > >> >> >>
> > >> >> >> >I incorporated MattW's fix into logrotate.php which you can find
> > >>as
> > >> >>an
> > >> >> >> >attachment here:
> > >> >> >> >
> > >> >> >> >http://code.google.com/p/php-syslog-ng/issues/list
> > >> >> >> >
> > >> >> >> >See item ID 6.
> > >> >> >> >
> > >> >> >> >I've used it for a week and it fixes the GUI login problem and
> > >> >>deletes
> > >> >> >> >the old tables as specified by the retention config setting.
> > >> >> >> >
> > >> >> >> >On 8/29/06, Vadim Pushkin <[EMAIL PROTECTED]> wrote:
> > >> >> >> >>
> > >> >> >> >>Help!
> > >> >> >> >>
> > >> >> >> >>Has anyone been able to fix or test Matts new logrotate? So
> >far,
> > >> >>this
> > >> >> >>is
> > >> >> >> >>the only bug, albeit a big one, in this entire package!
> > >> >> >> >>
> > >> >> >> >>Thank you,
> > >> >> >> >>
> > >> >> >> >>.vp
> > >> >> >> >>
> > >> >> >> >>
> > >> >> >> >> >From: "Vadim Pushkin" <[EMAIL PROTECTED]>
> > >> >> >> >> >To: [EMAIL PROTECTED],
> > >>[email protected]
> > >> >> >> >> >Subject: Re: [Php-syslog-ng-support] Logrotate.php
> > >> >> >> >>
> > >> >> >> >> >Hi Matt;
> > >> >> >> >> >
> > >> >> >> >> >Have you been able to determine if your changes worked?
> > >> >> >> >> >
> > >> >> >> >> >1. Were you able to sucessfully rotate logs?
> > >> >> >> >> >2. Were you able to keep n number of days worth of logs
> >within
> > >> >>the
> > >> >> >> >> >all_logs
> > >> >> >> >> >table?
> > >> >> >> >> >
> > >> >> >> >> >Thank you,
> > >> >> >> >> >
> > >> >> >> >> >.vp
> > >> >> >> >> >
> > >> >> >> >> >
> > >> >> >> >> > >From: "Matt Westby" <[EMAIL PROTECTED]>
> > >> >> >> >> > >To: <[email protected]>
> > >> >> >> >> > >Subject: Re: [Php-syslog-ng-support] Logrotate.php
> > >> >> >> >> > >Date: Thu, 17 Aug 2006 12:40:07 +0100
> > >> >> >> >> >
> > >> >> >> >> > >... The script therefore becomes
> > >> >> >> >> > >
> > >> >> >> >> > >
> > >> >> >> >> > >-- snip --
> > >> >> >> >> >
> > >> >> >> >> > >-- snip --
> > >> >> >> >> > >
> > >> >> >> >> > >Not tested it yet ... Waiting for tonight's logrotate.
> > >> >> >> >> > >
> > >> >> >> >> > >Matt
> > >> >> >> >> > >
> > >> >> >> >> > >-----Original Message-----
> > >> >> >> >> > >From: Vadim Pushkin [mailto:
> > >> >> >> >> > >Sent: 17 August 2006 12:33
> > >> >> >> >> > >To: Matt Westby
> > >> >> >> >> > >Subject: RE: [Php-syslog-ng-support] Logrotate.php
> > >> >> >> >> > >
> > >> >> >> >> > >Did you fix the script? I am suffering badly from this bug
> > >> >>right
> > >> >> >> >>now...
> > >> >> >> >> > >
> > >> >> >> >> > >.vp
> > >> >> >> >> > >
> > >> >> >> >> > >
> > >> >> >> >> > > >
> > >> >> >> >> > > >Have just implemented the logretention settings withing
> > >> >>logrotate
> > >> >> >> >>after
> > >> >> >> >> > >
> > >> >> >> >> > > >filling up the drive space rather quickly.
> > >> >> >> >> > > >
> > >> >> >> >> > > >Looking at the list archive - it seems that others have
> > >>come
> > >> >> >>across
> > >> >> >> >>the
> > >> >> >> >> > >
> > >> >> >> >> > > >issue that I am now seeing.
> > >> >> >> >> > > >
> > >> >> >> >> > > >After the logrotate in the evening - the Web GUI no
> >longer
> > >> >>works
> > >> >> >> >>with a
> > >> >> >> >> > >
> > >> >> >> >> > > >Query failed: Can't find file: 'all_logs' (errno: 2)
> > >> >> >> >> > > >
> > >> >> >> >> > > >This is because we have created the merged all_logs table
> > >> >>using
> > >> >> >>an
> > >> >> >> >> > > >outdated list of available log tables.
> > >> >> >> >> > > >
> > >> >> >> >> > > >The current logic is:
> > >> >> >> >> > > >Get list of all tables if creating merge tables or
> >dropping
> > >> >>table
> > >> >> >> >>Are
> > >> >> >> >> > > >we looking to drop a table? Yes : Search list for old
> >table
> > >>&
> > >> >> >>drop
> > >> >> >> >>it
> > >> >> >> >> > > >Do we want to create merge table? Yes : create merge
> >using
> > >> >>list
> > >> >> >>we
> > >> >> >> >>have
> > >> >> >> >> > >
> > >> >> >> >> > > >got.
> > >> >> >> >> > > >
> > >> >> >> >> > > >The list includes the table we just dropped - hence the
> > >>error
> > >> >> >> >> > > >
> > >> >> >> >> > > >Change the script to
> > >> >> >> >> > > >
> > >> >> >> >> > > >Are we looking to drop a table? Yes : get a list of
> >tables.
> > >> >> >>Search
> > >> >> >> >>list
> > >> >> >> >> > >
> > >> >> >> >> > > >for old table & drop it Do we want to create merge table?
> > >>Yes
> > >> >>:
> > >> >> >>get
> > >> >> >> >>a
> > >> >> >> >> > > >list of tables. Create merge.
> > >> >> >> >> > > >
> > >> >> >> >> > > >Maybe a FLUSHTABLES is needed in there -- but not sure
> > >> >> >> >> > > >
> > >> >> >> >> > > >Matt
> > >> >> >> >> > > >
> > >> >> >> >> > > >Matt Westby | Senior Technical Analyst
>
>
>
--
=============================
Clayton Dukes
NMS Consulting Engineer, Advanced Services
Cisco Systems, Inc.
Office: 919.392.6122
Fax: : 919.869.1580
Cell: 813.545.7373
Email: [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
=============================
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/php-syslog-ng-support