Bug 167925
| Summary: | http script doesn't parse ssl_access_log | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Aleksandar Milivojevic <alex> | ||||||||||
| Component: | logwatch | Assignee: | Ivana Varekova <varekova> | ||||||||||
| Status: | CLOSED ERRATA | QA Contact: | |||||||||||
| Severity: | medium | Docs Contact: | |||||||||||
| Priority: | medium | ||||||||||||
| Version: | 4.0 | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | RHEL4U3NAK | ||||||||||||
| Fixed In Version: | RHBA-2006-0631 | Doc Type: | Bug Fix | ||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2006-09-06 13:53:59 UTC | Type: | --- | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Embargoed: | |||||||||||||
| Bug Depends On: | |||||||||||||
| Bug Blocks: | 189992, 201655 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Aleksandar Milivojevic
2005-09-09 16:33:26 UTC
Created attachment 118646 [details]
simple patch
This is just a simple quick-fix. Probably very bad example of Perl
programming. However, it works ;-)
Hello, I agree with the second problem. The pathes without archive/ directory should be added to http.conf too. But I can't reproduce your first problem or I perhaps misunderstood your explanation. Could you please attach your ssl_access_log file, which create wrong logwatch output. Thank you. The first problem is that ssl_access_log has two fields less than access_log (referrer and agent are missing). Therefore regular expression that is built for access_log does not work for ssl_access_log. For example, consider following line from ssl_access_log: 1.2.3.4 - - [06/Sep/2005:14:50:01 -0500] "GET / HTTP/1.1" 202 212 Current http script will not report it. The workaround (or even final solution) could be chaning default log format for ssl_access_log (by adding referrer and agent). I'll attach a small Perl script that demonstrates the problem more clearly. Created attachment 118711 [details]
testcase
This is a small Perl script that demonstrates the problem. Variable $pattern
is built the same way as in current http script. @patterns array is my
addition (from proposed patch). $line[0] is a line from access_log, $line[1]
is a line from ssl_access_log. Note how matching against $pattern fails for
$line[1]. If $pattern was used to populate @parsed_line array, you end up with
an empty array (regex failed to match), and therefore current http script does
not report anything from ssl_access_log.
Created attachment 118752 [details]
Proposed patch.
Thank you for your notices.
I agree with your description of the first problem too. Your patch is right, it
is the first part of the proposed patch.
In the second problem, there is one more thing. Each access_log log is used
twice. The second part of the proposed patch fix this problem and your problem
with missed ssl_access_log logs too.
Created attachment 118753 [details] Proposed patch containing bug 159567 patch. logwatch-5.2.2-1 http script contains one other bug (159567) patch for this bug is in bug page. Attached patch contains bug 159567 patch and patch for this bug. Both bugs are quite near, and they affected each other. Could you please test this patch. Yup, it appears to be working. Great. thank you. I think http script with this patch creates correct transparent output. If you find some problem with logwatch http script with this patch (comment 6) please attach some comment. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2006-0631.html |