Bug 769951 - [apache] Warnings about unknown modules logged too frequently
[apache] Warnings about unknown modules logged too frequently
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: JON 2.4.2
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2011-12-22 14:57 EST by Charles Crouch
Modified: 2015-02-01 18:27 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 704486
Last Closed: 2012-02-07 14:25:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Charles Crouch 2011-12-22 14:57:53 EST
+++ This bug was initially created as a clone of Bug #704486 +++

Description of problem:

Each time the apache server discovery component runs discovery, it logs a warning about each module it doesn't know the mapping for for each IfModule directive it encounters during config files parsing.

This is too frequent and fills the log with hundreds of warnings if there are more apache instances monitored.

Version-Release number of selected component (if applicable):
3.0.1 as of commit 5e55fb232d2496961477debd9d5eaf94837d69d4

How reproducible:

Steps to Reproduce:
1. Have 10+ apache instances running, each using an IfModule directive with a non-standard module that has not been loaded (for testing purposes "blahblah" can be used for example)
2. Run discovery
Actual results:
a large number of warnings in the log about unknown modules

Expected results:
The warning issued at most once per agent/plugin lifetime.

Additional info:

--- Additional comment from lkrejci@redhat.com on 2011-05-13 08:26:17 EDT ---

commit 8f9c9e4d7665a8c83f16081590a4704a3d55a6ae
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Fri May 13 12:47:52 2011 +0200

    BZ 704486 - Improving the logging behavior of the unknown apache modules.
    These are now reported as warnings whenever a configuration is
    read/updated or an operation requiring reading the configuration
    is invoked.
    The periodical discoveries only report the unknown modules once
    per plugin lifetime.
    When processing IfModule directive, the module is now assumed not loaded
    if the the directive uses the module name (as opposed to module source
    file) and we can't find the corresponding LoadModule directive.
    The warnings are therefore only issued when the IfModule using
    the module source file AND we don't know the mapping between module name
    and module source file.

--- Additional comment from mfoley@redhat.com on 2011-10-03 13:54:57 EDT ---

verified 10/3/2011 build.
Comment 1 Sunil Kondkar 2012-01-05 08:18:48 EST
Verified on JON 2.4.2 Release Candidate #2 (buildversion: 2.4.2.GA build
number: 3fd0075:1afdc60)

Used below in the IfModule directive in 10+ apache instances:
<IfModule mod_unknown.c>

Verified that the agent log displays below warning message once:
2012-01-05 17:49:19,668 WARN  [ResourceDiscoveryComponent.invoker.daemon-2] (rhq.plugins.apache.util.RuntimeApacheConfiguration)- Encountered unknown module name in an IfModule directive: mod_unknown.c. If you are using Apache 2.1 or later, you can try changing the module identifier from the source file to the actual module name as used in the LoadModule directive to get rid of this warning.
Comment 2 Mike Foley 2012-02-07 14:25:54 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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