how to create and change reports in Lire 20011017 (was: Re: Failed submissions to hibou responder for 10/15/01)

Joost van Baal joostvb at logreport.org
Sun Oct 21 16:58:01 CEST 2001


Hi Raghav,

On Sat, Oct 20, 2001 at 05:39:30PM +0000, Raghav Sood wrote:
> 
> i get this strange error when i try to generate logs with this command
> 
> 
> lr_run lr_log2report error.txt email qmail < logs > report
> 
> /sun4-solaris/auto/XML/Parser/Expat/Expat.so: symbol XML_ParserCreate_MM:
> referenced symbol not found
> bogus message: Killed
> email qmail lr_tag-20011020230719-20233 lr_log2xml crit qmail2dlf failed,
> exiting
> email qmail lr_tag-20011020230719-20233 lr_log2xml notice keeping
> /export/home/raghav/tmp/lr_log2xml.qmail.lr_tag-20011020230719-20233.20246.dlf
> for debugging.
> email qmail lr_tag-20011020230719-20233 lr_log2report err lr_log2xml email
> qmail  failed
> email qmail lr_tag-20011020230719-20233 lr_log2report notice keeping
> /export/home/raghav/tmp/lr_log2report.qmail.lr_tag-20011020230719-20233.report.xml
> for debug
> email qmail lr_tag-20011020230719-20233 lr_log2report notice you might like
> to inspect and clean up the Lire database in
> /export/home/raghav/var/lib/lire/data/meta/index
> 

I've had similar experiences when installing on Solaris.  Could you
run

cochon at abramowitz:~% perl -e 'use XML::Parser;
 $p1 = new XML::Parser(Style => "Debug");
 $p1->parsefile("/usr/local/share/lire/schemas/www.xml");'

(that's one line) and sent the output this gives?  (You might have to
tweak the path to www.xml.)

And could you check to which libraries Expat.so is linked, by doing

$ ldd <yourpathhere>/sun4-solaris/auto/XML/Parser/Expat/Expat.so

?  I've had occurences of the build process where Expat.so was not
linked to libexpat.so.0 .  I'm still not quite sure yet about how this
can happen.

<snip>
> > On Thu, Oct 18, 2001 at 05:50:47PM +0000, Raghav Sood wrote:
> > > thanks for your reply. i downloaded the newer version but it failed gmake
> > > install step on solaris 8 . it gave some error installing XML parser
> > > recursively. 
> > 
> > Could you please state the error message it gave?  I've successfully
> > installed Lire on SunOS 5.7 (that's Solaris 7, iirc).  No need to use
> > gmake, btw.  It should work with native Solaris make.

I suppose you successfully ran `make install' by now.

> > > there is one more thing i need to know Joost , whether i can find out whom
> > > all a user sent out the mails to using lire .
<snip>
> > > > On Tue, Oct 16, 2001 at 07:11:50AM +0000, Raghav Sood wrote:
> > <snip>
> > > > > i want to know francis can i get a report about all the senders and
> > > > > receivers instead of the top 10/5 . and what all other things are possible
> > > > > with lire.
> > <snip>
<snip>
> > > > To create a report listing _all_ senders and receivers, you'd have to
> > > > copy the file /usr/local/share/lire/reports/email/top-from-domain.xml to
> > > > e.g. /usr/local/share/lire/reports/email/from-domain.xml, and edit that
> > > > one: get rid of the 'limit' field.  List `from-domain' in your email.cfg,
> > > > to get your new report included.

OK, I'll expand a bit on this one.  This is what I did:

hibou at gelfand:~/lire-20011017% ./configure --prefix=$HOME/logreport && \
 make && make install

hibou at gelfand:~/lo...share/lire/reports/email% cp top-from-domain.xml \
 from-domain.xml

hibou at gelfand:~/lo...share/lire/reports/email% vi from-domain.xml
hibou at gelfand:~/lo...share/lire/reports/email% cat from-domain.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE lire:report-spec PUBLIC
  "-//LogReport.ORG//DTD Lire Report Specification Markup Language V1.0//EN"
  "http://www.logreport.org/LRSML/1.0/lrsml.dtd">
<lire:report-spec xmlns:lire="http://www.logreport.org/LRSML/"
 superservice="email" id="from-domain" charttype="bars">

 <lire:title>Deliveries From Domain Email Report</lire:title>
 <lire:description>
  <para>This report lists the domains from which we received emails.</para>
 </lire:description>

 <lire:display-spec>
  <lire:title>Deliveries From Domain</lire:title>
 </lire:display-spec>

 <lire:filter-spec>
  <lire:eq arg1="$stat" arg2="sent"/>
 </lire:filter-spec>

 <lire:report-calc-spec>
  <lire:group sort="-deliveries_total">
   <lire:field name="from_domain"/>
   <lire:count name="deliveries_total"/>
  </lire:group>
 </lire:report-calc-spec>

</lire:report-spec>

<!--
Keep this comment at the end of the file
Local variables:
mode: xml
-->

hibou at gelfand:~/.lire/etc% cp ~/logreport/etc/lire/email.cfg .
hibou at gelfand:~/.lire/etc% vi email.cfg

( This file now features:

top-from-domain                         domain_to_show=10

from-domain

top-volume-to-domain                    domain_to_show=10

)

Now, running

hibou at gelfand:~% grep 'qmail:' /var/log/mail.log | \
 lr_run lr_desyslog qmail | \
 lr_run lr_log2report /tmp/errors email qmail > /var/tmp/qmail.report

gives me an additional report:

  Deliveries From Domain

   lists.example.org ....................................... 119
   list.foo.com ............................................. 43
   host.bar.net ............................................. 25
   blah.example.com ......................................... 10
   bar.com ................................................... 1

Does this answer your question?

Bye,

Joost

-- 
Joost van Baal              . .           http://www.logreport.org/
                           .   .
/^LogReport$/               . .               joostvb at logreport.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/questions/attachments/20011021/3241970c/attachment.bin 


More information about the Questions mailing list