Send reports (stats) automatically
Moderator: crythias
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Send reports (stats) automatically
Hi all,
I just want to know if there is way of working for periodically generate stat report and send it to a specific email address.
It's like reporting to a manager who are not able to access to the OTRS interface.
I was thinking that generic agent could done the job, but it seems to work only with tickets... no stats.
Thanks in advance for your reply.
Regards
I just want to know if there is way of working for periodically generate stat report and send it to a specific email address.
It's like reporting to a manager who are not able to access to the OTRS interface.
I was thinking that generic agent could done the job, but it seems to work only with tickets... no stats.
Thanks in advance for your reply.
Regards
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Send reports (stats) automatically
Create a cronjob that calls
$HOME/bin/otrs.GenerateStats.pl -n 10020 -f CSV -r 123@domain.com -r 123@domain.com -m "Weekly Open Ticket Report" -F WeeklyOpen
(you have to change the values of course )
$HOME/bin/otrs.GenerateStats.pl -n 10020 -f CSV -r 123@domain.com -r 123@domain.com -m "Weekly Open Ticket Report" -F WeeklyOpen
(you have to change the values of course )
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Re: Send reports (stats) automatically
Thanks a lot for you help.
Regards,
Regards,
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Re: Send reports (stats) automatically
Hi reneeb,
I tried the solution your propose without success.
SO, to resume and to be sure that I did not make a mistake.
I create a cron job using GenericAgent.
I used the "Ticket Commands" function and fulfilled the field CMD as follow :
-n : been replaced by the number 10014 which corresponds to my stats
-f : been kept as I want to choose the CSV output format (according to my stat options)
-r : been replaced by my personal email address
-m : no change, but should correspond to the "subject" of the email
-F : filename of the CSV file
Is this true?
Thanks in advance for the help provided.
Regards,
I tried the solution your propose without success.
SO, to resume and to be sure that I did not make a mistake.
I create a cron job using GenericAgent.
I used the "Ticket Commands" function and fulfilled the field CMD as follow :
Code: Select all
$HOME/bin/otrs.GenerateStats.pl -n 10020 -f CSV -r 123@domain.com -r 123@domain.com -m "Weekly Open Ticket Report" -F WeeklyOpen
-f : been kept as I want to choose the CSV output format (according to my stat options)
-r : been replaced by my personal email address
-m : no change, but should correspond to the "subject" of the email
-F : filename of the CSV file
Is this true?
Thanks in advance for the help provided.
Regards,
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Re: Send reports (stats) automatically
I was impatient a little... it works... more than expected.
I planed to be send the stats every hour (to test the code), and I received 45 emails for one execution...
I have to investigate a little bit, to tune it better !
Regards,
I planed to be send the stats every hour (to test the code), and I received 45 emails for one execution...
I have to investigate a little bit, to tune it better !
Regards,
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Re: Send reports (stats) automatically
I understood that the action is done as many as the number of tickets affected by the cron job.
Is this true?
How can I tune the cron job to do one sending only?
Thanks in advance for the help provided.
Regards,
Is this true?
How can I tune the cron job to do one sending only?
Thanks in advance for the help provided.
Regards,
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Send reports (stats) automatically
Can you show us what you have added in the crontab?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Re: Send reports (stats) automatically
It will be a little bit difficult to paste an image of the settings due to the length of the parameters page.
Ticket filter :
If I do not specify the filtering parameters, I got an error as follow :
Ticket filter :
- Queue filed : 2 items selected which contains 23 tickets
- Send agent/customer : No
- CMD : $HOME/bin/otrs.GenerateStats.pl -n 10014 -f CSV -r myemail@mydomain.com -m "Envoi automatique de la stat 10014" -F Stat_10014
- Delete tickets : No
If I do not specify the filtering parameters, I got an error as follow :
Code: Select all
Backend ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Mon Aug 26 16:17:50 2013 Message: Attention: Can't run GenericAgent Job 'Envoi Périodique Stats' because no search attributes are used!. RemoteAddress: 192.168.12.46 RequestURI: /otrs/index.pl?Action=AdminGenericAgent;Subaction=RunNow;Profile=Envoi%20P%C3%A9riodique%20Stats;ChallengeToken=1551925c7b6eaaa1be337ea4832f0c7a; Traceback (9681): Module: Kernel::System::GenericAgent::JobRun (v1.86) Line: 437 Module: Kernel::Modules::AdminGenericAgent::Run (v1.108) Line: 87 Module: Kernel::System::Web::InterfaceAgent::Run (v1.73) Line: 864 Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 44 Module: (eval) (v1.94) Line: 204 Module: ModPerl::RegistryCooker::run (v1.94) Line: 204 Module: ModPerl::RegistryCooker::default_handler (v1.94) Line: 170 Module: ModPerl::Registry::handler (v1.99) Line: 31
Re: Send reports (stats) automatically
don't create GenericAgents! Create a new Cron job for this
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Re: Send reports (stats) automatically
I was thinking that cron jobs was similar to GenericAgent.
How can I do a cron job?
Is "cron job" a script located in the home directory of the 'otrs' user?
How can I do a cron job?
Is "cron job" a script located in the home directory of the 'otrs' user?
Re: Send reports (stats) automatically
man cron
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: Send reports (stats) automatically
Jojo : Can you give an example how to used Static stat with GenerateStat.pl ?
-
- Znuny expert
- Posts: 171
- Joined: 24 Apr 2013, 12:29
- Znuny Version: OTRS3.3
- Real Name: kalyanachakravarthy M P
- Company: TATA Technologies
- Location: Pune,India
- Contact:
Re: Send reports (stats) automatically
please check this
viewtopic.php?f=61&t=20415&p=80795&hili ... ics#p80811
Scheduled Reports in windows
viewtopic.php?f=53&t=21266
viewtopic.php?f=61&t=20415&p=80795&hili ... ics#p80811
Scheduled Reports in windows
viewtopic.php?f=53&t=21266
-
- Znuny newbie
- Posts: 88
- Joined: 31 Jul 2013, 16:52
- Znuny Version: 5.0.20
- Real Name: Benoît MICHELOT
- Company: Amphenol Air LB France
- Contact:
Re: Send reports (stats) automatically
Hi all,
As I am not able to access to OTRS repertories and I would like to keep to ability to manage easily the automatic sending of report, I use the genericAgent filtered on a "ghost" ticket, which allow me to send only one report.
So, like said previously, I do not have the access the OTRS repertories, and I am not able to get the GenerateStats.pl --help function.
Could you please paste the list of parameter which can be used to?
I have to parameter another scheduled report sending in a pdf output.
Waiting an answer from my IT department will take a long time.
Regards,
As I am not able to access to OTRS repertories and I would like to keep to ability to manage easily the automatic sending of report, I use the genericAgent filtered on a "ghost" ticket, which allow me to send only one report.
So, like said previously, I do not have the access the OTRS repertories, and I am not able to get the GenerateStats.pl --help function.
Could you please paste the list of parameter which can be used to?
I have to parameter another scheduled report sending in a pdf output.
Waiting an answer from my IT department will take a long time.
Regards,
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Send reports (stats) automatically
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Send reports (stats) automatically
Hello. Sorry to revive an old thread but I recently tried to set up automatic report sending in OTRS and I followed the instructions on this page. It worked fine, but I do have some questions, maybe some of you can help me. So:
- is it possible to set up the email message (the one after -m parameter) with line breaks somehow? Having only one continuous line is kind of ugly
- is it possible to have some sort of signature to the email? Like an image or logo;
- I've noticed that the sender of the email is the otrs default email account, but if I use the -s parameter I can use another address, right? If so, how is the authentication being done? I tried to use another address from the same domain but I got an auth error.
That's all, thank you!
- is it possible to set up the email message (the one after -m parameter) with line breaks somehow? Having only one continuous line is kind of ugly
- is it possible to have some sort of signature to the email? Like an image or logo;
- I've noticed that the sender of the email is the otrs default email account, but if I use the -s parameter I can use another address, right? If so, how is the authentication being done? I tried to use another address from the same domain but I got an auth error.
That's all, thank you!