Author Topic: Qmetrics don't load data from SQL???  (Read 8155 times)

adolfo

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
    • Email
Qmetrics don't load data from SQL???
« on: October 01, 2007, 16:29:36 »
Hello
I'm testing a demo of queuemetrics 1.4.2 version
I have a problem with qmetrics and Mysql storage.
My db called queuemetrics contains data loaded from asterisk logs. Ok , it's correct
About one week, Queuemetrics shown the data of my database in his web interface, making graphics and working fine updating all call entries received.

But today, when we arrive the office, the queuemetrics web interface, shows nothing,  but the Mysql database exists and it is full with our queue data.

No calls data in the graphics on web interface.
The connection database is ok: db=queuemetrics, pass=javadude, etc.....
Tomcat is running. I restart it without sucess
The SQL Connector used is mysql-connector-java-3.0.17
I run the JDBC connection tester and all it's ok
Sql database contains old entries. For example, I select data from queue_log and shows :

................
| P000                 | 1190718768 | 1190718754.713 | 1001  | Local/110@from-internal-5766,1 | CONNECT             | 7                                            |            |               |       |          |                1 |
| P000                 | 1190719074 | 1190719067.725 | 1000  | NONE                           | ENTERQUEUE          |                                              | 0912021500 |               |       |          |                1 |
| P000                 | 1190719076 | 1190719067.725 | 1000  | Local/101@from-internal-d5be,1 | CONNECT             | 2                                            |            |               |       |          |                1 |
| P000                 | 1190719185 | 1190718754.713 | 1001  | Local/110@from-internal-5766,1 | COMPLETECALLER      | 7                                            | 417        |               |       |          |                1 |
| P000                 | 1190719287 | 1190719067.725 | 1000  | Local/101@from-internal-d5be,1 | COMPLETECALLER      | 2                                            | 211        |               |       |          |                1 |
| P000                 | 1190720391 | 1190720383.756 | 1000  | NONE                           | ENTERQUEUE          |                                              | 699317721  |               |       |          |                1 |
| P000                 | 1190720393 | 1190720383.756 | 1000  | Local/101@from-internal-3754,1 | CONNECT             | 2                                            |            |               |       |          |                1 |
| P000                 | 1190720442 | 1190720383.756 | 1000  | Local/101@from-internal-3754,1 | COMPLETECALLER      | 2                                            | 49         |               |       |          |                1 |
| P000                 | 1190721472 | NONE           | NONE  | NONE                           | HEARTBEAT           |                                              |            |               |       |          |                1 |
+----------------------+------------+----------------+-------+--------------------------------+---------------------+--                                       -----+------------+---------------+-------+----------+------------------+
435 rows in set (0.00 sec)

I repeat: all seems works ok about one week. But today queuemetrics shows nothing.
What' s happen? Somebody have an idea about it?

Thanks in advance



PD: excuse me for my bad english.





« Last Edit: October 01, 2007, 18:59:46 by adolfo »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Qmetrics don't load data from SQL???
« Reply #1 on: October 01, 2007, 20:15:34 »
Try restarting qloaderd and see if the database gets current. If it does, likely the queue_log file was rotated without restarting qloaderd.

adolfo

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
    • Email
Re: Qmetrics don't load data from SQL???
« Reply #2 on: October 02, 2007, 11:41:10 »
i do it. I restart qloaderd service. Data is loading in mysql database. There is new entries. But same result.

Queuemetrics don't shows reports of calls received.

Somebody can help me? some idea?

Thanks

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Qmetrics don't load data from SQL???
« Reply #3 on: October 02, 2007, 15:07:36 »
Please check if the time zone is the same for both machines.

adolfo

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
    • Email
Re: Qmetrics don't load data from SQL???
« Reply #4 on: October 03, 2007, 17:15:34 »

I know what happened. The system configuration log rotate for asterisk logs runs weekly.
When it runs, queue_log has any entries. And logically, queuemetrics shows nothing
When I select MySQL database partition(SQL:P001) in the custom report and all historical data is loaded.
This is possible edit the /usr/local/tomcat/webapps/queuemetrics-1.4.2/WEB-INF/configuration.properties
and insert default.queue_log_file=SQL:P01. I was running with the default configuration, /var/log/asterisk/queue_log

Now after restart  the qloaderd script , all new data calls is featuring in the graphips plus the historical.
A little big error.

Anyway thanks for support

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Qmetrics don't load data from SQL???
« Reply #5 on: October 03, 2007, 17:57:25 »
Yes, this might be a good reason why  8)
Nice to know the issue is solved.

adolfo

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
    • Email
Re: Qmetrics don't load data from SQL???
« Reply #6 on: October 08, 2007, 13:44:26 »
one more issue.

after rotate queue_log asterisk log file, is necessary to make a 'logger reload' in the asterisk console and restart qloaderd.

If I dont do this, I experiment the same situation I expose in the beginning of post, Qloaderd no load new entries in database.




QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Qmetrics don't load data from SQL???
« Reply #7 on: October 09, 2007, 12:08:43 »
Yes this is correct. My suggestion is to add the logger rotate and qloaderd restart to the logrotate file, something like:

Code: [Select]
/var/log/asterisk/*log {
   missingok
   rotate 5
   weekly
   create 0640 asterisk asterisk
   postrotate
       /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
       /etc/init.d/qloaderd restart > /dev/null 2> /dev/null
   endscript
}

in your /etc/logrotate.d/asterisk.logrotate file.