Author Topic: Error with queue_log query  (Read 3708 times)

Luffy49

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Error with queue_log query
« on: December 29, 2011, 15:19:03 »
i have a table queue_log on my asterik

and configure queuemetrics like this :

default.queue_log_file=astr:asterisk|3

sqlPreset.3.table=asterisk.queue_log_processed
sqlPreset.3.f_time_id=real_timestamp
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=data2
sqlPreset.3.f_data3=data3
sqlPreset.3.f_data4=data4
sqlPreset.3.f_data5=data5
sqlPreset.3.f_incr=id


I create view like this to had timestamp :

CREATE VIEW queue_log_processed AS SELECT UNIX_TIMESTAMP(TIME) AS real_timestamp, callid
AS call_id, queuename AS queuename, agent AS agent, event AS event, data1,
data2, data3, data4, data5, id AS id FROM asterisk.queue_log


but when i try access to data i got :

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 >= '1325113200' AND time<='1325167816')     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:281) - at it.loway.app.queuemetrics.caricamento.caricaCoda.doRun(caricaCoda.java:70) -

Luffy49

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: Error with queue_log query
« Reply #1 on: December 29, 2011, 15:19:34 »
I'm on asterisk 1.8

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Error with queue_log query
« Reply #2 on: January 18, 2012, 18:22:04 »
What is the schema definition for the time_id field?