wrong log rotation of Nagios WSGI application logs

Bug #1635222 reported by Swann Croiset
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StackLight
Fix Released
High
Swann Croiset
0.10
Fix Released
High
Swann Croiset

Bug Description

The WSGI application handling the passive checks in front of Nagios is hosted by a custom apache2-nagios service (managed by Pacemaker).
The corresponding HTTP log are produced here /var/log/apache2/nagios_wsgi_access.log

Expected behavior:
the logs nagios_wsgi_(access|error).log are well rotated

Actual result:
the logs nagios_wsgi_access.log are rotated (/etc/logrotate.d/apache2.conf)
but the custom apache2 process is not aware about this log rotation and then continues to log in the rotated log (eg nagios_wsgi_access.log.1) because the rotation is made by "copy-truncate".

Fix:

* make WSGI application log into /var/nagios/nagios_wsgi_access.log
* add a dedicated logrotate configuration for this file and restart gracefully apache2-nagios resource

Tags: nagios
Swann Croiset (swann-w)
Changed in lma-toolchain:
assignee: nobody → LMA-Toolchain Fuel Plugins (mos-lma-toolchain)
Swann Croiset (swann-w)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-lma-infrastructure-alerting (master)

Fix proposed to branch: master
Review: https://review.openstack.org/390366

Changed in lma-toolchain:
assignee: LMA-Toolchain Fuel Plugins (mos-lma-toolchain) → Swann Croiset (swann-w)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-lma-infrastructure-alerting (master)

Reviewed: https://review.openstack.org/390366
Committed: https://git.openstack.org/cgit/openstack/fuel-plugin-lma-infrastructure-alerting/commit/?id=7c3997b8b9a87d3d267a46d165a135bac3a2f251
Submitter: Jenkins
Branch: master

commit 7c3997b8b9a87d3d267a46d165a135bac3a2f251
Author: Swann Croiset <email address hidden>
Date: Mon Oct 24 16:54:07 2016 +0200

    Configure logrotate for WSGI logs

    Change-Id: I1f0692d85c24687d3a51ee09ce082e3544fd7317
    Closes-Bug: #1635222

Changed in lma-toolchain:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-lma-infrastructure-alerting (stable/1.0)

Fix proposed to branch: stable/1.0
Review: https://review.openstack.org/390580

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-lma-infrastructure-alerting (stable/0.10)

Fix proposed to branch: stable/0.10
Review: https://review.openstack.org/390581

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-lma-infrastructure-alerting (stable/1.0)

Reviewed: https://review.openstack.org/390580
Committed: https://git.openstack.org/cgit/openstack/fuel-plugin-lma-infrastructure-alerting/commit/?id=53ca3fa482c6c54101248a73318ca99fe1e8bdb6
Submitter: Jenkins
Branch: stable/1.0

commit 53ca3fa482c6c54101248a73318ca99fe1e8bdb6
Author: Swann Croiset <email address hidden>
Date: Mon Oct 24 16:54:07 2016 +0200

    Configure logrotate for WSGI logs

    Change-Id: I1f0692d85c24687d3a51ee09ce082e3544fd7317
    Closes-Bug: #1635222
    (cherry picked from commit 7c3997b8b9a87d3d267a46d165a135bac3a2f251)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-lma-infrastructure-alerting (stable/0.10)

Reviewed: https://review.openstack.org/390581
Committed: https://git.openstack.org/cgit/openstack/fuel-plugin-lma-infrastructure-alerting/commit/?id=1e81d7f37624deee7a10135851d54b3cee51756b
Submitter: Jenkins
Branch: stable/0.10

commit 1e81d7f37624deee7a10135851d54b3cee51756b
Author: Swann Croiset <email address hidden>
Date: Mon Oct 24 16:54:07 2016 +0200

    Configure logrotate for WSGI logs

    Change-Id: I1f0692d85c24687d3a51ee09ce082e3544fd7317
    Closes-Bug: #1635222
    (cherry picked from commit 7c3997b8b9a87d3d267a46d165a135bac3a2f251)

Revision history for this message
Vitaly Gusev (vgusev) wrote :

Verified on 0.10.3 version.

no longer affects: lma-toolchain/1.0
Changed in lma-toolchain:
status: Fix Committed → Fix Released
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.