[phpLogCon] maintenance.sh / php script doesn't work

Michael Mansour mic at npgx.com.au
Wed Sep 29 05:51:02 CEST 2010


Hi Andre,

> Hi,
> 
> I just saw that  the maintenance script does expect a number as 
> source property. Please change the following code in your 
> maintenance.php:
> 
> 		// Set to SourceID property!
> 		$content['SOURCEID'] = intval( $_SERVER["argv"][2] );
> 
> Into this code:
> 
> 		// Set to SourceID property!
> 		$content['SOURCEID'] = $_SERVER["argv"][2];
> 
> This should fix your problem for now.

Perfect:

# php ./maintenance.php cleandata Source1 olderthan 432000
Num.    Facility .      Debug Message
1.      Information.    CleanData.      Cleaning data for logstream source
'NPGX Maillogs'.
2.      Information.    CleanData.      Successfully connected and found
'1293734' rows in the logstream source.
3.      Information.    CleanData.      Performing deletion of data entries
older then '2010-09-24'.
4.      Information.    CleanData.      Successfully Deleted '0' rows in the
logstream source.'

I'll verify this output again after the 5th day of logs.

Thank you.

Michael.

> Best regards,
> Andre Lorbach
> > -----Original Message-----
> > From: phplogcon-bounces at lists.adiscon.com [mailto:phplogcon-
> > bounces at lists.adiscon.com] On Behalf Of Michael Mansour
> > Sent: Sonntag, 26. September 2010 02:41
> > To: phplogcon at lists.adiscon.com
> > Subject: [phpLogCon] maintenance.sh / php script doesn't work
> > 
> > Hi,
> > 
> > I've just installed the latest LogAnalyzer 3.0.1 software and got it
> working
> > with rsyslog MySQL DB logging.
> > 
> > Everything is nice and clean and works well.
> > 
> > Trying to get the maintenance script working though fails, with this error:
> > 
> > # php ./maintenance.php cleardata 1 olderthan 86400
> > Num.    Facility .      Debug Message
> > 
> > 
> >         Critical Error occured  -       Errordetails:
> >         Logstream Source with ID '1' could not be found in the Database!
> > 
> >         Terminating now!
> > 
> > I've tried to trouble-shoot this extensively my end but can't figure out
> what
> > the problem is.
> > 
> > In config.php the source ID is:
> > 
> > $CFG['DefaultSourceID'] = 'Source1';
> > 
> > $CFG['Sources']['Source1']['ID'] = 'Source1';
> > 
> > and the config.php file which the script references has all the login
> details to
> > the DB with the correct DB privileges.
> > 
> > Any ideas what could be wrong here?
> > 
> > I'm thinking if I can't get this working I'll just need to generate some
> sort of
> > MySQL script/query to delete entries older than the time I need.
> > 
> > Thanks.
> > 
> > Michael.
> > 
> > _______________________________________________
> > phpLogCon mailing list
> > http://lists.adiscon.net/mailman/listinfo/phplogcon
> > http://www.phplogcon.org
> _______________________________________________
> phpLogCon mailing list
> http://lists.adiscon.net/mailman/listinfo/phplogcon
> http://www.phplogcon.org
------- End of Original Message -------




More information about the phpLogCon mailing list