DB Connect Error [nagiosxi]: Database connection failed
-
AcademyNag
- Posts: 19
- Joined: Wed Jun 12, 2013 2:26 pm
- Location: Houston, Texas
- Contact:
DB Connect Error [nagiosxi]: Database connection failed
DB Connect Error [nagiosxi]: Database connection failed
is the message I get when I go to the full URL with 'nagiosxi', if I just go to the server without that I get a web interface that has a link- "Welcome
Click the link below to get started using Nagios XI." and that link takes me to the same blank page with the above error.
All was working fine, only changes made that I know of were that I put in a RSA key for the nagios user to be able to access other servers as needed.
Please help, my boss is working hard to get the Licences but its taking time.
is the message I get when I go to the full URL with 'nagiosxi', if I just go to the server without that I get a web interface that has a link- "Welcome
Click the link below to get started using Nagios XI." and that link takes me to the same blank page with the above error.
All was working fine, only changes made that I know of were that I put in a RSA key for the nagios user to be able to access other servers as needed.
Please help, my boss is working hard to get the Licences but its taking time.
"For those that understand Linux, no explanation is necessary, for those that do not understand Linux, no explanation is sufficient. For those that think they know everything- any answer is a waste of time."
-
AcademyNag
- Posts: 19
- Joined: Wed Jun 12, 2013 2:26 pm
- Location: Houston, Texas
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
Found part of the problem,,, HDD full because of the following:
(from -"find / -type f -size +100M | xargs du -hs")
5.6G /store/backups/mysql/daily/nagios/nagios_2013-07-08_07h00m.Monday.sql
3.4G /var/lib/mysql/nagios/nagios_logentries.MYD
252M /var/lib/mysql/nagios/nagios_contactnotificationmethods.MYI
361M /var/lib/mysql/nagios/nagios_contactnotifications.MYI
313M /var/lib/mysql/nagios/nagios_contactnotificationmethods.MYD
150M /var/lib/mysql/nagios/nagios_logentries.MYI
278M /var/lib/mysql/nagios/nagios_contactnotifications.MYD
and others over 500M EACH that I've already deleted... Is there a reason this utility can eat up 20+ GB in a day?
(from -"find / -type f -size +100M | xargs du -hs")
5.6G /store/backups/mysql/daily/nagios/nagios_2013-07-08_07h00m.Monday.sql
3.4G /var/lib/mysql/nagios/nagios_logentries.MYD
252M /var/lib/mysql/nagios/nagios_contactnotificationmethods.MYI
361M /var/lib/mysql/nagios/nagios_contactnotifications.MYI
313M /var/lib/mysql/nagios/nagios_contactnotificationmethods.MYD
150M /var/lib/mysql/nagios/nagios_logentries.MYI
278M /var/lib/mysql/nagios/nagios_contactnotifications.MYD
and others over 500M EACH that I've already deleted... Is there a reason this utility can eat up 20+ GB in a day?
"For those that understand Linux, no explanation is necessary, for those that do not understand Linux, no explanation is sufficient. For those that think they know everything- any answer is a waste of time."
Re: DB Connect Error [nagiosxi]: Database connection failed
That log entries table is GIGANTIC. I bet the event log in XI takes forever and a day to open up . . . You may have to wipe that table.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: DB Connect Error [nagiosxi]: Database connection failed
How large is your environment? Hosts/services/checks per hour?
Please share the output of:
Please share the output of:
Code: Select all
df -h
df -i-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: DB Connect Error [nagiosxi]: Database connection failed
If slansing's commands come back filled up, you might take a look at our resize vmware disks documentation.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
AcademyNag
- Posts: 19
- Joined: Wed Jun 12, 2013 2:26 pm
- Location: Houston, Texas
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
there are 547 Hosts, "547 total records"
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_plapnag03e-lv_root
26G 11G 13G 46% /
# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg_plapnag03e-lv_root
1676080 91495 1584585 6% /
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_plapnag03e-lv_root
26G 11G 13G 46% /
# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg_plapnag03e-lv_root
1676080 91495 1584585 6% /
"For those that understand Linux, no explanation is necessary, for those that do not understand Linux, no explanation is sufficient. For those that think they know everything- any answer is a waste of time."
-
AcademyNag
- Posts: 19
- Joined: Wed Jun 12, 2013 2:26 pm
- Location: Houston, Texas
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
Oh, and 2100 Services- (2100 total records)
And, there was a 3GB log in /usr/local/nagios/var/archives/ , and others there were between 300-600MB --- just fyi
And, there was a 3GB log in /usr/local/nagios/var/archives/ , and others there were between 300-600MB --- just fyi
"For those that understand Linux, no explanation is necessary, for those that do not understand Linux, no explanation is sufficient. For those that think they know everything- any answer is a waste of time."
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: DB Connect Error [nagiosxi]: Database connection failed
Let's trucate those large databases, repair them, and restart some services. Just so you know, the documentation this is coming from is here: http://assets.nagios.com/downloads/nagi ... tabase.pdf
Also I just read "and others over 500M EACH that I've already deleted" You are not deleting from the /var/lib/mysql/nagios/ directory correct?
Code: Select all
cd /usr/local/nagiosxi/scripts/
service mysqld stop
mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_contactnotificationmethods'
mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_contactnotifications'
mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_logentries'
./repairmysql.sh nagios
./repairmysql.sh nagiosql
service mysqld start
service postgresql restart
service nagios restart
service ndo2db restart
service httpd restartNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
AcademyNag
- Posts: 19
- Joined: Wed Jun 12, 2013 2:26 pm
- Location: Houston, Texas
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
as root? or as nagios?

No- from /usr/local/nagios/var/archives/Also I just read "and others over 500M EACH that I've already deleted" You are not deleting from the /var/lib/mysql/nagios/ directory correct?
"For those that understand Linux, no explanation is necessary, for those that do not understand Linux, no explanation is sufficient. For those that think they know everything- any answer is a waste of time."
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact: