Page 3 of 4
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Thu Oct 20, 2011 11:27 am
by nscott
I'm not seeing an alias in your nagios.conf to the actual /nagios. However I am confused as your nagios.conf had nagiosxi items in it, which shouldn't be.
However, try adding the following to your /etc/httpd/conf.d/nagios.conf
Code: Select all
Alias /nagios "/usr/local/nagios/share"
Then restart apache and try to access <your server>/nagios
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Mon Oct 24, 2011 8:47 am
by espint
I added the line to /etc/httpd/conf.d/nagios.conf, and after apache restart I am able to access <my Server>/nagios.
However, I still cannot access the username field for scheduling downtime, or achknowledging alerts. I also am unable to add the line $cfg['use_https']=true; to /usr/local/nagiosxi/html/config.inc.php.
Which other Nagiosxi items shouldn't be in my nagios.conf?
Thanks
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Mon Oct 24, 2011 10:00 am
by mguthrie
Here are some working configs for an XI install running SSL:
nagios.conf
Code: Select all
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>
nagiosxi.conf
Code: Select all
<Directory "/usr/local/nagiosxi/html">
# 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 XI"
# AuthType Basic
# AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
# Require valid-user
</Directory>
Alias /nagiosxi "/usr/local/nagiosxi/html"
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
<Directory "/usr/local/nagiosxi/html">
AllowOverride All
</Directory>
</VirtualHost>
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Mon Oct 24, 2011 3:32 pm
by espint
I can see that I got the two mixed together. I pasted in your configs. Apache would not start because the cert didn't exist. I change the name of the default CA to my certificates name for the key and the cert. Apache restarted. Nagiosxi works http or https so I added the line $cfg['use_https']=true; under $cfg['base_url']=”/nagiosxi”; in config.inc.php. Again I am getting the welcome screen, and when I click access nagiosxi the page goes white.
I also still cannot access the username field to acknowledge or schedule downtime. Perhaps I should remove all ssl configurations to see if that is causing the issue. Scheduling Downtime and Acknowledging an alert is more important to me.
Thanks again for your time.
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Tue Oct 25, 2011 7:45 am
by espint
Good Morning,
I tried to do a backup on nagiosxi this morning and got this error message. I thought it might provide some insite as to the current issue.
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
You have new mail in /var/spool/mail/root
[root@monsrv003 ~]#
Thanks
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Tue Oct 25, 2011 9:16 am
by lmiltchev
espint,
Did you follow our documentations on the Nagios XI backup?
http://assets.nagios.com/downloads/nagi ... ing_XI.pdf
Note: If you changed your MySQL root password to something different than “nagiosxi” (the default), you will need to edit the script and
change the mysqlpass= definition found in the first few lines of the script.
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Tue Oct 25, 2011 1:27 pm
by espint
I did follow the documentation on Nagios XI backup, and backup has always worked in the past. I logged into mysql with the command mysql -uroot -pnagiosxi with no problems. I checked the backup script and the mysqlpass is nagiosxi. It seems like all of the issues are somehow related to username or password. I am considering restoring from a backup prior to these issues, but I wanted to make a backup of the current configuration first. If backup doesn't work I'm afraid to try a restore.
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Tue Oct 25, 2011 1:39 pm
by mguthrie
If there's a crashed table, you'll need to repair the DB first. Run this procedure, then go ahead and try the backup again.
http://assets.nagios.com/downloads/nagi ... irdatabase
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Tue Oct 25, 2011 3:00 pm
by espint
I followed the procedure and repaired the database. I had this error:
- check record delete-chain
myisamchk: warning: Found 12428 deleted space in delete link chain. Should be 12444
myisamchk: error: Found more than the expected 76 deleted rows in delete link chain
myisamchk: error: record delete-link-chain corrupted
myisamchk: error: Quick-recover aborted; Run recovery without switch 'q'
Updating MyISAM file: nagios_systemcommands.MYI
MyISAM-table 'nagios_systemcommands.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
I tried running the command again with the -f option and the backup still fails with the same error.
Re: Can't Acknowledge or Schedule Down Time (Not Authorized)
Posted: Tue Oct 25, 2011 4:24 pm
by mguthrie
Try the following:
Code: Select all
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_*.MYI