LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2013, 04:49 AM   #1
hodgey87
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Rep: Reputation: Disabled
Unable to log in to Nagios web interface


Hi All,

Newbie here I have done some research before posting this .... But to no avail.

I have a machine setup with nagios, when I come to log in to the web interface all i get is the log in screen repeatedly and then the 'authorization failed' message. Just wondered if someone could take a look at my config please:

nagios.conf
Code:
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
<Directory "/usr/lib/nagios/cgi">
#       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 Access"
        AuthType Basic
        AuthUserFile /etc/nagios/htpasswd.users
        Require valid-user
</Directory>

Alias /nagios "/usr/share/nagios"

<Directory "/usr/share/nagios">
#       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 Access"
        AuthType Basic
        AuthUserFile /etc/nagios/htpasswd.users
        Require valid-user
</Directory>
Code:
total 84
-rw-rw-r-- 1  492 nagios 11392 Dec 13 07:36 cgi.cfg
-rw-r--r-- 1 root root   15860 Aug 29  2012 command-plugins.cfg
-rw------- 1 root root      26 Dec 17 02:33 htpasswd.users
-rw-rw-r-- 1  492 nagios 43529 Dec 13 07:14 nagios.cfg
drwxr-xr-x 2  492 nagios  4096 Dec 17 02:17 objects
-rw-rw---- 1  492 nagios  1340 Nov 26  2010 resource.cfg
Also seeing this in the log but not sure how to fix it:

Code:
[Tue Dec 17 02:34:39 2013] [error] [client 10.20.55.73] (13)Permission denied: Could not open password file: /etc/nagios/htpasswd.users
[Tue Dec 17 02:34:39 2013] [error] [client 10.20.55.73] access to /nagios failed, reason: verification of user id '' not configured
Any help would be appreciated.

Thanks

Any help would be appreciated.
 
Old 12-17-2013, 05:12 AM   #2
hodgey87
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
I've changed the permissions on the htpasswd file and now able to log in successfully.

When i click on anything on the lefthand side i receive 'The requested URL /nagios/cgi-bin/status.cgi was not found on this server.'
 
Old 12-17-2013, 05:16 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I suppose 10.20.55.73 is the PC from which you are trying to access Nagios? Without knowing anything about this piece of software, this message
Code:
Permission denied: Could not open password file: /etc/nagios/htpasswd.users
looks like it points to the root of your problem. Look at the permissions of this file and adjust them so that it can be opened. The Nagios description should tell you what they have to be. If you are clueless, try setting permissions to read/write for everybody (this is most likely not the right way but should help with this error), i.e. chmod ugo+rw /etc/nagios/htpasswd.users.

Another possibility, in particular if you are running Red Hat, Centos, Scientific Linux or Oracle Linux, is wrong SELinux configuration. Perhaps a restorecon /etc/nagios/htpasswd.users would help.
 
Old 12-17-2013, 05:20 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hodgey87 View Post
I've changed the permissions on the htpasswd file and now able to log in successfully.

When i click on anything on the lefthand side i receive 'The requested URL /nagios/cgi-bin/status.cgi was not found on this server.'
Your configuration maps /nagios/cgi-bin to /usr/lib/nagios/cgi. The missing file, status.cgi, should be there. Do an ls -l /usr/lib/nagios/cgi to see what's there. If the file is indeed missing, your configuration is wrong. If it is there, maybe it's again a permission problem? Have a look at the same log file that contained the message about the htpasswd permissions.
 
Old 12-17-2013, 05:53 AM   #5
hodgey87
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Turns out it was in 'lib64' so edited that, so last final question:

Quote:
Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.
This returns nothing:
Code:
ps -ef | grep nagios
Code:
/etc/init.d/nagios start
nagios is stopped
Is there a way to force start nagios?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Access Nagios Web Interface Doknik Linux - Software 2 09-03-2012 07:55 PM
Nagios Web Interface does not notify when nagios service is killed! learnerAlways Linux - Newbie 1 11-04-2011 12:23 AM
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 08:55 AM
Nagios Web Interface JPawlak Linux - Software 1 08-22-2003 03:49 PM
Nagios Web Interface sanfran49 Linux - Software 6 07-15-2003 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration