QueueMetrics forum

QueueMetrics => Running QueueMetrics => Topic started by: dchabanol on October 27, 2008, 18:35:16

Title: Generate reports and send them by email
Post by: dchabanol on October 27, 2008, 18:35:16
Hello,

  I need to automatically generate custom report and also general report (via crontab ?), convert them in pdf and send them by email.
I had a look on the forum and also in the documentation but found nothing ...
Any idea ?

Best regards,

Didier Chabanol
http://www.ives.fr (http://www.ives.fr)
Title: Re: Generate reports and send them by email
Post by: QueueMetrics on October 28, 2008, 09:41:56
I am unsure about the print-to-PDF part, but reports can be pulled out of QM using the ROBOTS key - see the section called "Automating statistics download: the ROBOT profile" in the User Manual.
Title: Re: Generate reports and send them by email
Post by: james on December 09, 2008, 06:24:42
I have tried to use download report using the ROBOTS, It just shows me the report in the browser but NOT download it. Is that teh normal behavior. Please help!
Best regards,
James
Title: Re: Generate reports and send them by email
Post by: QueueMetrics on December 09, 2008, 15:39:50
What do you mean? if you see it in the browser it means that the file was downloaded to the browser. Use a command.line toool wlike "wget" to save it.
Title: Re: Generate reports and send them by email
Post by: james on December 09, 2008, 22:15:55
Normally I think I would have a pop up and download a csv, txt or pdf file but I just get is the report of the day displayed in the browser. when I use wget i just get the html content saved into a file. Is there a way that I can send a CSV file by mail that contents the whole day activity in queuemetrics.
Title: Re: Generate reports and send them by email
Post by: james on December 09, 2008, 22:59:07
This is the the beginning of the file content saved:


<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>A problem occurred</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="shortcut icon" href="/queuemetrics/img/favicon.ico">
<link rel="stylesheet" type="text/css" href="/queuemetrics/img/video.css" media="screen,projection" />
<link rel="stylesheet" type="text/css" href="/queuemetrics/img/print.css" media="print" />
</head>
Title: Re: Generate reports and send them by email
Post by: QueueMetrics on December 10, 2008, 10:22:32
Normally I think I would have a pop up and download a csv, txt or pdf file but I just get is the report of the day displayed in the browser. when I use wget i just get the html content saved into a file. Is there a way that I can send a CSV file by mail that contents the whole day activity in queuemetrics.


Yes the file is the same page you would see in QM - this is because there is no way to create single Excel file that has all the separate reports in it, at least at the moment.
Title: Re: Generate reports and send them by email
Post by: james on January 13, 2009, 23:52:54
Hello All, I would really appreciate your help, I am trying to dowload using wget a report using robot user, my syntax is the following:
wget -O report.html http://SERVER:8080/queuemetrics/qm_rep.do?user=robot&pass=robot&queues=nopin-queue&t_from=2009-01-07.00:00:00&t_to=2009-01-10.12:00:00
I am getting an error. However if i copy and paste into a browser i get the report correcty. The error I am getting is the following:
"Errore tecnico nella classe 'it.loway.app.queuemetrics.autenticazione.preparaParametriReport'. -- Inner Exception -- - Exception: it.loway.tpf.common.exceptions.TechException - Stack trace: - Date error: either date is invalid (from: null to null - format: 'yyyy-MM-dd.HH:mm:ss') -      at it.loway.app.queuemetrics.autenticazione.preparaParametriReport.setPeriodoTemporale(Unknown Source) -        at it.loway.app.queuemetrics.autenticazione.preparaParametriReport.doRun(Unknown Source) -      at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequest(Unknown Source) -  at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequestWrapper(Unknown Source) -   at it.loway.tpf.transaction.servlets.LowayTransactionController.doGet(Unknown Source) -         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) -       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) -       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) -  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) -  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) -        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) -    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) -        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) -        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) -        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) -    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) -        at org.apache.catalina.core.StandardHost
please help!
Title: Re: Generate reports and send them by email
Post by: QueueMetrics on January 14, 2009, 11:42:28
You should really enclose the URl within quotes "http://..." otherwise the shell with split at the & signs.....
Title: Re: Generate reports and send them by email
Post by: james on January 14, 2009, 20:36:41
That's was the problem. I changed and it's working .Thank you.
Title: Re: Generate reports and send them by email
Post by: QueueMetrics on January 15, 2009, 12:30:36
That's ok.