 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

8th July 2009, 08:46 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 186

|
|
|
nagios 401, will not accept username password. [SOLVED]
I'm getting a 401 error from nagios when I browse to http://localhost/nagios.
"A username and password are being requested by http://localhost. The site says: "nagios""
I used the following command to set the password
# htpasswd -cs /etc/nagios/htpasswd.users nagiosadmin
Have also tried without the htpasswd file and with only the -c option
I installed from the rpm in the repo
office nagios]# service httpd status
httpd (pid 5978) is running...
office nagios]# service nagios status
nagios (pid 6016) is running...
Any thoughts? I've read through the Max Hendrick guide at Cent and googled, seems a few people have run into this before.
|

8th July 2009, 10:12 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 186

|
|
|
Solved.
I used the following command to set the password
# htpasswd -cs /etc/nagios/htpasswd.users nagiosadmin
Have also tried without the htpasswd file and with only the -c option
Fixed, instructions say use htpasswd.users, however in /etc/httpd/conf.d it looks for /etc/nagios/passwd.
Documentation flaw.
|

8th July 2009, 10:25 PM
|
 |
Retired Community Manager -- Banned from Texas by popular demand.
|
|
Join Date: Sep 2007
Location: NYC
Posts: 8,142

|
|
Hrrm, I see my notes, which were based on Max's tutorial, say /etc/nagios/passwd. You mean the nagios docs themselves are wrong? I've always found them pretty horrible, actually, read them for a few days and got nowhere till I found Max's stuff.
Others of course, will tell you they're great, but they probably all have CS degrees.
__________________
--
http://home.roadrunner.com/~computertaijutsu
Do NOT PM forum members with requests for technical support. Ask your questions on the forum.
"I don't know why there is the constant push to break any semblance of compatibility" --anon
|

8th July 2009, 10:29 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 186

|
|
Quote:
Originally Posted by scottro
Hrrm, I see my notes, which were based on Max's tutorial, say /etc/nagios/passwd. You mean the nagios docs themselves are wrong? I've always found them pretty horrible, actually, read them for a few days and got nowhere till I found Max's stuff.
Others of course, will tell you they're great, but they probably all have CS degrees. 
|
Quote:
http://www.maxsworld.org/index.php/how-tos/nagios
Unless you want other options such as SSL configurations or allowing access to the CGI from only certain hosts, then the default nagios.conf file will suit your needs. You can find the file in /etc/httpd/conf.d/ Here’s what it looks like:
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>
[me@mymachine ~] htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
New password: type_your_password
Re-type new password: re-type_your_password
Adding password for user nagiosadmin
|
Respectfully, both are wrong, per my install on FC11 based on RPM, I can not comment on any other scenarios accurately.
|

8th July 2009, 10:50 PM
|
 |
Retired Community Manager -- Banned from Texas by popular demand.
|
|
Join Date: Sep 2007
Location: NYC
Posts: 8,142

|
|
My bad, I misread my notes. I have users, which works on a CentOS server. Fedora is using nagios 3, CentOS is using nagios 2.
RedHat's policy is to not update programs that have configuration file changes, for the very good reason that if you update, and suddenly nagios (or whatever the program is) starts throwing errors, you're probably in trouble, since the chances are that's a system in production.
The sad thing is that I would wager that nine times out of ten, the changes in configuration files are simply lazy programming. Getmail is a special case, it was completely redone, but most of the time, it's some stupid little change. For example, one wonders what is the difference between the two names. Although the new name actually probably makes more sense, so, I dunno. Their Fedora docs are obviously not up to date.  (Though their RH ones apparently are.)
__________________
--
http://home.roadrunner.com/~computertaijutsu
Do NOT PM forum members with requests for technical support. Ask your questions on the forum.
"I don't know why there is the constant push to break any semblance of compatibility" --anon
|

8th July 2009, 10:58 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 186

|
|
Quote:
Originally Posted by scottro
My bad, I misread my notes. I have users, which works on a CentOS server. Fedora is using nagios 3, CentOS is using nagios 2.
RedHat's policy is to not update programs that have configuration file changes, for the very good reason that if you update, and suddenly nagios (or whatever the program is) starts throwing errors, you're probably in trouble, since the chances are that's a system in production.
The sad thing is that I would wager that nine times out of ten, the changes in configuration files are simply lazy programming. Getmail is a special case, it was completely redone, but most of the time, it's some stupid little change. For example, one wonders what is the difference between the two names. Although the new name actually probably makes more sense, so, I dunno. Their Fedora docs are obviously not up to date.  (Though their RH ones apparently are.)
|
Two questions, can you add a solved to my title in case someone else searches for a similar issue. And which docs would you recommend for adding hosts where communication is via ssh?
|

9th July 2009, 12:47 AM
|
 |
Retired Community Manager -- Banned from Texas by popular demand.
|
|
Join Date: Sep 2007
Location: NYC
Posts: 8,142

|
|
|
Sure, I'll mark it solved.
Really, I've done everything using Max's various tutorials, so not sure how much it will have changed for F11/nagios 3.
I always added hosts by editing hosts.cfg, which can easily be done through ssh, so I suspect I'm misunderstanding the question.
__________________
--
http://home.roadrunner.com/~computertaijutsu
Do NOT PM forum members with requests for technical support. Ask your questions on the forum.
"I don't know why there is the constant push to break any semblance of compatibility" --anon
|

9th July 2009, 01:42 AM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 186

|
|
Quote:
Originally Posted by scottro
Sure, I'll mark it solved.
Really, I've done everything using Max's various tutorials, so not sure how much it will have changed for F11/nagios 3.
I always added hosts by editing hosts.cfg, which can easily be done through ssh, so I suspect I'm misunderstanding the question.
|
Sorry, I mean that hosts needed to communicate over ssh. It's my understanding that they can do it via SSH or NRPE.
--paranoid penguin
--edit, I may be misunderstanding the documentation. All the computers I need to monitor I can execute almost anything I want on. I just want the checks to occur over ssh
Last edited by michael12345; 9th July 2009 at 02:04 AM.
|

9th July 2009, 02:47 AM
|
 |
Retired Community Manager -- Banned from Texas by popular demand.
|
|
Join Date: Sep 2007
Location: NYC
Posts: 8,142

|
|
|
Hrrm.. I use a variety of protocols, depending upon what I'm monitoriing--on some it's just a ping, on a mail server it's smtp, on a web server http.
I don't think I use nrpe, I'll have to check tomorrow.
__________________
--
http://home.roadrunner.com/~computertaijutsu
Do NOT PM forum members with requests for technical support. Ask your questions on the forum.
"I don't know why there is the constant push to break any semblance of compatibility" --anon
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 02:13 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|