Page 2 of 2
Re: Cannot login to postgresql
Posted: Tue Oct 30, 2012 4:16 am
by ytlcomm
Receive below error when opening CCM. I've been receiving 'New Install' page when try to login to my login page. Custom dashboard also has been reset. Is this symptom that all my setting is gone?
1.png
Re: Cannot login to postgresql
Posted: Tue Oct 30, 2012 9:35 am
by mguthrie
Run the following commands on a terminal:
Code: Select all
mysql -pnagiosxi
CREATE USER 'nagiosql'@'localhost' IDENTIFIED BY 'n@gweb';
GRANT USAGE ON * . * TO 'nagiosql'@'localhost' IDENTIFIED BY 'n@gweb' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `nagiosql` . * TO 'nagiosql'@'localhost' WITH GRANT OPTION ;
exit
Based on the amount of corruption your system experienced, it appears that the data in postgres will need to be rebuilt. What that means is that you'll likely need to recreate your XI users, dashboards, and user preferences.
Take a look at the following doc on how to run the backup procedure once you get everything back to how you want it.
http://assets.nagios.com/downloads/nagi ... kuprestore
Re: Cannot login to postgresql
Posted: Tue Oct 30, 2012 11:18 am
by ytlcomm
I've done what you suggest. Receive this error in httpd error log. The file is there though.
Code: Select all
[Wed Oct 31 00:12:49 2012] [error] [client xx.xx.xx.xx] File does not exist: /var/www/html/nagiosql/:, referer: http://yy.yy.yy.yy/nagiosxi/config/nagioscorecfg/
Code: Select all
[root@nagios01 nagiosql]# ll
total 36
drwxr-xr-x. 2 apache apache 4096 Apr 6 2012 admin
-rwxr-xr-x. 1 apache apache 1573 Aug 8 15:34 admin.php
drwxr-xr-x. 3 apache apache 4096 Apr 6 2012 config
-rw-r--r--. 1 apache apache 1150 Aug 8 15:34 favicon.ico
drwxr-xr-x. 4 apache apache 4096 Apr 6 2012 functions
drwxr-xr-x. 2 apache apache 4096 Apr 6 2012 images
-rwxr-xr-x. 1 apache apache 3851 Aug 8 15:34 index.php
drwxr-xr-x. 8 apache apache 4096 Apr 6 2012 install
drwxr-xr-x. 4 apache apache 4096 Apr 6 2012 templates
Please find below windows when try to open CCM. I've covered my IP address. The error was "The requested URL /nagiosql/://xx.xx.xx.xxindex.php was not found on this server." Quite strange error isn't it?
1.png
Re: Cannot login to postgresql
Posted: Tue Oct 30, 2012 1:33 pm
by mguthrie
How feasible would it be to start with a fresh system, and then migrate the configuration to the new install? We can certainly fix this error you're describing, but there are several issues that are appearing that are very unusual even considering the hard disk filled up. Database users didn't appear to exists, now an entire directory structure appears to be missing. These didn't occur from a hard disk filling up, so it would be difficult to tell what else has been modified for the worse at this point.
Re: Cannot login to postgresql
Posted: Tue Oct 30, 2012 7:35 pm
by ytlcomm
I have one new server ready for migration but I want to make sure old Nagios is ok before we migrate all the configurations. I'm worried that it will affect the new system as well? What's the step to migrate? Is it ok to just follow steps outline here
http://assets.nagios.com/downloads/nagi ... ing_XI.pdf
Re: Cannot login to postgresql
Posted: Wed Oct 31, 2012 9:10 am
by mguthrie
You can use that procedure if you had previously made a backup using that script. If not, the other way you can restore your monitoring configuration would be to locate your latest configuration snapshot tarball, from the Admin->Config Snapshots page, and import the object configs into the new system. The document below describes the procedure for that.
http://assets.nagios.com/downloads/nagi ... nto_XI.pdf
To attempt to restore the Core Config Manager on the old system, download the latest tarball, extract, and run the following commands:
Code: Select all
cd /tmp/nagiosxi/subcomponents/nagiosql
./install