How to automate Reports con OTRS 6.0.21
Moderator: crythias
-
- Znuny newbie
- Posts: 12
- Joined: 27 Aug 2019, 03:16
- Znuny Version: 6.0.21
How to automate Reports con OTRS 6.0.21
Hi guys,
I hace a OTRS 6.0.21 version server on CentOS 7 installed.
All is working good.
I have been searching how to automate the reports. I mean, I want to create a job that creates a specific report and send it to some emails (Managers, etc).
I found this: viewtopic.php?t=21845
But, in my case, the file otrs.GenerateStats.pl doesnt exist in my setup:
Is there another way to do that?.
Oh! Almost forget it, my setup is Comunnity Version.
Thanks a lot in advance.
I hace a OTRS 6.0.21 version server on CentOS 7 installed.
All is working good.
I have been searching how to automate the reports. I mean, I want to create a job that creates a specific report and send it to some emails (Managers, etc).
I found this: viewtopic.php?t=21845
But, in my case, the file otrs.GenerateStats.pl doesnt exist in my setup:
Is there another way to do that?.
Oh! Almost forget it, my setup is Comunnity Version.
Thanks a lot in advance.
-
- Znuny superhero
- Posts: 890
- Joined: 15 Dec 2016, 15:13
- Znuny Version: All
- Real Name: Emin
- Company: Efflux GmbH
- Contact:
Re: How to automate Reports con OTRS 6.0.21
Hello,
Check this thread: viewtopic.php?f=35&t=37332
It's in German but should help just by looking at the code.
Tl;dr: Use /opt/otrs/bin/otrs.Console.pl Maint::Stats::Generate instead.
— Emin
Check this thread: viewtopic.php?f=35&t=37332
It's in German but should help just by looking at the code.
Tl;dr: Use /opt/otrs/bin/otrs.Console.pl Maint::Stats::Generate instead.
— Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/
Free and premium add-ons: German | English
Free and premium add-ons: German | English
-
- Znuny newbie
- Posts: 12
- Joined: 27 Aug 2019, 03:16
- Znuny Version: 6.0.21
-
- Znuny newbie
- Posts: 12
- Joined: 27 Aug 2019, 03:16
- Znuny Version: 6.0.21
-
- Znuny newbie
- Posts: 2
- Joined: 26 Jan 2022, 11:43
- Znuny Version: 6.0.18
- Real Name: IT
Re: How to automate Reports con OTRS 6.0.21
Good morning,
I have OTRS 6.0.18 and also want to automated sending reports from OTRS.
I used command similiar to this:
but unfortunatelly I receive this:
I run this command as otrs user. Could you tell me what I'm doing wrong? Should I give otrs user access to root folder?
Thanks in advance.
I have OTRS 6.0.18 and also want to automated sending reports from OTRS.
I used command similiar to this:
Code: Select all
/opt/otrs/bin/otrs.Console.pl Maint::Stats::Generate --number 10018 --format Excel --mail-sender MySenderMail@example.com --mail-recipient MySenderMail@example.com --mail-body "OTRS Report"
Code: Select all
Generating statistic number 10018...
[Wed Jan 26 10:30:38 2022] otrs.Console.pl: cannot remove path when cwd is /tmp/TKarTFs7x7/_rels for /tmp/TKarTFs7x7: at /usr/share/perl/5.24/File/Temp.pm line 1583.
Error: Can't cd to /root: Permission denied
Thanks in advance.
-
- 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: How to automate Reports con OTRS 6.0.21
Does this error occur regularly? Can you check if the error occurs when you select an other format? Do you have installed an addon for proper Excel support?
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: 2
- Joined: 26 Jan 2022, 11:43
- Znuny Version: 6.0.18
- Real Name: IT
Re: How to automate Reports con OTRS 6.0.21
I changed format from Excel to CSV and now everything works like a charm, thank you for this very fast help.
-
- Znuny newbie
- Posts: 6
- Joined: 03 Mar 2020, 21:18
- Znuny Version: 6.0.30
- Real Name: Barrett Radziszewski
- Company: PayPal
Re: How to automate Reports con OTRS 6.0.21
I get the same error when trying to have OTRS generate an Excel formatted stat file:
[Wed Aug 17 19:39:44 2022] otrs.Console.pl: cannot remove path when cwd is /tmp/gkMYsk3sM_/_rels for /tmp/gkMYsk3sM_: at /usr/share/perl5/vendor_perl/File/Temp.pm line 1615.
I only get the error when running the command to generate Excel, it works when I format as CSV. If it's not possible to clear this error in console, is there no way to automate the Excel send out generated through the UI using cron? I can generate an Excel file manually with the stats I need, but would much prefer having an Excel file generated and sent out automatically. Is there a setting in the UI that will automate report send out via email so it doesn't come in a PDF (only Print is enabled regardless of the Output I select in the statistic)?
-
- Administrator
- Posts: 4011
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: How to automate Reports con OTRS 6.0.21
Hi,chefski27 wrote: ↑17 Aug 2022, 23:06I get the same error when trying to have OTRS generate an Excel formatted stat file:
[Wed Aug 17 19:39:44 2022] otrs.Console.pl: cannot remove path when cwd is /tmp/gkMYsk3sM_/_rels for /tmp/gkMYsk3sM_: at /usr/share/perl5/vendor_perl/File/Temp.pm line 1615.
I only get the error when running the command to generate Excel, it works when I format as CSV. If it's not possible to clear this error in console, is there no way to automate the Excel send out generated through the UI using cron? I can generate an Excel file manually with the stats I need, but would much prefer having an Excel file generated and sent out automatically. Is there a setting in the UI that will automate report send out via email so it doesn't come in a PDF (only Print is enabled regardless of the Output I select in the statistic)?
I haven't seen this issue for a long time. Is 6.0.16 really your current version? And which OS do you use?
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?