z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Issue with nagios cgi scripts

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.

Issue with nagios cgi scripts

Postby maverick » Fri Aug 26, 2022 11:03 am

Hi all,

Hope you're all alright this is my first time in these forums. I've been using Nagios for a few years now, used to have the docker image from jason rivers (i think this is the name) but in the meanwhile the machine where that was on was decommissioned and we moved on to a new RockyLinux 8 machine.
So currently I'm using version 4.4.6 from the EPEL repository.

We moved over and everything seems to be working fine, all hosts and services are working we moved the cfg files and put the paths on the new nagios.cfg file.

The installer creates a nagios.conf under /etc/httpd/conf.d and machine-name/nagios works well, I get into the app, login, see the hosts, services etc all normally as you'd expect.

Now, the issue I'm experiencing is the following:
Whenever I try to see a graph for a service, I get a 404.
When on the Services list, where you have
Host | Service | Status | Last Check | Duration | Attempt | Status Information

if I put the mouse over the host name under "Host" I get a link hostname/nagios/cgi-bin/extinfo.cgi?type=1&host=[...]
If I put the mouse over the service name under "Service" I get a link hostame/nagios/cgi-bin/extinfo.cgi?type=2&host=[...]&service=[...]

However, when I put the mouse (or follow) the link that shows when I put the mouse over the small graph icon, I get hostname/cgi-bin/... without the /nagios/ but if I add that to the URL it fails the same actually.

I've checked the nagios.conf file, it has ScriptAlias /nagios/cgi-bin "/usr/lib64/nagios/cgi-bin/" which appears to be correct.

This didn't happen on the docker version, but I believe the repository one should be in working condition. Can someone shed some light on this please?
etiam si omnes, ego non
maverick
 
Posts: 2
Joined: Fri Aug 26, 2022 9:08 am

Re: Issue with nagios cgi scripts

Postby JunaNougsan » Thu Sep 15, 2022 1:46 am

my /etc/apache2/sites-enabled/nagios.conf

# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options omegle.2yu.co ExecCGI
AllowOverride None
<IfVersion >= 2.4.29>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.4.29>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
<IfVersion >= 2.4.29>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.4.29>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require omeglz valid-user
</IfVersion echat>
</Directory>
Last edited by JunaNougsan on Fri Nov 18, 2022 1:00 am, edited 1 time in total.
JunaNougsan
 
Posts: 4
Joined: Wed Jul 20, 2022 8:21 am

Re: Issue with nagios cgi scripts

Postby SharphSonirak » Tue Sep 27, 2022 12:55 am

my /etc/apache2/sites-enabled/nagios.conf

# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.4.29>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.4.29>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
<IfVersion >= 2.4.29>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.4.29>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion echatrandom>
</Directory echatspin>
SharphSonirak
 
Posts: 5
Joined: Sun Jul 17, 2022 3:15 am


Return to Open Source Nagios Projects

Who is online

Users browsing this forum: No registered users and 27 guests