Bug 48746 - Nagios event log: Error: Could not open log file '/var/log/nagios/nagios.log' for reading!
Nagios event log: Error: Could not open log file '/var/log/nagios/nagios.log'...
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 4.3
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-25 11:00 CET by Valentin Heidelberger
Modified: 2021-05-14 16:34 CEST (History)
7 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Heidelberger univentionstaff 2019-02-25 11:00:23 CET
Nagios "Event Log" page (in the left menu in the "Reports" category) seems to be broken by default in the Nagios app.
It just shows an error after the installation of the app:

Error: Could not open log file '/var/log/nagios/nagios.log' for reading!


This seems to be a problem with permissions.
-rw-r----- 1 nagios nagios 19768 Feb 22 22:32 /var/log/nagios/nagios.log

I've managed to get it working by adding the user "www-data" to the group "nagios" and restarting apache2. Adding the "nagios" user to the "www-data" group and executing "chown nagios:www-data" on the file works as well but I'm not entirely certain which is better from a security perspective.
Comment 1 Dirk Ahrnke univentionstaff 2019-10-01 17:26:27 CEST
seen this while upgrading a customer environment to 4.4-1
Comment 2 Dirk Schnick univentionstaff 2020-01-29 11:42:43 CET
In my test-enviroment same problem.

Solved also by adding the group nagios to the user www-data
Comment 3 tom.mailbox 2020-06-23 08:23:08 CEST
The same behavior for me with UCS 4.3 and also after a fresh installation of UCS 4.4.
Nagios module was added after the initial installation, not selected during the installation.
Comment 4 Ingo Steuwer univentionstaff 2021-05-14 13:56:12 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.