Lire don't generate logreports

Kristoffer Ravnholt krisravn at gmail.com
Mon Aug 21 16:34:54 CEST 2006


Wytze van der Raay wrote:
> Hi Kristoffer,
>
> On 21.08.2006 14:01, Kristoffer Ravnholt wrote:
> >> I have installet lire from a couple of days ago. But I have not been
> >> able to get it work properly. I can get it to generate a log report
> if a
> >> wrote lr_log2report --output html syslog /var/log/my_log ~/log_report
> >> It generate a vary nice report :D
> >> But then I try to setup lire to make a daily report, using the program
> >> lire, that doesn't work, what I did was:
> >> 1) run lire
> >> 2) add a store (file)
> >> 3) add import jobs (file)
> >> 4) add a report job
> >> 5) save that bunch
> >> 6) Run lr_cron hourly /etc/lire/mail every hour to process the job.
> >>
> >> I have found a couple of other people on the mailing list, having the
> >> exact same problem as me, but they have not been a useful answer to any
> >> of them :(, so I try to ask again, here is a link to an other person
> >> with the same problem as me.
> >> http://logreport.org/contact/lists/questions/msg00649.php
> >>
> >> Im using Lire v. 2.0.1 on Kubuntu Dapper Gnu/Linux
>
> I have to admit that I am very unfamiliar with the Curses-based
> interactive
> interface to Lire. As an old-time user, I've stuck to the command line
> interface, which to me seemed more mallable for shell scripting etc.
> It would be nice if Francis Lacoste could take a look at this problem,
> which keeps popping up on the Lire questions list without a good answer,
> as you've observed correctly. He wrote this interface and ran with it.
>
> The only remark I can make right now about your 1)-6) list is: does the
> directory /etc/lire/mail in 6) correspond to the Lire store directory
> you created under 2)? I've noticed that when you invoke lr_cron with a
> non-existing directory, it happily proceeds with creating a new (empty)
> Lire store at the specified location.
> For further debugging, it would help if you could e-mail the config.xml
> file from your Lire store directory.
>
> Regards,
> -- wytze
>
Yes, the directory /etc/lire/mail correspond to the Lire store directory
I created under 2). But I have solved my problem, Because I can't get
lire to work properly I created a  perl script thay do the stuff for me:
#!/usr/bin/perl

chomp($date = `date +%F`);
$file_name = $date . "_daily_log";
system("lr_log2report --output html syslog /var/log/daily_log
/var/log/archive/$file_name");
system("lr_log2mail --output html --log-file /var/log/daily_log syslog
my\@e-mail.com");
system("rm /var/log/daily_log");

And that works fine. But it will be nice if the problem/bug in lire
could be fixed. Here is my config.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE config PUBLIC
  "-//LogReport.ORG//DTD Lire Report Configuration Markup Language V1.0//EN"
  "http://www.logreport.org/LRCML/1.0/lrcml.dtd"[
<!ENTITY % LIRE.pfx "">
]>
<config xmlns="http://www.logreport.org/LRCML/">
  <global>
    <param name="reports">
      <param name="report_cfg">
        <param name="id">database_default</param>
        <param name="title">database report</param>
        <param name="sections">
          <param name="section">
            <param name="specs">
              <param name="database:actions-by-period">
                <param name="id">actions-by-period.0</param>
              </param>
              <param name="database:top-users">
                <param name="id">top-users.0</param>
              </param>
              <param name="database:top-databases">
                <param name="id">top-databases.0</param>
              </param>
              <param name="database:top-querytypes">
                <param name="id">top-querytypes.0</param>
              </param>
            </param>
            <param name="filters">
            </param>
            <param name="title">Database Report</param>
            <param name="superservice">database</param>
          </param>
          <param name="section">
            <param name="specs">
            </param>
            <param name="title">syslog report</param>
            <param name="filters">
            </param>
            <param name="superservice">syslog</param>
          </param>
          <param name="section">
            <param name="specs">
            </param>
            <param name="title">log report</param>
            <param name="filters">
            </param>
            <param name="superservice">lire_import_log</param>
          </param>
          <param name="section">
            <param name="specs">
            </param>
            <param name="title">stats</param>
            <param name="filters">
            </param>
            <param name="superservice">lire_import_stats</param>
          </param>
          <param name="section">
            <param name="specs">
            </param>
            <param name="title">store report</param>
            <param name="filters">
            </param>
            <param name="superservice">msgstore</param>
          </param>
        </param>
      </param>
    </param>
    <param name="report_jobs">
      <param name="report_job">
        <param name="name">hourly_report</param>
        <param name="schedules">
          <param name="schedule">
            <param name="output_jobs">
              <param name="output_job">
                <param name="format" value="html">
                </param>
                <param name="destination" value="file">
                  <param name="file">/home/stoffer/daily_report_log</param>
                </param>
                <param name="name">report_to_file</param>
              </param>
              <param name="output_job">
                <param name="format" value="html">
                </param>
                <param name="destination" value="email">
                  <param name="subject">hourly log report from
serv057</param>
                  <param name="emails">
                    <param name="email">krisravn at gmail.com</param>
                  </param>
                </param>
                <param name="name">report_to_mail</param>
              </param>
            </param>
            <param name="period">hourly</param>
            <param name="report_config">database_default</param>
          </param>
        </param>
      </param>
    </param>
    <param name="streams_config">
      <param name="syslog">
      </param>
      <param name="lire_import_log">
      </param>
      <param name="lire_import_stats">
      </param>
    </param>
    <param name="import_jobs">
      <param name="import_job">
        <param name="period">hourly</param>
        <param name="filter">cat</param>
        <param name="name">my_log_store</param>
        <param name="service" value="syslog">
        </param>
        <param name="log_file">/var/log/daily_log</param>
        <param name="log_encoding"></param>
      </param>
    </param>
  </global>
</config>

Regrads
Kristoffer


-- 
To UNSUBSCRIBE, email to questions-request at logreport.org with a subject of 
"unsubscribe". Trouble? Send an email with subject "help" to 
questions-request at logreport.org



More information about the Questions mailing list