Author Topic: Migrate 1.6.2 1.8 Issue  (Read 6475 times)

pta200

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Migrate 1.6.2 1.8 Issue
« on: April 04, 2012, 00:11:41 »
Running QM 12.1.2 and 1.8.11 with queue_log realtime. I've altered the Asterisk queue_log table to reflect the 1.8 schema, but left the 1.4/1.6 'data' column as I didn't want to loose the information. I've altered the QM configuration.properties to point to the appropriate default.queue_log_file key to the 1.8 realtime analyzer which specifies data1, data2, data3 etc... columns

The problem I'm having is the QM is not reporting the new queue log data which is being written to the new data1, data2, data3 column on queries since the upgrade, but on older queries prior to the upgrade QM is reporting the data displayed in the Asterisk 1.6 'data' column. How do I resolve this as it seems QM is not reading the right column(s) even though it's configured as such.

thanks,
Paolo

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Migrate 1.6.2 1.8 Issue
« Reply #1 on: April 04, 2012, 15:41:19 »
You need to tell QM how is your data written - but unless you convert the old data, there is no way for QM t o read the old and the new data at once. See http://queuemetrics.com/manuals/QM_UserManual-chunked/ar01s18.html#_using_the_asterisk_realtime_queuelog_subsystem

pta200

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Migrate 1.6.2 1.8 Issue
« Reply #2 on: April 04, 2012, 16:11:12 »
That's exactly what I am doing. When I edit configuration.properties as follows, QM works as it did using Asterisk 1.6 where it's reading the information from the column named 'data' per the previous queue_log mysql schema. Now using 1.8 the information is written to the columns named data1, data2, data4 etc...  as the schema has changed so QM is not reporting anything.

default.queue_log_file=sql:asterisk|a18

sqlPreset.a18.table=queue_log
sqlPreset.a18.f_time_id=time
sqlPreset.a18.use_timestamp=false
sqlPreset.a18.f_call_id=callid
sqlPreset.a18.f_queue=queuename
sqlPreset.a18.f_agent=agent
sqlPreset.a18.f_verb=event
sqlPreset.a18.f_partition=
sqlPreset.a18.f_data1=data1
sqlPreset.a18.f_data2=data2
sqlPreset.a18.f_data3=data3
sqlPreset.a18.f_data4=data4
sqlPreset.a18.f_data5=data5
sqlPreset.a18.f_incr=id

When I edit configuration.properties as follows,  QM throws a SQL exception because the time_id field is now a char type when it used to be an int even though  sqlPreset.a18.use_timestamp=false.

default.queue_log_file=sql:-|a18

sqlPreset.a18.table=asterisk.queue_log
sqlPreset.a18.f_time_id=time
sqlPreset.a18.use_timestamp=false
sqlPreset.a18.f_call_id=callid
sqlPreset.a18.f_queue=queuename
sqlPreset.a18.f_agent=agent
sqlPreset.a18.f_verb=event
sqlPreset.a18.f_partition=
sqlPreset.a18.f_data1=data1
sqlPreset.a18.f_data2=data2
sqlPreset.a18.f_data3=data3
sqlPreset.a18.f_data4=data4
sqlPreset.a18.f_data5=data5
sqlPreset.a18.f_incr=id


Alert:
Database access error.  -  <p> - Exception: it.loway.tpf.common.exceptions.TechException - Errore file/DB: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.queue_log WHERE        (time >= '1333512000' AND time<='1333548294')     AND qu' at line 1 - at it.loway.app.queuemetrics.asterisk.logs.analyzers.AnalizzaLogAstRT.createTemporaryFile(AnalizzaLogAstRT.java:277) - at it.loway.app.queuemetrics.asterisk.logs.analyzers.AnalizzaLogAstRT.loadLogInfo(AnalizzaLogAstRT.java:171) - at it.loway.app.queuemetrics.caricamento.caricaCoda.runDataAnalysis(caricaCoda.java:285) - at it.loway.app.queuemetrics.caricamento.caricaCoda.doRun(caricaCoda.java:74) -

thanks,
Paolo

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Migrate 1.6.2 1.8 Issue
« Reply #3 on: April 11, 2012, 13:04:11 »
You could convert it to integer, this should make it work.
Do create access indexes like the ones that are present on the queue_log table in the QM database.

pta200

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Migrate 1.6.2 1.8 Issue
« Reply #4 on: April 24, 2012, 23:25:08 »
I've resolved the issues but I am seeing the following in the logs:

[FC50434CFFCC44B4771BCA09B04195EC] [ERR] The verb 'qm_realtime2_ds' requires a ke y that the current user does not hold.
[FC50434CFFCC44B4771BCA09B04195EC] 201204241721 Total run time for verb 'qm_realtime2_ds': 4 ms

What key(s) do I need to add? I've added the realtime key

thanks,
Paolo

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Migrate 1.6.2 1.8 Issue
« Reply #5 on: April 27, 2012, 15:39:47 »
This looks like a missing section - how do you get this error?