html report output when input from STDIN
SmartList
questions-request at logreport.org
Sat Sep 17 12:54:10 CEST 2005
Only messages from subscribers to the questions at logreport.org list are
distributed automatically to the list. Since the envelope-from address on
your message was not on the subscribers list, your message - as quoted
below - is being held by the list administrator. If the message is suitable
for distribution (i.e.: not spam), it will get forwarded to the list
subscribers.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Mikael,
> I'm trying to get HTML outputs via lr_log2report.
> lire user does not have read permissions on the log file so I must feed
> the logfile via STDIN.
>
> I'm sorry to post this dumb question but I've not found out how to handle
> the output :(
>
> What I've tried :
>
> #su - lire -c "lr_log2report -o html syslog" < /path/servers.log > out.tar
> Parsing log file using syslog DLF Converter...
> Extracted 730 DLF records on 730 lines.
> Encountered 0 errors and ignored 0 lines.
> Running analysers...
> Generating XML report...
> Formatting report as html in -...
> /bin/tar: report: Cannot stat: No such file or directory
> /bin/tar: Error exit delayed from previous errors
The syntax for lr_log2report is:
lr_log2report [options] dlf_converter [ logfile ] [ output_file ]
In your case you are omitting the optional 'logfile' and 'output_file'
arguments, since you are using stdin and stdout instead. Internally
this is handled by substituting '-' for these arguments. But for the
special case of the '-o html' output format, 'output_file' will be
interpreted as a directory name (and output direction is effectively
ignored, which could be considered a bug). The directory is used to
unpack the tar file containing the html-formatted report. Since you
probably don't have a directory named '-', the shown error message results.
The workaround for this problem is to explictly specify the 'logfile'
and 'output_file' arguments. For 'logfile' you can specify '-' to indicate
that you want the log file data to be read from stdin. For 'output_file'
you should specify the name of a directory -- it is OK to specify a name
which does not exist yet, since lr_log2report will create the directory
for you in that case. E.g:
# su - lire -c "lr_log2report -o html syslog - /tmp/new_dir" \
</path/servers.log
should work for you.
Regards,
Wytze van der Raay
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDK/XJqs+zhiEbbu8RAr8CAJ4ryplc+rF3TCb+wgBSg5LDqAYNFgCfcZ3D
A0K0ufXqTrQh83Wf1MfZ21M=
=Aj6x
-----END PGP SIGNATURE-----
More information about the Questions
mailing list