Nagios4 issues with commit on reschedule or other tasks via ui

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
machiel
Posts: 2
Joined: Fri Jan 09, 2026 4:43 am

Nagios4 issues with commit on reschedule or other tasks via ui

Post by machiel »

Good day everyone, I hope this post finds you well.

I am posting here in hope someone else have solved this as I am at wits end after 2 days.

We did a new install on ubuntu 24.04 with nagios4 using the ubuntu repos.

Apache was configured as we needed to enable SSL certificate usage.

Nagios is working fine and checks are running, however when we try to acknowledge a fault, schedule downtime, run a manual recheck of services, the commit fails with message : "Sorry, but you are not authorized to commit the specified command"

From previous experience this usually had to do with permissions however I have verified permissions, users, groups ten times over with no luck in resolving this.

I have followed countless suggestions (some which break the setup completely) and even been trying chatgpt for suggestions.

All permissions seems to be correct and I have no idea where to look further for this so any suggestions would be appreciated.

Please let me know what information or configs you need from me and I will gladly assist.

current nagios user : nagios
Current nagios group : nagios

user is in www-data group and www-data user is in nagios group.


I would really appreciate any help as I am lost at this point.

Kind Regards
machiel
Posts: 2
Joined: Fri Jan 09, 2026 4:43 am

Re: Nagios4 issues with commit on reschedule or other tasks via ui

Post by machiel »

Hi Everyone, just some more information.

I have a nagios3 instance running which is working 100% (The nagios4 instance is supposed to replace the old nagios3 one as the nagios3 server is running on an old OS).

I have compared the configurations , they are both the same.
I have compared permissions of the relevant directories, and they are all the same

root@nagios:/var/log/nagios4# cd /var/lib/nagios4/rw
root@nagios:/var/lib/nagios4/rw# ls -ltrh
total 0
srw-rw---- 1 nagios www-data 0 Jan 13 15:12 nagios.qh
prw-rw---- 1 nagios www-data 0 Jan 13 15:12 nagios.cmd
root@nagios:/var/lib/nagios4/rw# cd ..
root@nagios:/var/lib/nagios4# ls -ltrh
total 144K
drwxr-x--- 3 nagios nagios 4.0K Jan 8 12:35 spool
-rw------- 1 nagios www-data 38K Jan 13 15:12 retention.dat
-rw-r--r-- 1 nagios nagios 55K Jan 13 15:12 objects.cache
drwx--s--- 2 nagios www-data 4.0K Jan 13 15:12 rw
-rw-rw-r-- 1 nagios nagios 38K Jan 13 15:18 status.dat
root@nagios:/var/lib/nagios4#



The only difference I can find between the two servers are the apache config due to the new site now implementing ssl cert which they never did on the old site.

Herewith the apache config. The config has been changed a few times to different versions, however, it seems that this version is the only one that does not break the UI. All other versions we tried gives error 403 forbidden to the nagios pages.

nagios4-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin <admin email redacted>
DocumentRoot /usr/share/nagios4/htdocs
ServerName <server name redacted>

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/<server name redacted>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<server name redacted>/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf


ScriptAlias /nagios4/cgi-bin /usr/lib/cgi-bin/nagios4

<Directory "/usr/lib/cgi-bin/nagios4">
Options +ExecCGI
AllowOverride None
AuthType Basic
AuthName "Nagios Access"
AuthUserFile /etc/nagios4/htpasswd.users
Require valid-user
Require all granted
SetEnv NAGIOS_CGI_CONFIG /etc/nagios4/cgi.cfg
</Directory>

# Where the stylesheets (config files) reside
Alias /nagios4/stylesheets /etc/nagios4/stylesheets

# Where the HTML pages live
Alias /nagios4 /usr/share/nagios4/htdocs

<DirectoryMatch (/usr/share/nagios4/htdocs|/usr/lib/cgi-bin/nagios4|/etc/nagios4/stylesheets)>
Options +FollowSymLinks +ExecCGI
DirectoryIndex index.php index.html
AllowOverride AuthConfig
AuthType Basic
AuthName "Nagios Access"
AuthUserFile /etc/nagios4/htpasswd.users
Require valid-user
</DirectoryMatch>

</VirtualHost>
</IfModule>


the only thing that seems to not be working is when we try to reschedule a check, acknowledge an issue, etc.. and press the commit button, we get the error as explained initially.

Any ideas would really be helpful.
Post Reply