Merge ~kstenerud/ubuntu/+source/logwatch:cosmic-logwatch-syslog-1199511 into ubuntu/+source/logwatch:ubuntu/cosmic-devel

Proposed by Karl Stenerud
Status: Rejected
Rejected by: Christian Ehrhardt 
Proposed branch: ~kstenerud/ubuntu/+source/logwatch:cosmic-logwatch-syslog-1199511
Merge into: ubuntu/+source/logwatch:ubuntu/cosmic-devel
Diff against target: 70 lines (+22/-6)
6 files modified
debian/changelog (+8/-0)
debian/dist.conf/logfiles/cron.conf (+4/-3)
debian/dist.conf/logfiles/daemon.conf (+4/-3)
debian/dist.conf/logfiles/kernel.conf (+2/-0)
debian/dist.conf/logfiles/secure.conf (+2/-0)
debian/dist.conf/logfiles/syslog.conf (+2/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Needs Resubmitting
Canonical Server Pending
Canonical Server Core Reviewers Pending
Review via email: mp+354951@code.launchpad.net

Description of the change

Since the changeover to rsyslogd, logwatch has been looking in the wrong places for the logfiles it's supposed to monitor.

Logs that used to go to /var/log/daemon.log, /var/log/cron.log, and /var/log/messages, are now being logged to /var/log/syslog. This commit changes configurations in dist.conf/logfiles/ to point to /var/log/syslog.

Steps to test:

# lxc launch ubuntu-daily:cosmic tester
# lxc exec tester bash
# dhclient
# apt update
# apt dist-upgrade -y
# apt install -y logwatch

# echo "Sep 12 01:41:51 xxxxx named[838]: received control channel command 'refresh example.com'
Sep 12 03:34:10 xxxxx smartd[30161]: Monitoring 4 ATA and 0 SCSI devices
Sep 12 03:34:11 xxxxx smartd[30161]: Device: /dev/hdc, 463 Currently unreadable (pending) sectors
Sep 12 03:34:11 xxxxx smartd[30161]: Device: /dev/hdc, 1210 Offline uncorrectable sectors
Sep 12 03:34:11 xxxxx smartd[30161]: Device: /dev/hdd, 1430 Currently unreadable (pending) sectors
Sep 12 03:34:11 xxxxx smartd[30161]: Device: /dev/hdd, 1429 Offline uncorrectable sectors
Sep 12 09:00:00 xxxxx afpd[2383]: login noauth" >> /var/log/syslog

# logwatch --detail medium --range all --service named
# logwatch --detail medium --range all --service smartd
# logwatch --detail medium --range all --service afpd

* None of these commands will display anything.

# add-apt-repository -y ppa:kstenerud/cosmic-logwatch-syslog-1199511
# apt update
# apt upgrade -y

# logwatch --detail medium --range all --service named
# logwatch --detail medium --range all --service smartd
# logwatch --detail medium --range all --service afpd

* All three commands should display report information

Package Tests:

There are no package tests in logwatch.

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I'm no logwatch expert, but seeing the replaced rules should there also be an entry like this:

Archive = syslog.*.gz

To also by default read the archived data.
if we change it it would be great to test that as well and if working use it right away.

For example the cron config would otherwise loose Archive access, so I'd think we should add it (for all of them)

review: Needs Information
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Karl,
what is the status of this MP thse days?
I was just wondering as I clean up old MPs that I'm associated with.

1e940d6... by Karl Stenerud

 * d/dist.conf/logfiles/{cron,daemon,kernel,secure,syslog}.conf: rsyslog now
   puts cron and daemon into syslog, so point logwatch there. Also enable
   looking into archived .gz logs (LP: #1199511, LP: #1010625, LP: #752172)

5532108... by Karl Stenerud

changelog

Revision history for this message
Karl Stenerud (kstenerud) wrote :

OK, updated to base from disco, and also to use .gz files.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I asked on IRC for combining this fix with a merge of 7.4.3+git20180713-1 - would that be ok?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Note: the changes so far LGTM, just that the new version appeared in the meantime.

Revision history for this message
Karl Stenerud (kstenerud) wrote :

The new version was to add the tests that were in the original cherry-picked commit. Do I need to do something else for that?

Revision history for this message
Karl Stenerud (kstenerud) wrote :

Er no sorry wrong comment for this MP. The new version was in response to your last comment to merge with 7.4.3+git20180713-1, and to base it off disco instead of cosmic.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Now I see disco here - thanks, re-reviewing

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hmm, no - let me outline more clearly what I expect and catch me on IRC if anything is left unclear - sorry I I were not.

This MP formerly was:
7.4.3+git20161207-2ubuntu1 + fix - to merge against pkg/ubuntu/cosmic-devel

This MP now is:
7.4.3+git20161207-2ubuntu2 + fix - to merge against pkg/ubuntu/cosmic-devel
(that MP target is now wrong, but that is not the problem)

What I'd like to see instead is:
7.4.3+git20180713-1ubuntu1 being:
- merge of 7.4.3+git20180713-1 from Debian
- adding the fix that made you work on this (LP: #1199511, LP: #1010625, LP: #752172)
- new MP against debian/sid (as usual for merges)
- add to the new MP the usual PPA test builds
- closing this MP as rejected and adding a comment pointing to the new MP

Setting state to "Resubmit" to make that clear on the state we see in the Team overview.

review: Needs Resubmitting
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This older MP is dead and superseeded - lets mark it that way to get out of our "open MP" overview.

Unmerged commits

5532108... by Karl Stenerud

changelog

1e940d6... by Karl Stenerud

 * d/dist.conf/logfiles/{cron,daemon,kernel,secure,syslog}.conf: rsyslog now
   puts cron and daemon into syslog, so point logwatch there. Also enable
   looking into archived .gz logs (LP: #1199511, LP: #1010625, LP: #752172)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index e106f24..6c77f4c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+logwatch (7.4.3+git20161207-2ubuntu3) disco; urgency=medium
7+
8+ * d/dist.conf/logfiles/{cron,daemon,kernel,secure,syslog}.conf: rsyslog now
9+ puts cron and daemon into syslog, so point logwatch there. Also enable
10+ looking into archived .gz logs (LP: #1199511, LP: #1010625, LP: #752172)
11+
12+ -- Karl Stenerud <karl.stenerud@canonical.com> Mon, 10 Dec 2018 12:17:52 +0100
13+
14 logwatch (7.4.3+git20161207-2ubuntu2) cosmic; urgency=medium
15
16 * d/p/ssh-ignore-disconnected.patch: [sshd] ignore disconnected from user
17diff --git a/debian/dist.conf/logfiles/cron.conf b/debian/dist.conf/logfiles/cron.conf
18index 155cb5f..2d1b400 100644
19--- a/debian/dist.conf/logfiles/cron.conf
20+++ b/debian/dist.conf/logfiles/cron.conf
21@@ -1,3 +1,4 @@
22-LogFile = cron.log
23-Archive =
24-Archive = cron.log.*
25+LogFile = syslog
26+LogFile = syslog.1
27+
28+Archive = syslog.*.gz
29diff --git a/debian/dist.conf/logfiles/daemon.conf b/debian/dist.conf/logfiles/daemon.conf
30index a3c39ca..2d1b400 100644
31--- a/debian/dist.conf/logfiles/daemon.conf
32+++ b/debian/dist.conf/logfiles/daemon.conf
33@@ -1,3 +1,4 @@
34-# Debian bug #612634: new rotation uses .1 as first uncompressed extension
35-# should be added to default daemon.conf
36-LogFile = daemon.log.1
37+LogFile = syslog
38+LogFile = syslog.1
39+
40+Archive = syslog.*.gz
41diff --git a/debian/dist.conf/logfiles/kernel.conf b/debian/dist.conf/logfiles/kernel.conf
42index 67a751e..06855b3 100644
43--- a/debian/dist.conf/logfiles/kernel.conf
44+++ b/debian/dist.conf/logfiles/kernel.conf
45@@ -1,3 +1,5 @@
46 # Debian bug #612634: new rotation uses .1 as first uncompressed extension
47 # should be added to default kernel.conf
48 LogFile = kern.log.1
49+
50+Archive = kern.log.*.gz
51diff --git a/debian/dist.conf/logfiles/secure.conf b/debian/dist.conf/logfiles/secure.conf
52index 1de967a..5bce33b 100644
53--- a/debian/dist.conf/logfiles/secure.conf
54+++ b/debian/dist.conf/logfiles/secure.conf
55@@ -2,3 +2,5 @@
56 # should be added to default secure.conf
57 # This could also be changing the Archive auth.log.*.gz > auth.log.*
58 LogFile = auth.log.1
59+
60+Archive = auth.log.*.gz
61diff --git a/debian/dist.conf/logfiles/syslog.conf b/debian/dist.conf/logfiles/syslog.conf
62index 238e8fd..093fbe3 100644
63--- a/debian/dist.conf/logfiles/syslog.conf
64+++ b/debian/dist.conf/logfiles/syslog.conf
65@@ -1,3 +1,5 @@
66 # Debian bug #612634: new rotation uses .1 as first uncompressed extension
67 # should be added to default syslog.conf
68 LogFile = syslog.1
69+
70+Archive = syslog.*.gz

Subscribers

People subscribed via source and target branches