This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 109498 - logwatch reports "Unmatched Entries" when hostname has a dash "-" in name for cron entries.
logwatch reports "Unmatched Entries" when hostname has a dash "-" in name for...
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: logwatch (Show other bugs)
9
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
David Lawrence
:
: 110291 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-08 13:02 EST by Pete Nesbitt
Modified: 2007-04-18 12:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-20 16:12:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
diff of original /etc/log.d/scripts/services/cron and patched copy (512 bytes, patch)
2003-11-08 13:08 EST, Pete Nesbitt
no flags Details | Diff
output of 'diff -l' on the original cron file and the 2nd fix. (638 bytes, patch)
2003-11-08 15:08 EST, Pete Nesbitt
no flags Details | Diff
just cleaned old commented lines from new file. (cleaner diff) (391 bytes, patch)
2003-11-10 00:11 EST, Pete Nesbitt
no flags Details | Diff

  None (edit)
Description Pete Nesbitt 2003-11-08 13:02:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a)
Gecko/20030728 Mozilla Firebird/0.6.1

Description of problem:
When logwatch searches logs for the cron service, it does not properly
check for a '-' (dash) in the hostname and therefore fails. It only
searches for regex \w which does not include the dash character.
I will send a "diff -l" to show the fix.

Version-Release number of selected component (if applicable):
logwatch-4.3.1-2

How reproducible:
Always

Steps to Reproduce:
1.change hostname to have a dash example:
d123-123-123-123.bchsia.telus.net
2.run "logwatch --service cron --print"
3.
    

Actual Results:  this will produce output similar to:
 "**Unmatched Entries**
Nov  2 04:20:00 d123-123-123-123 CROND[2115]: (root) CMD
(/usr/local/scripts/check_ip/check_ip.sh)

Expected Results:  should have returned nothing.

Additional info:
Comment 1 Pete Nesbitt 2003-11-08 13:08:05 EST
Created attachment 95830 [details]
diff of original /etc/log.d/scripts/services/cron and patched copy

I am not too familair with the process as it is my first submission. I have
attached a "diff -l" and called it a patch, I hope that is the correct
process/terminalogy.
Comment 2 Pete Nesbitt 2003-11-08 15:01:36 EST
Just changed the string a bit more as it was allowing a hostname
consisting of only (one or more) dashes.
Change string:
 Original s/^... .. ..:..:.. \w+ \w+\[\d+\]: \((\S+)\)\s+//
 1st fix: s/^... .. ..:..:.. [-\w]+ \w+\[\d+\]: \((\S+)\)\s+//
 2nd fix: s/^... .. ..:..:.. [-*\w+]+ \w+\[\d+\]: \((\S+)\)\s+//

actual change between 1st fix & 2nd is:
[-\w]+
became [-*\w+]+

(new diff attached)
Comment 3 Pete Nesbitt 2003-11-08 15:08:01 EST
Created attachment 95832 [details]
output of 'diff -l' on the original cron file and the 2nd fix.

corrects first fix that allowed hostname of all dashes.
Comment 4 Pete Nesbitt 2003-11-10 00:11:34 EST
Created attachment 95865 [details]
just cleaned old commented lines from new file. (cleaner diff)
Comment 5 ivan 2003-11-19 07:27:56 EST
Thanks Pete - that is exactly what I've been seeing, and I've 
finally got round to looking at it.

It is probably worthwhile bearing in mind that many places (ISPs 
especially) use naming standards, and use a "-" as a separator 
(eg web-1, etc). This is why we hit it.
Comment 6 Elliot Lee 2003-12-17 14:45:37 EST
*** Bug 110291 has been marked as a duplicate of this bug. ***
Comment 7 Elliot Lee 2004-08-20 16:12:39 EDT
Looks like the latest logwatch has a fix for this issue.

Note You need to log in before you can comment on or make changes to this bug.