Not able to place servers into maintenance mode
Not able to place servers into maintenance mode
Hi,
We are not able to place servers into maintenance mode.
We have observed that, we are not able to login to below URL with nagiosadmin and it is showing Authorization Required.
https://HOSTNAME/nagios/cgi-bin/cmd.cgi
Kindly advice ?
We are not able to place servers into maintenance mode.
We have observed that, we are not able to login to below URL with nagiosadmin and it is showing Authorization Required.
https://HOSTNAME/nagios/cgi-bin/cmd.cgi
Kindly advice ?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Not able to place servers into maintenance mode
So this was working in our remote session earlier.
As for logging in are you using the same password you use to login the the Nagios XI interface?
As for logging in are you using the same password you use to login the the Nagios XI interface?
Re: Not able to place servers into maintenance mode
This login https://HOSTNAME/nagios/cgi-bin/cmd.cgi we didn't try in remote session.
Yes. I am using the same password.
Yes. I am using the same password.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Not able to place servers into maintenance mode
Lets force reset the password (you can use the same one if you like) from Admin -> Users
Re: Not able to place servers into maintenance mode
Tried by resetting the password, but still we are seeing the same issue.
We are not able to login with any of local/AD user.
We are not able to login with any of local/AD user.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Not able to place servers into maintenance mode
Please post the output of the following:
Code: Select all
cat /etc/httpd/conf.d/nagios.conf
Re: Not able to place servers into maintenance mode
Please find below output
[root@XXXXX ~]# cat /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# 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
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
[root@XXXXX ~]#
[root@XXXXX ~]# cat /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# 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
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
[root@XXXXX ~]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Not able to place servers into maintenance mode
Can you show the output of
Also, can you open the file and verify the user you are trying is in there (e.g. nagiosadmin)
Code: Select all
ls -al /usr/local/nagiosxi/etc/htpasswd.usersRe: Not able to place servers into maintenance mode
Please find below output
[root@XXXXX ~]# ls -al /usr/local/nagiosxi/etc/htpasswd.users
-rw-r--r-- 1 nagios apache 3261 Apr 17 15:02 /usr/local/nagiosxi/etc/htpasswd.users
[root@XXXXX ~]#
I see the file is empty
[root@XXXXX ~]# cat /usr/local/nagiosxi/etc/htpasswd.users
...
PROCESSED 0 COMMANDS
[root@XXXXX ~]#
[root@XXXXX ~]# ls -al /usr/local/nagiosxi/etc/htpasswd.users
-rw-r--r-- 1 nagios apache 3261 Apr 17 15:02 /usr/local/nagiosxi/etc/htpasswd.users
[root@XXXXX ~]#
I see the file is empty
[root@XXXXX ~]# cat /usr/local/nagiosxi/etc/htpasswd.users
...
PROCESSED 0 COMMANDS
[root@XXXXX ~]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Not able to place servers into maintenance mode
the the file was overwritten Apr 17 15:02
Which is what the output from one of our cron would be, somehow it got copied into this file...
The only thing I can suggest is again restoring the backup from 4/16/2018 you had again.
Or, you could download that backup tarball and extract the above file and replace the current one from the backup
And this is not empty, the file literally containsbsivavani wrote:[root@XXXXX ~]# cat /usr/local/nagiosxi/etc/htpasswd.users
...
PROCESSED 0 COMMANDS
Code: Select all
...
PROCESSED 0 COMMANDSThe only thing I can suggest is again restoring the backup from 4/16/2018 you had again.
Or, you could download that backup tarball and extract the above file and replace the current one from the backup