Using report parameters with otrs.GenerateStats.pl
Moderator: crythias
-
- Znuny newbie
- Posts: 16
- Joined: 01 Jan 2012, 20:32
- Znuny Version: 4.0.7
- Real Name: Sándor Dombora
- Company: Asyst Solutions
Using report parameters with otrs.GenerateStats.pl
Hi all,
I tried to run reports using the otrs.GenerateStats.pl script.
I cannot find how to pass parameters to the reports.
I would like to run reports monthly, using crontab, and I would like to set some parameters to the report.
For example: I would like to filter records based on ticket creation date, or ticket closure date, or by some other parameter.
I also trid to set the language of the reports to hungarian using "-l hu" - it did not work.
How do I set the parameters for the otrs.GenerateStats.pl
Bestr Regards,
Sándor
I tried to run reports using the otrs.GenerateStats.pl script.
I cannot find how to pass parameters to the reports.
I would like to run reports monthly, using crontab, and I would like to set some parameters to the report.
For example: I would like to filter records based on ticket creation date, or ticket closure date, or by some other parameter.
I also trid to set the language of the reports to hungarian using "-l hu" - it did not work.
How do I set the parameters for the otrs.GenerateStats.pl
Bestr Regards,
Sándor
OTRS 3.0, OTRS-ITSM, Suse Linux 11.3
-
- Znuny advanced
- Posts: 119
- Joined: 12 Jan 2011, 22:35
- Znuny Version: 4.x.x.x.x
- Company: Self-Employed
Re: Using report parameters with otrs.GenerateStats.pl
Note sur if you seen the Admin portion yet but here it is
http://doc.otrs.org/3.0/en/html/stats-m ... ts-mkstats
What db environment are you on?
I personally found the reporting aspect of OTRS to be slightly complicated to work with and limited in functionality therefore we decided to use SQL Report Builder to take care of our Reporting needs. Easy to work with!
http://doc.otrs.org/3.0/en/html/stats-m ... ts-mkstats
What db environment are you on?
I personally found the reporting aspect of OTRS to be slightly complicated to work with and limited in functionality therefore we decided to use SQL Report Builder to take care of our Reporting needs. Easy to work with!
OTRS 4.0.11
Ubuntu 15.04
MySQL Database, PHP5, Apache (LAMP server bundle)
Ubuntu 15.04
MySQL Database, PHP5, Apache (LAMP server bundle)
-
- Znuny newbie
- Posts: 16
- Joined: 01 Jan 2012, 20:32
- Znuny Version: 4.0.7
- Real Name: Sándor Dombora
- Company: Asyst Solutions
Re: Using report parameters with otrs.GenerateStats.pl
Yes I had seen that when I posted the question.
I tried the "perl otrs.GenerateStats.pl --help" - no relevant answer.
I need to pass column filters for example ceration date of the ticcket less than and greather than and so on.
I have read a lot of messages on the mailing list, no relevant information
I tried the "perl otrs.GenerateStats.pl --help" - no relevant answer.
I need to pass column filters for example ceration date of the ticcket less than and greather than and so on.
I have read a lot of messages on the mailing list, no relevant information

OTRS 3.0, OTRS-ITSM, Suse Linux 11.3
-
- Znuny newbie
- Posts: 53
- Joined: 04 Apr 2011, 15:38
- Znuny Version: 3.2.8
- Real Name: Alex Dekker
Re: Using report parameters with otrs.GenerateStats.pl
There's some very relevant help with --help:
However, the -p option doesn't seem to work for me. In the report I'm looking at, one of the variable parameters is the customer ID. If I run the report with -p "CustomerID=ABC Customer", I still get the report with every customer in it. There is no error logged with regards to the parameter specified.
Code: Select all
# /opt/otrs/bin/otrs.GenerateStats.pl --help
otrs.GenerateStats.pl <Revision 1.3> - OTRS cmd stats
Copyright (C) 2001-2010 xxx, http://otrs.org/
usage: otrs.GenerateStats.pl -n <StatNumber> [-p <PARAM_STRING>] [-o <DIRECTORY>] [-r <RECIPIENT> -s <SENDER>] [-m <MESSAGE>] [-l <LANGUAGE>] [-f CSV|Print] [-S <SEPARATOR>]
<PARAM_STRING> e. g. 'Year=1977&Month=10' (only for static files)
<DIRECTORY> /output/dir/
OTRS 3.2.8 on Ubuntu 12.04.2 LTS
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Using report parameters with otrs.GenerateStats.pl
check case.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 16
- Joined: 01 Jan 2012, 20:32
- Znuny Version: 4.0.7
- Real Name: Sándor Dombora
- Company: Asyst Solutions
Re: Using report parameters with otrs.GenerateStats.pl
Hi,
I had the same problem, the -p parameter was ignoed.

regards,
S
I had the same problem, the -p parameter was ignoed.

regards,
S
OTRS 3.0, OTRS-ITSM, Suse Linux 11.3
-
- Znuny newbie
- Posts: 53
- Joined: 04 Apr 2011, 15:38
- Znuny Version: 3.2.8
- Real Name: Alex Dekker
Re: Using report parameters with otrs.GenerateStats.pl
Checked case, case matches. Anyway if case was important, I would expect an empty report or no report, not a report with nothing in. I am preparing to upgrade to 3.1 anyway so will pursue this after then.
OTRS 3.2.8 on Ubuntu 12.04.2 LTS
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Using report parameters with otrs.GenerateStats.pl
" <PARAM_STRING> e. g. 'Year=1977&Month=10' (only for static files)\n";
-p will be ignored unless the Stat is static.
-p will be ignored unless the Stat is static.
Code: Select all
if ( $Stat->{StatType} eq 'static' ) {
$GetParam{Year} = $Y;
$GetParam{Month} = $M;
$GetParam{Day} = $D;
# get params from -p
# only for static files
my $Params = $CommonObject{StatsObject}->GetParams( StatID => $StatID );
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 13
- Joined: 23 Dec 2011, 11:44
- Znuny Version: 3.0.8
- Real Name: Aleksandar Jovanović
- Company: M.A.I. Trade
Re: Using report parameters with otrs.GenerateStats.pl
Hi,
the OP asked question regarding the language aswell. I have the same problem. When i pass the parameter -l hr for Croatian language, or for any other for that matter, it doesn't work.
I checked the source, it's searching in Kernel::Language which is ok, because Croatian translation is Kernel::Language::hr package.
Even changing the line in source which determines the default language is not helping....
Why doesn't this work? All other parameters work for me, but not this one.....
the OP asked question regarding the language aswell. I have the same problem. When i pass the parameter -l hr for Croatian language, or for any other for that matter, it doesn't work.
I checked the source, it's searching in Kernel::Language which is ok, because Croatian translation is Kernel::Language::hr package.
Even changing the line in source which determines the default language is not helping....
Why doesn't this work? All other parameters work for me, but not this one.....
OTRS v3.2.7. on Ubuntu server 11.10.
MySQL database
MySQL database