QueueMetrics forum

QueueMetrics => Running QueueMetrics => Topic started by: jahyde on April 15, 2011, 18:27:30

Title: Reports not updating
Post by: jahyde on April 15, 2011, 18:27:30
I am having a problem getting reports to update, this is just a demo system, and I have qloader setup.

Under the agent logon it shows several calls processed yesterday, and 3 for today.

But if I login as admin and select the Q, and run the Quick Activity report for today, it shows 0 calls processed, when I open the report for yesterday, it shows the correct calls.

I restarted services, and checked the qloaderd.log:
Code: [Select]
|Fri Apr 15 08:24:13 2011|Heart is still beating... Imported: 53 lines.
 |Fri Apr 15 08:39:14 2011|Heart is still beating... Imported: 53 lines.
 |Fri Apr 15 09:17:09 2011|QueueMetrics MySQL loader - $Revision: 1.19 $
 |Fri Apr 15 09:17:09 2011|Partition P001 - PID 6927 - TZ offset: 0 s. - Heartbeat after 900 s.
 |Fri Apr 15 09:17:09 2011|Now connecting to DB queuemetrics on localhost as user queuemetrics with password javadude
 |Fri Apr 15 09:17:09 2011|Ignoring all timestamps below 1302883639
 |Fri Apr 15 09:17:09 2011|Skipped 100 lines so far...

and Queue_log:
Code: [Select]
1302883305|1302883305.88|162|SIP/105|ADDMEMBER|
1302883322|1302883235.76|162|SIP/105|RINGNOANSWER|15000
1302883343|1302883235.76|162|SIP/105|RINGNOANSWER|15000
1302883364|1302883235.76|162|SIP/105|RINGNOANSWER|15000
1302883385|1302883235.76|162|SIP/105|CONNECT|149|1302883376.92|8
1302883409|1302883235.76|162|SIP/105|COMPLETEAGENT|149|24|1
1302883427|1302883426.93|160|NONE|ENTERQUEUE||103|1
1302883428|1302883426.93|160|NONE|ABANDON|1|1|1
1302883431|1302883431.95|162|NONE|ENTERQUEUE||103|1
1302883434|1302883431.95|162|SIP/105|CONNECT|3|1302883431.96|2
Title: Re: Reports not updating
Post by: jahyde on April 15, 2011, 22:06:03
So I check 3 hours later, and the data is there - why the long delay?

I waited almost an hour after the calls, and it still showed 0 calls for today.
Title: Re: Reports not updating
Post by: jahyde on April 16, 2011, 01:01:21
ok, so I think I got this solved - http://queuemetrics.com/faq.jsp#faq-057-rt_not_working

The time was off on the realtime page, but now I have it corrected, reports are showing, and realtime page shows the right time, but it will not show any calls.

Agents show on the realtime page, but not calls being processed - it stays blank.
Title: Re: Reports not updating
Post by: jahyde on April 17, 2011, 10:18:34
soo.... that did NOT work. Since I was running on an OpenVZ virtual container, there was no access to hwclock - I am thinking that was stopping *some* of the realtime logging.

So I loaded everything up on another platform with asterisk 1.8.3.2, and QM 1.7.0.2 (noticed this just came out).

Now my queue_log has like 10 lines in it, but it just stopped completely - nothing else will log to it.

I have not setup mysql rt logging, so I am not sure why nothing is logging to flatfile - is there any tips to troubleshooting flatfile logging?

I checked my compiled menu select options on both systems, and they are the same, I even copied over the queuemetrics configuration.properties from the other system. Its a little annoying that digium makes very little info on QueueLog. On my other PBXes, the queuelog just works, and I see no mention anywhere of the log settings, or what is generating that data - can only assume its a compiled option.
Title: Re: Reports not updating
Post by: jahyde on April 17, 2011, 10:24:50
so I enabled asterisk rt mysql  logging, but QM is still blank on the real time page, i have the following logged in mysql:
Code: [Select]
mysql> use asterisk
mysql> select * from queue_log;
+----+----------------------------+--------------+-----------+-----------+----------------+---------+--------------+-------+-------+-------+
| id | time                       | callid       | queuename | agent     | event          | data1   | data2        | data3 | data4 | data5 |
+----+----------------------------+--------------+-----------+-----------+----------------+---------+--------------+-------+-------+-------+
|  1 | 2011-04-17 01:10:46.502008 | NONE         | NONE      | NONE      | QUEUESTART     |         |              |       |       |       |
|  2 | 2011-04-17 01:10:46.509132 | 1303027846.0 | 162       | NONE      | ENTERQUEUE     |         | 103          | 1     |       |       |
|  3 | 2011-04-17 01:10:47.262150 | 1303027846.0 | 162       | SIP/105   | CONNECT        | 1       | 1303027846.1 | 0     |       |       |
|  4 | 2011-04-17 01:10:53.988137 | 1303027846.0 | 162       | SIP/105   | COMPLETECALLER | 1       | 6            | 1     |       |       |
|  5 | 2011-04-17 01:15:08.263175 | 1303028108.3 | 161       | SIP/105   | REMOVEMEMBER   |         |              |       |       |       |
|  6 | 2011-04-17 01:15:11.258007 | 1303028111.5 | 162       | SIP/105   | REMOVEMEMBER   |         |              |       |       |       |
|  7 | 2011-04-17 01:15:27.532822 | 1303028127.7 | NONE      | Agent/105 | HOTDESK        | SIP/105 |              |       |       |       |
|  8 | 2011-04-17 01:15:27.549873 | 1303028127.7 | 161       | SIP/105   | ADDMEMBER      |         |              |       |       |       |
|  9 | 2011-04-17 01:15:30.604001 | 1303028130.9 | NONE      | Agent/105 | HOTDESK        | SIP/105 |              |       |       |       |
| 10 | 2011-04-17 01:15:30.623142 | 1303028130.9 | 162       | SIP/105   | ADDMEMBER      |         |              |       |       |       |
+----+----------------------------+--------------+-----------+-----------+----------------+---------+--------------+-------+-------+-------+


And I set the config settings as follows and restarted QM:

Code: [Select]
default.queue_log_file=astr:asterisk|3
sqlPreset.3.table=queue_log
sqlPreset.3.f_time_id=time
sqlPreset.3.f_call_id=callid
sqlPreset.3.f_queue=queuename
sqlPreset.3.f_agent=agent
sqlPreset.3.f_verb=event
sqlPreset.3.f_partition=
sqlPreset.3.f_data1=data1
sqlPreset.3.f_data2=
sqlPreset.3.f_data3=
sqlPreset.3.f_data4=
sqlPreset.3.f_data5=
sqlPreset.3.f_incr=id

On the license page I have:
Code: [Select]
Storage type: Asterisk Realtime: (asterisk|3)

All my reports and realtime are showing 0 data.
Title: Re: Reports not updating
Post by: QueueMetrics on April 18, 2011, 12:35:07
Try and remove the |3 and see if it works.
Title: Re: Reports not updating
Post by: jahyde on April 19, 2011, 00:51:57
I tried this, and it does not seem to help. Doesnt the |3 tell the system to use sql profile 3? Without this how will it know what settings to use?
Title: Re: Reports not updating
Post by: jahyde on April 19, 2011, 01:55:16
I see now - if I dont specify a Preset profile, it will assume preset #1, so I need to move all my settings up - but it still doesnt work.
Title: Re: Reports not updating
Post by: QueueMetrics on April 19, 2011, 11:49:28
When you use native logging, it should automatically use native fields.
What do you get from the database inspector?
 
Title: Re: Reports not updating
Post by: jahyde on April 19, 2011, 19:00:09
the records there are all old, and wont update.
Title: Re: Reports not updating
Post by: QueueMetrics on April 22, 2011, 10:47:02
But is the Asterisk table in a separate or same database as QM's?
Title: Re: Reports not updating
Post by: jahyde on April 23, 2011, 09:55:46
its the same mysql instance if that is what you mean, the actual database is separate from QM.

On another note - I found out why flat file logging stopped, /etc/asterisk/logger.conf must have these settings:
queue_log = yes
queue_log_to_file = yes
queue_log_name = queue_log

AND - if you have an older version of 1.8.2.1 or somewhere around there, there is a known file lock issue for logger:
https://issues.asterisk.org/view.php?id=18642
Title: Re: Reports not updating
Post by: QueueMetrics on April 26, 2011, 10:34:27
So basically you could go to the text file instead for the moment?