Menu

#163 Sending report to stdout or email

v1.0_(example)
open
nobody
None
5
2015-07-24
2015-07-15
No

Hello!
I noticed that (-e) works not as expected.
1) I have a special config file to get just top-20 user report. Only one report, without any detailed information about sites accessed by each of them and the like. It's key parametes:

report_type topusers
topuser_num 20

If I make a report without (-e) parameter, everything is fine, I see a webpage with 20 users who got most amount of traffic. But when (-e stdout) or (-e myemail@mycompany.ru) is added, the report is not limited to 20, every user is listed.

2) Another special config is for top-20 websites. Same one report, without any detailed information about who accessed these sites. It's key parameters:

report_type topsites
topsites_num 20

If I make a report without (-e) parameter, everything is fine, I get a webpage with top-20 websites. But when (-e stdout) or (-e myemail@mycompany.ru) is added, I see a topuser report, as from previous point.

Discussion

  • Frederic Marchal

    The email report only send a topuser report. It is hard coded in sarg. It ignores report_type.

    The number of users to report is also ignored. In fact, every option is ignored when generating an email report.

    I prepared a commit to limit the number of users (i.e take topuser_num into account) and sort the email report as the html report. I'll commit it as soon as Sourceforge has fixed its problems and reopen the git repository.

    As for other email report types, I have no solutions yet.

     
  • Evgeniy Yakushev

    For topsites report, is it possible to make the same processing over the logfiles, then make an email from topsites.html and not to write anything to the output directory?

     
  • Frederic Marchal

    I believe the produced html file is not suitable for inclusion in an e-mail.

    There are relative and absolute links to images, other report pages, css and javascript. All these would be broken.

    Links can be made absolute to the complete report on the server. That could be a nice feature.

    The biggest problem is the external css. It must be inserted into the html header when it is sent by e-mail and left external when the html remain on the disk.

    I have to think it through… Thanks for the suggestion.

     
  • Evgeniy Yakushev

    I made a sample text files for topsites and topusers reports. When they are sent by sendmail they look like webpages.
    Can you take a look?

     

Log in to post a comment.