Vi alguns artigos para armazenas os logs do QueueLog diretamente no Mysql bom na versão que uso não funcionou, que é 1.4.18.1, então criei alguns scripts para inserção lendo os arquivos de logs<div>e inserindo no Mysql vou compartilhar com o pessoal, creio que será muito interessante para a lista. <div>
<br></div><div>Usei Ruby que se torna muito fácil o entendimento do que foi feito.</div><div><br></div><div>Segue abaixo: <br clear="all"><br></div><div><br></div><div>#############INICIO#########################</div><div>
<br></div><div><div>require &#39;rubygems&#39;</div><div>require &#39;mysql&#39;</div><div><br></div><div>file=&quot;queuelog&quot;</div><div>file=File.open(file,&quot;r&quot;)</div><div>logs={}</div><div>i = 1</div><div>
<br></div><div>file.each_line do |linha|</div><div>logs[i] = linha.split(&quot;|&quot;)</div><div>i+=1</div><div>end</div><div><br></div><div>logs.keys.each do |k|</div><div>event = logs[k][4]</div><div>if event == &quot;COMPLETEAGENT&quot; or event == &quot;COMPLETECALLER&quot;</div>
<div>db = Mysql.real_connect(&quot;127.0.0.1&quot;, &quot;root&quot;, &quot;senha&quot;, &quot;banco&quot;)</div><div>db.real_query(&quot;INSERT INTO queue_log values (NULL,&#39;#{logs[k][3]}&#39;,&#39;#{logs[k][4]}&#39;,NULL,#{logs[k][5]},#{logs[k][6]},#{logs[k][0]},#{logs[k][1]},&#39;#{logs[k][2]}&#39;) &quot;)</div>
<div>k+=1</div><div><br></div><div>elsif event == &quot;CONNECT&quot;</div><div><br></div><div>db = Mysql.real_connect(&quot;127.0.0.1&quot;, &quot;root&quot;, &quot;senha&quot;, &quot;banco&quot;)</div><div>db.real_query(&quot;INSERT INTO queue_log values (NULL,&#39;#{logs[k][3]}&#39;,&#39;#{logs[k][4]}&#39;,NULL,#{logs[k][5]},NULL,#{logs[k][0]},#{logs[k][1]},&#39;#{logs[k][2]}&#39;) &quot;)</div>
<div><br></div><div>elsif event == &quot;ENTERQUEUE&quot;</div><div><br></div><div>db = Mysql.real_connect(&quot;127.0.0.1&quot;, &quot;root&quot;, &quot;senha&quot;, &quot;banco&quot;)</div><div>db.real_query(&quot;INSERT INTO queue_log values (NULL,NULL,&#39;#{logs[k][4]}&#39;,&#39;#{logs[k][6]}&#39;,NULL,NULL,&#39;#{logs[k][0]}&#39;,&#39;#{logs[k][1]}&#39;,&#39;#{logs[k][2]}&#39;) &quot;)</div>
<div><br></div><div>elsif event == &quot;AGENTCALLBACKLOGIN&quot;</div><div><br></div><div>db = Mysql.real_connect(&quot;127.0.0.1&quot;, &quot;root&quot;, &quot;senha&quot;, &quot;banco&quot;)</div><div>db.real_query(&quot;INSERT INTO queue_log values (NULL,&#39;#{logs[k][3]}&#39;,&#39;#{logs[k][4]}&#39;,&#39;#{logs[k][5]}&#39;,NULL,NULL,&#39;#{logs[k][0]}&#39;,&#39;#{logs[k][1]}&#39;,NULL) &quot;)</div>
<div><br></div><div>elsif event == &quot;AGENTCALLBACKLOGOFF&quot;</div><div>db = Mysql.real_connect(&quot;127.0.0.1&quot;, &quot;root&quot;, &quot;senha&quot;, &quot;banco&quot;)</div><div>db.real_query(&quot;INSERT INTO queue_log values (NULL,&#39;#{logs[k][3]}&#39;,&#39;#{logs[k][4]}&#39;,&#39;#{logs[k][5]}&#39;,NULL,NULL,&#39;#{logs[k][0]}&#39;,NULL,NULL) &quot;)</div>
<div><br></div><div>elsif event == &quot;ABANDON&quot;</div><div>db = Mysql.real_connect(&quot;127.0.0.1&quot;, &quot;root&quot;, &quot;senha&quot;, &quot;banco&quot;)</div><div>db.real_query(&quot;INSERT INTO queue_log values (NULL,NULL,&#39;#{logs[k][4]}&#39;,NULL,&#39;#{logs[k][5]}&#39;,&#39;#{logs[k][6]}&#39;,&#39;#{logs[k][0]}&#39;,&#39;#{logs[k][1]}&#39;,&#39;#{logs[k][2]}&#39;) &quot;)</div>
<div><br></div><div>else</div><div><br></div><div> puts &quot;Nao existe&quot;</div><div><br></div><div>end</div><div>end</div><div><br></div><div>logs</div></div><div><br></div><div>######################FIM#################################</div>
<div><br></div><div><br></div><div>Att.<br>-- <br>Wendell Silva Bandeira<br><br><br>
</div></div>