Leif Madsen
2003-Sep-30 08:57 UTC
[Asterisk-Users] * not logging CDR to MySQL - anyway I can debug this?
Hi all, I think I've run out of options in terms of what I know about this. I have created a user called asteriskuser and granted all privileges to the asteriskcdrdb database. Then I created the table via the cdr_mysql.txt file. I have edited the cdr_mysql.conf file to reflect this, and added load => cdr_addon_mysql.so after compiling it from the latest CVS. If I check the Master.csv file in /var/log/asterisk/cdr-csv/ then I can see that Asterisk is indeed logging calls, so no problem there, but I don't know if it is connecting to the database, getting an error, even attempting? The database stays empty after placing or receieving calls. What else can I do to debug this and try to find out where Asterisk is failing to write to the DB? (yes, the database is started :)) I've verified that I can login to mysql with the username and password, and it's fine. Then I do a select * from asteriskcdrdb.cdr; to see if anything has been written, and sure enough, just Empty. Any and all help greatly appreciated! Thanks, Leif Madsen.
Tilghman Lesher
2003-Sep-30 09:07 UTC
[Asterisk-Users] * not logging CDR to MySQL - anyway I can debug this?
On Tuesday 30 September 2003 10:57, Leif Madsen wrote:> I have created a user called asteriskuser and granted all privileges > to the asteriskcdrdb database. Then I created the table via the > cdr_mysql.txt file. I have edited the cdr_mysql.conf file to reflect > this, and added load => cdr_addon_mysql.so after compiling it from > the latest CVS. > > If I check the Master.csv file in /var/log/asterisk/cdr-csv/ then I > can see that Asterisk is indeed logging calls, so no problem there, > but I don't know if it is connecting to the database, getting an > error, even attempting? > > The database stays empty after placing or receieving calls. What > else can I do to debug this and try to find out where Asterisk is > failing to write to the DB? (yes, the database is started :)) > > I've verified that I can login to mysql with the username and > password, and it's fine. Then I do a select * from > asteriskcdrdb.cdr; to see if anything has been written, and sure > enough, just Empty.Try this command (from your bash shell): grep cdr_mysql /var/log/asterisk/messages -Tilghman
Leif Madsen
2003-Sep-30 09:52 UTC
[Asterisk-Users] * not logging CDR to MySQL - anyway I can debug this?
Tilghman Lesher wrote:> > Try this command (from your bash shell): > grep cdr_mysql /var/log/asterisk/messagesmessages does not exist... ? Thanks, Leif Madsen.
Tilghman Lesher
2003-Sep-30 10:05 UTC
[Asterisk-Users] * not logging CDR to MySQL - anyway I can debug this?
On Tuesday 30 September 2003 11:52, Leif Madsen wrote:> Tilghman Lesher wrote: > > Try this command (from your bash shell): > > grep cdr_mysql /var/log/asterisk/messages > > messages does not exist... ?Try uncommenting the line in /etc/asterisk/logger.conf. Restart your Asterisk process, try a few calls and do the above command again. -Tilghman
Leif Madsen
2003-Sep-30 15:02 UTC
[Asterisk-Users] * not logging CDR to MySQL - anyway I can debug this?
Tilghman Lesher wrote:> I would recommend that you remove debug from logging, unless you have > a situation where you really need it. The debug log contains a lot of > information, which can consume disk space quite quickly. In addition, > because of the verbosity, the debug log can contain information such as > passwords that you would not want available to anybody who could read > the logfile.OK, I will take a look at that. Now that I have everything working though, I can figure out exactly what I want to log, and tone it down quite a bit. Thanks again! Leif Madsen.
Andrew Joakimsen
2003-Sep-30 15:48 UTC
[Asterisk-Users] * not logging CDR to MySQL - anyway I can debug this?
How did you get it to work? I cannot figure out how to get mysql cdrs working, all I get is: ERROR[16401]: File cdr_mysql.c, Line 130 (mysql_log): Failed to insert into database.> -----Original Message----- > From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- > admin@lists.digium.com] On Behalf Of Leif Madsen > Sent: Tuesday, September 30, 2003 6:03 PM > To: asterisk-users@lists.digium.com > Subject: Re: [Asterisk-Users] * not logging CDR to MySQL - anyway Ican> debug this? > > Tilghman Lesher wrote: > > > I would recommend that you remove debug from logging, unless youhave> > a situation where you really need it. The debug log contains a lotof> > information, which can consume disk space quite quickly. Inaddition,> > because of the verbosity, the debug log can contain information suchas> > passwords that you would not want available to anybody who couldread> > the logfile. > > OK, I will take a look at that. Now that I have everything working > though, I can figure out exactly what I want to log, and tone it down > quite a bit. > > Thanks again! > Leif Madsen. > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users