Bug#301883: asterisk: sqlite logging enabled by default and never rotated

Jose Carlos Garcia Sogo Jose Carlos Garcia Sogo <jsogo@debian.org>, 301883@bugs.debian.org
Mon Jul 11 11:54:59 UTC 2005


On Mon, Jul 11, 2005 at 02:06:02PM +0300, Tzafrir Cohen wrote:
> On Mon, Apr 04, 2005 at 09:32:31PM +0200, Kilian Krause wrote:
> > Hi Jose,
> > 
> > > > Or simply: purge all records older than a month.
> > > 
> > >  Yes, that should work, IMO. I though about using sql after writing my
> > > previous mail to this bug. The problem with this is that I am quite bad
> > > with sql (I actually don't know the language) so if someone could write
> > > the "query" to use...
> > 
> > the query would be something like "delete from $mytable where
> > $insertdate < $(today-1month)" with the variables holding the correct
> > names etc.
> 
> So what's up with this?
> 
> I believe the command should be:
> 
>   echo "delete from cdr where julianday('now')-julianday(start) > 30;" \
> 	|sqlite /var/log/asterisk/cdr.db
> 
> One my system this seems to be off by an hour or two due to timezone 
> issues. Not a big deal, I figure.
> 
> As someone has noted, this probably won't shrink the database. How do I
> do that?
> 
> 
> > 
> > Yet I strongly disagree with this behaviour for a default. At least the
> > 1 month rollback sounds like too few from a data-warehouse point of view
> > and too much from a duty of secrecy point of view. The only real
> > alternative sounds to be a debconf asking for the proper length.
> > 
> > Does that sound ok for everybody?
> 
> If this is what you think, you should start by changing the default log
> rotation of cdr-csv/Master.csv . Records there are deleted after about a
> month.

  Yes, this needs to be looked at again. I have yet a server up and
  running, so I can check stuff again. I want to take a look at VoIP
  bugs we have lately in BTS during Debconf. I think I will ask about
  this late in the hacklab here at debconf.

--
Jose Carlos Garcia Sogo
  jsogo@debian.org





More information about the Pkg-voip-maintainers mailing list