Author Topic: Qloaderd add every line twice into MySQL  (Read 2911 times)

chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Qloaderd add every line twice into MySQL
« on: June 11, 2010, 06:00:09 »
Well, i think that subject is clear. Here there are some views:

qloaderd.log
 |Thu Jun 10 20:29:52 2010|Loaded 41000 lines so far...
 |Thu Jun 10 21:34:43 2010|Loaded 100 lines so far...
 |Thu Jun 10 21:43:16 2010|Loaded 41100 lines so far...
 |Thu Jun 10 22:11:16 2010|Heart is still beating... Imported: 41115 lines.
 |Thu Jun 10 22:11:17 2010|Heart is still beating... Imported: 130 lines.


# grep 1276088424.31309 /var/log/asterisk/queue_log
1276088450|1276088424.31309|500|NONE|ENTERQUEUE||45481262
1276088451|1276088424.31309|500|Local/3644@from-dinamicqueues/n|CONNECT|1|1276088450.31323|1
1276088722|1276088424.31309|500|Local/3644@from-dinamicqueues/n|COMPLETECALLER|1|271|1
1276088731|1276088424.31309|NONE|Agent/3644|CALLSTATUS|PA121

Here we can see that logs in queue_log file is good

mysql> SELECT * FROM queue_log WHERE call_id='1276088424.31309';
+-----------+------------+------------------+-------+------------+----------------+-------+------------------+-------+-------+----------+------------------+
| partition | time_id    | call_id          | queue | agent      | verb           | data1 | data2            | data3 | data4 | serverid | unique_row_count |
+-----------+------------+------------------+-------+------------+----------------+-------+------------------+-------+-------+----------+------------------+
| P001      | 1276088450 | 1276088424.31309 | 500   | NONE       | ENTERQUEUE     |       | 45481262         |       |       |          |                1 |
| P001      | 1276088450 | 1276088424.31309 | 500   | NONE       | ENTERQUEUE     |       | 45481262         |       |       |          |                2 |
| P001      | 1276088451 | 1276088424.31309 | 500   | Agent/3644 | CONNECT        | 1     | 1276088450.31323 | 1     |       |          |                1 |
| P001      | 1276088451 | 1276088424.31309 | 500   | Agent/3644 | CONNECT        | 1     | 1276088450.31323 | 1     |       |          |                2 |
| P001      | 1276088722 | 1276088424.31309 | 500   | Agent/3644 | COMPLETECALLER | 1     | 271              | 1     |       |          |                1 |
| P001      | 1276088722 | 1276088424.31309 | 500   | Agent/3644 | COMPLETECALLER | 1     | 271              | 1     |       |          |                2 |
| P001      | 1276088731 | 1276088424.31309 | NONE  | Agent/3644 | CALLSTATUS     | PA121 |                  |       |       |          |                1 |
| P001      | 1276088731 | 1276088424.31309 | NONE  | Agent/3644 | CALLSTATUS     | PA121 |                  |       |       |          |                2 |
+-----------+------------+------------------+-------+------------+----------------+-------+------------------+-------+-------+----------+------------------+
8 rows in set (6.92 sec)

If delete duplicate rows whit a sentence like "DELETE FROM queue_log WHERE unique_row_count=2;", the problems about stints and reports desappears from QueueMetrics, but Reports is saw in any moment, so, change database manually is not a posible solution, any sugestion will be apreciated.

PD: Problems after logs rotation.

chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Re: Qloaderd add every line twice into MySQL
« Reply #1 on: June 11, 2010, 22:06:09 »