Bug 43256 - Error: Could not stat() command file /var/lib/nagios/rw/nagios.cmd
Error: Could not stat() command file /var/lib/nagios/rw/nagios.cmd
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 4.1
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
:
: 43416 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-28 15:28 CET by Jens Thorp-Hansen
Modified: 2022-06-27 17:49 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2016122821000277
Bug group (optional): Workaround is available
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Thorp-Hansen univentionstaff 2016-12-28 15:28:49 CET
Environment: 4.1-4
Role: NOT-master

when installing the nagios monitoring not on a UCS master it is not possible to use external commands via the nagios web-frontend. The WebGUI throws an error:

"Error: Could not stat() command file ‚/var/lib/nagios/rw/nagios.cmd‘!"

customer used a workaround from here: http://wiki.t3easy.de/systemintegration/nagios/nagios-external-commands-ubuntu/

possible relevant snippet: "...you need to allow the web server write access to the nagios command pipe."

- activate external command checks in the nagios configuration. this
  can be done by setting check_external_commands=1 in the file
  /etc/nagios3/nagios.cfg.

- perform the following commands to change directory permissions and
  to make the changes permanent:

/etc/init.d/nagios3 stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start
Comment 1 Erik Damrose univentionstaff 2017-01-25 11:15:57 CET
*** Bug 43416 has been marked as a duplicate of this bug. ***
Comment 2 Jens Thorp-Hansen univentionstaff 2017-01-27 11:39:31 CET
happened also on a master as seen here: https://forum.univention.de/viewtopic.php?f=48&t=6348&p=24453
Comment 3 Michael Salm 2017-06-21 13:22:10 CEST
This also happens on UCS 3.2-8 and 3.3-1 (paedML Linux 6.0) and UCS 4.1-4 (paedML Linux 7.0).

The following commands helped:
/etc/init.d/nagios3 stop
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start
Comment 4 Stefan Gohmann univentionstaff 2019-01-03 07:21:40 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

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