QueueMetrics > QueueMetrics installation

QM 1.6 and realtime queue_log

<< < (2/7) > >>

QueueMetrics:
You should have something on Asterisk's log, e.g. on the FULL log.

trymes:
I did not see anything, but I'll go back and scour it.

trymes:
Sure enough, it was there. Don't know how I missed it the first time....


--- Code: ---[Oct 25 14:48:43] VERBOSE[28356] config.c:   == Binding queue_log to mysql/asterisk/queue_log
[Oct 25 14:48:43] WARNING[28356] res_config_mysql.c: MySQL RealTime: Invalid database specified: 'asterisk' (check res_mysql.conf)
[Oct 25 14:48:43] VERBOSE[28356] logger.c:  Asterisk Queue Logger restarted
[
--- End code ---

So, I checked my res_mysql.conf and found:


--- Code: ---;
; Sample configuration for res_config_mysql.c
;
; The value of dbhost may be either a hostname or an IP address.
; If dbhost is commented out or the string "localhost", a connection
; to the local host is assumed and dbsock is used instead of TCP/IP
; to connect to the server.
;
[general]
dbhost = 127.0.0.1
dbname = asteriskrealtime
dbuser = asteriskuser
dbpass = eLaStIx.asteriskuser.2oo7
;dbport = 3306
;dbsock = /tmp/mysql.sock

--- End code ---

I checked MySQL and found this:

--- Code: ---mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| asterisk           |
| asteriskcdrdb      |
| meetme             |
| mya2billing        |
| mysql              |
| queuemetrics       |
| roundcubedb        |
| test               |
| vtigercrm510       |
+--------------------+
10 rows in set (0.01 sec)

--- End code ---

You'll notice that there is no "asteriskrealtime" database as specified in the res_mysql.conf file. Before I just modify the file, does anyone have some pointers? Keep in mind that this is an Elastix 2.0 box running FreePBX.

Tom

trymes:
OK, I got impatient and just changed /etc/asterisk/res_mysql.conf, given that I could see no harm. After doing that and restarting asterisk, I now get this in the full log:


--- Code: ---[Oct 26 17:07:50] WARNING[25195] config.c: Realtime mapping for 'queue_log' found to engine 'mysql', but the engine is not available
--- End code ---

It seems that the logger is starting before the mysql engine is loaded. If I reload asterisk, I then get this error again:


--- Code: ---[Oct 26 17:47:41] VERBOSE[12854] config.c:   == Binding queue_log to mysql/asterisk/queue_log
[Oct 26 17:47:41] WARNING[12854] res_config_mysql.c: MySQL RealTime: Invalid database specified: 'asterisk' (check res_mysql.conf)

--- End code ---

This is my res_mysql.conf file:


--- Code: ---;
; Sample configuration for res_config_mysql.c
;
; The value of dbhost may be either a hostname or an IP address.
; If dbhost is commented out or the string "localhost", a connection
; to the local host is assumed and dbsock is used instead of TCP/IP
; to connect to the server.
;
; Modified "dbname" to "asterisk" from "asteriskrealtime" as part of enabling
; realtime storage of queue_log. - Tom Rymes 10-26-10
[general]
dbhost = 127.0.0.1
dbname = asterisk
dbuser = asteriskuser
dbpass = eLaStIx.asteriskuser.2oo7
;dbport = 3306
;dbsock = /var/lib/mysql/mysql.sock

--- End code ---

I don't think that permissions issues are the problem here, as I can connect to the database from the command line:

--- Code: ---[root@vox ~]# mysql -u asteriskuser -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2293
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from queue_log;
Empty set (0.00 sec)

mysql>

--- End code ---
So, I am stumped here. Going to switch back to the old method until someone can point me in the right direction....

Tom

QueueMetrics:
You sure you have the mysql-dev modules and the mysql engine compiled in? does Elastix support it?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version