logwatch missing conf files

Bug #234926 reported by Martijn Brinkers
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
logwatch (Debian)
New
Unknown
logwatch (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

Using Hardy server 64 bits.

logwatch does not install any conf files. /etc/logwatch only contains directories but no files. It seems that the conf files from /usr/share/logwatch/ are correctly installed.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Empty files in /etc/logwatch don't prevent logwatch from working.

Is logwatch not working properly on your system ?

Changed in logwatch:
importance: Undecided → Wishlist
status: New → Incomplete
Changed in logwatch:
status: Unknown → Incomplete
Revision history for this message
bradleee (brad-edmondson) wrote :

The logwatch package installs an empty directory tree under /etc/logwatch/ that mirrors the tree at /usr/share/logwatch/distr.conf/ but without any files. The /etc/logwatch/ directory is meant to provide a space to supplement the default dist.conf settings. However, most other packages install their defaults in /etc/packagename/, hence the confusion with the empty directories. I think the logwatch package should be updated to install its dist.conf files in /etc/ so that its default configuration files are easily findable and changeable by Ubuntu users who are used to all (most) .conf files actually in use to reside in /etc/. I am not a packager (yet) but would be happy to learn how to contribute by making these location changes if pointed in the right direction.

Revision history for this message
Claudiu Vlad (claudiu-vlad) wrote :

Here is an excerpt from /usr/share/doc/logwatch/HOWTO-Customize-LogWatch.gz

You can customize the output of logwatch by modifying variables in the
/etc/logwatch/conf directory.

Default values are specified in the /usr/share/logwatch/default.conf
directory. Your distribution may have set additional defaults in the
/usr/share/logwatch/dist.conf directory. All the variables available
are declared in the files under these directories. You can change the
default values to modify how or what is displayed with logwatch.

One variable available to all services, and which by default is not
specified, is the 'Detail' variable (note that it is not preceded by
a '$' symbol). Specifying a Detail value will override the global
Detail level, for that service only.

There are two mechanisms for customizing the variables:

1. The /etc/logwatch/conf directory is first searched for files with the
   same name and relative location as the
   /usr/share/logwatch/default.conf directory. Variables declared in
   these files override the defaults.

   For example, if file /etc/logwatch/conf/services/sendmail.conf has the
   single entry:
        $sendmail_unknownusersthreshold = 5
   then the threshold for unknown users is set to five instead of the
   default of one. All other parameters are not modified.

and so on.
     If you read that , your question is answered.

Revision history for this message
Claudiu Vlad (claudiu-vlad) wrote :

It's not a bug, it's a feature.

Changed in logwatch:
status: Incomplete → Invalid
Revision history for this message
cviniciusm (cviniciusm) wrote :

Hello,

When configured to use the format html, logwatch sends an empty e-mail.

Here the information:
# dpkg -p logwatch
Package: logwatch
Priority: optional
Section: admin
Installed-Size: 2592
Maintainer: Ubuntu Core developers <email address hidden>
Architecture: all
Version: 7.3.6.cvs20090906-1ubuntu1

# pwd
/usr/share/logwatch/dist.conf

# cat logwatch.conf
mailer = "/usr/sbin/sendmail -t"
TmpDir = /tmp
MailFrom = root
Output = mail
Format = html

# /etc/cron.daily/00logwatch
Can not open HTML Header at /usr/share/logwatch/default.conf/html/header.html: No such file or directory

# updatedb
# locate hearder.html

So, I think it's a bug.

Changed in logwatch (Ubuntu):
status: Invalid → New
description: updated
description: updated
Changed in logwatch (Ubuntu):
status: New → Invalid
Revision history for this message
Manson Thomas (dev-mansonthomas) wrote :

Is there a workaround ?

Revision history for this message
Manson Thomas (dev-mansonthomas) wrote :

I'm mean what cviniciusm reports on 2009-11-12, affects me too in the exact same way.

It seems to be a recent bug, because some of my server on which logwatch was installed for a while do not have the issue.

On a working server :

thomas@home:/home/special/thomas/emule/done$ locate header.html
/etc/logwatch/conf/html/header.html

And I also largely agree that all logwatch conf should be under /etc/logwatch (both standart config and custom modification), it's very disturbing to have to search where the conf is for this very package.

Customizing feature is a good thing, but configuration should be where configuration is usually placed : in /etc

When I first installed logwatch I found it very strange to configure something in /var/something.

Revision history for this message
Manson Thomas (dev-mansonthomas) wrote :

workaround :

create the missing file in /usr/share/logwatch/default.conf/html/.

here is one I've got in my server :

footer.html
###############################################################
<!-- Start footer.html -->
<div class=\"copyright\">
<hr>
<p>Logwatch &copy;Copyright 2002-2006 Kirk Bauer</p>
<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
</p>
<p>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
</p>
<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</p></div>
</body></html>
###############################################################

header.html
###############################################################
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Logwatch $Version ( $VDate )</title>
<meta name="generator" content="Logwatch $Version ( $VDate )">
<style type="text/css">
  h1 {color: gray; border-bottom: 3px double silver; font-family: sans-serif; }
  h2 {color: white; border-bottom: 1px solid silver; font-family: sans-serif; }
  h3 {color: white; border-bottom: 1px solid silver; font-family: sans-serif; }
  th {background: #6D88AD; text-align: left; font-family: sans-serif; }
  td {background: #EFEFEF; text-align: left; font-family: courier,serif; font-size: 10px; }
  li { font-family: sans-serif; }
  .ref {padding-left: 1%; }
  .service {padding-left: 1%; }
  .return_link {border-top: 1px; border-bottom: 1px;
  padding: 1%; margin-top: 1%; margin-bottom: 1%; font-family: sans-serif; }
  .copyright {color: black; border-top: 1px solid grey;
  border-bottom: 1px solid grey;
  padding: 1%; margin-top: 1%; margin-bottom: 1%;}
</style>
</head>
<body style="width:90%; margin-left: 5%; margin-right: 5%" bgcolor="#FFFFFF" >
<hr>
<!-- End header.html -->
###############################################################

Changed in logwatch (Debian):
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.