Reports per agent

Moderator: crythias

Locked
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Reports per agent

Post by maayanay »

Hi,

I like the report tool very much it is very flexible but i have 2 things i don't know how to do:

1. report of tickets per agent - i didn't see any option to choose agents at the report tool

2. I want to create a report to show ticket per service so:
I created a new TicketAccumulation report
Configure it as Print (pdf)
At the X axis i choose "Service"
All the the rest i left as default

the problem is i have more than 50 services and it showing all services as columns in the PDF (the X axis of the table) instead of rows, and on the rows (Y axis) its showing "Tickets" and Sum". so finally my report is spreading over 10 pages instead of 2 if i was able to tell the report to put the "Service" at the rows instead of columns.

Hope i made my self clear...

Thanks!
OTRS Ver: 3.3.5
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Reports per agent

Post by Giulio Soleni »

Ciao,
as for your 1st question, you should enable (set to 'Yes') the Stats::UseAgentElementInStats parameter in sysConfig Framework -> Frontend::Agent::Stats
For the 2nd question I think it should be enough to set "Exchange Axis" to 'Yes' right before you generate your report... however I am not sure you'll get exactly the results that you would like to get.

HTH

Giulio
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Re: Reports per agent

Post by maayanay »

Giulio Soleni wrote:Ciao,
as for your 1st question, you should enable (set to 'Yes') the Stats::UseAgentElementInStats parameter in sysConfig Framework -> Frontend::Agent::Stats
For the 2nd question I think it should be enough to set "Exchange Axis" to 'Yes' right before you generate your report... however I am not sure you'll get exactly the results that you would like to get.

HTH

Giulio
Thanks good answer. just the problem with the Exchange Axis is that it is not something i can choose in the report but only before i run it. what happens if i want to schedule reports? i will be able to choose Exchange Axis?

and on the same subject:
1. how can i sort by column? for example that most tickets will be on top
2. how do i remove rows that have no data? is it possible? for example i want to see report for all tickets per services but to remove services that have no tickets related to them.
3. when creating a report and use it as widget data does not appear. looking at the logs five me this error: "Can't cache: StatID 13 has no time period, so you can't cache the stat!"
OTRS Ver: 3.3.5
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Re: Reports per agent

Post by maayanay »

related to my issue number 3:

i found out that if i manually ran the script /opt/otrs/bin/otrs.GenerateDashboardStats.pl the statistics shown on the dashboard.
seems that the cron job "/opt/otrs/var/cron/generate_dashboard_stats" that suppose to run "/opt/otrs/bin/otrs.GenerateDashboardStats.pl" is not doing so. any idea why?
should i use the root crontab for this operation?
OTRS Ver: 3.3.5
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Reports per agent

Post by Giulio Soleni »

Honestly I am not acquainted with scheduled reporting. I usually trigger them asynchronously, when needed.
However I think that you should use otrs user's cron to run otrs.GenerateDashboardStats.pl and not root.
Did you find any error in the log?
Are the permissions of otrs.GenerateDashboardStats.pl correctly set?

As for the column order ... as I told you, I do not know if there's a way to specify it through any parameter of otrs.GenerateDashboardStats.pl, but if you would like to get some csv files, I do not find that a big problem... you could be able to sort the data as you wish using Excel or Calc or any other spreadsheet software.
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Re: Reports per agent

Post by maayanay »

Giulio Soleni wrote:Honestly I am not acquainted with scheduled reporting. I usually trigger them asynchronously, when needed.
However I think that you should use otrs user's cron to run otrs.GenerateDashboardStats.pl and not root.
Did you find any error in the log?
Are the permissions of otrs.GenerateDashboardStats.pl correctly set?


As for the column order ... as I told you, I do not know if there's a way to specify it through any parameter of otrs.GenerateDashboardStats.pl, but if you would like to get some csv files, I do not find that a big problem... you could be able to sort the data as you wish using Excel or Calc or any other spreadsheet software.

1. found this link - http://doc.otrs.org/3.2/en/html/manual- ... -otrs.html for otrs installation. if you search "/opt/otrs/var/cron/" you will find the section explaining about the cron for otrs. but it saying there to login as "otrs" user and to run bin/Cron.sh. since i installed OTRS from installer and not manually I don't the password for otrs user and when i do "su otrs" nothing happens (i am a linux newbie). so it seems that the cron jobs was not correctly installed with otrs installer.
you asked about permissions? what permissions is correct permissions? this what i see:
- rwxrwx--- 1 otrs apache 6007 Feb 20 09:44 otrs.GenerateDashboardStats.pl

2. Column ordering - I talked about the Print(PDF) reports not the dashboard reports. I want the data to be sorted before exporting the report. the main reason is that I am going to schedule mail reports for management and I don't want the recipients to receive CSV and sort the report themselves.
OTRS Ver: 3.3.5
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Reports per agent

Post by Giulio Soleni »

From root user type:
crontab -u otrs -l
and you should get all the cron scheduled commands for the otrs user.

When otrs is installed the login permission for otrs user is disabled for security reasons, however you may enable it by editing /etc/passwd file.
You may safely edit the line related to otrs user and put /bin/bash instead of /sbin/nologin (or /bin/false).
Then from root you may switch to otrs user (no need to know password) typing at the prompt:
su - otrs

To be sure that the permissions of all files are correctly set you should run (it's a best practice that you run it periodically and possibly when otrs services are stopped) the /opt/otrs/bin/otrs.SetPermissions.pl script with the parameters for your OS system.
This script must be run by the root user.
If you have a Red Hat Linux or a CentOS Linux, you may run:
/opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs

The parameters changes for other OS and for other Linux distro (e.g. SuSE or Debian ...) and you should look at that specific release information for the correct parameters to be set.
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Re: Reports per agent

Post by maayanay »

I fixed it, what i did:

Give the otrs user the option to login by adding bash to the user at /etc/passwd file (i know i don't have to give it login in order to fix this but it easier for me for troubleshooting and future use)

than i checked otrs user crontab i noticed it was empty so i ran $HOME bin/otrs.GenerateDashboardStats.pl in order to add all cron jobs.

than in the crontab i changed the line that generate dashboard statistics to run every 5 minutes:
# generate dashboard stats every 5 min
*/5 * * * * $HOME/bin/otrs.GenerateDashboardStats.pl >> /dev/null

the only problem i have now is that the report cron job is working well but until i click "refresh" - F5 at the web page data will not update. i set the refresh time on my profile to 2 minutes but still it is not refreshing the report widget.
OTRS Ver: 3.3.5
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Re: Reports per agent

Post by maayanay »

and also this was not solved yet:

1. how can i sort by column on PDF reports? for example that most tickets will be on top or by A B C
2. how do i remove rows that have no data? is it possible? for example i want to see report for all tickets per services but to remove services that have no tickets related to them.
OTRS Ver: 3.3.5
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Reports per agent

Post by Giulio Soleni »

maayanay wrote: than i checked otrs user crontab i noticed it was empty so i ran $HOME bin/otrs.GenerateDashboardStats.pl in order to add all cron jobs.

than in the crontab i changed the line that generate dashboard statistics to run every 5 minutes:

the only problem i have now is that the report cron job is working well but until i click "refresh" - F5 at the web page data will not update. i set the refresh time on my profile to 2 minutes but still it is not refreshing the report widget.
I do not know how otrs.GenerateDashboardStats.pl script works since it should be new to OTRS 3.3.x version however do you really need to generate a PDF report every 2 minutes? Maybe I misunderstood your intentions...
Another warning: NEVER edit otrs crontab directly, since as soon as you restart otrs service you will return to the default behavior and you will loose all your customization.
You should instead edit the files you may find under /opt/otrs/var/cron/ and then restart otrs service... after any restart, otrs will look at the files under that folder and will overwrite its crontab accordingly.

I am sorry but I cannot be of any help for the sorting / editing of the PDF reports.
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
reneeb
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: Reports per agent

Post by reneeb »

maayanay wrote:and also this was not solved yet:

1. how can i sort by column on PDF reports? for example that most tickets will be on top or by A B C
2. how do i remove rows that have no data? is it possible? for example i want to see report for all tickets per services but to remove services that have no tickets related to them.
This needs development...
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
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Re: Reports per agent

Post by maayanay »

Thanks for the warning. i will do that.

Regarding the report i don't need a PDF report every 2 minutes I need the widget report every few minutes. I created a report and set it to run "run as a dashboard widget". the background information of the report is updating every 5 minutes as according to the cron job i set, but even after the information is updated i must refresh the web page (F5).

my idea is to create an general "report" agent with some custom reports shown on its dashboard. This agent dashboard will be shown on a big screen to show realtime live statistics.

so all I need is a way to refresh the webpage every few minutes. as i said I already configured the refresh at the agent preferences page to "2 minutes" but it is not updating the report widget I must click F5 in order to see the new data in the report widget.
OTRS Ver: 3.3.5
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Reports per agent

Post by Giulio Soleni »

I think you may try with a browser plugin.
Or else you may try this open service: http://www.refreshthis.com/
I don't know if it works tho, since I've never used it.

ciao
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
maayanay
Znuny newbie
Posts: 63
Joined: 26 Feb 2014, 16:36
Znuny Version: 3.3.5

Re: Reports per agent

Post by maayanay »

Thanks all!

how do i mark this post as solve?
OTRS Ver: 3.3.5
Locked