nagios db issue
nagios db issue
Hi team,
We are migrating our nagios xi environment to new OS.When we did restore it happened successfully but it is showing db error in GUI.
Attached screenshot for reference.We have production live this weekend.So any help would be appreciated.
Also ndo is showing as locked
/etc/init.d/ndo2db status
ndo2db is not running but subsystem locked
Thanks
Ravi
We are migrating our nagios xi environment to new OS.When we did restore it happened successfully but it is showing db error in GUI.
Attached screenshot for reference.We have production live this weekend.So any help would be appreciated.
Also ndo is showing as locked
/etc/init.d/ndo2db status
ndo2db is not running but subsystem locked
Thanks
Ravi
You do not have the required permissions to view the files attached to this post.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: nagios db issue
That is showing that it is not running, it is not precisely an error.... Click the cog wheel and then click start. Or issue the following from an ssh session:
Code: Select all
service mysqld startRe: nagios db issue
We tried that but it still remains same.
Restarted mysql but still no luck.We suspect it is ndo issue.
i could not see ndo.sock in /usr/local/nagios/var
Restarted mysql but still no luck.We suspect it is ndo issue.
i could not see ndo.sock in /usr/local/nagios/var
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: nagios db issue
What was the exact output you got when you ran:
On the command line? You may have a stuck mysql.sock file, in which case make sure mysqld is stopped (it should be) and run:
Code: Select all
service mysqld startCode: Select all
rm -f /var/lib/mysql/mysql.sockCode: Select all
service mysqld startRe: nagios db issue
I tried steps as suggested by you.
mysql in running state and found mysql.sock
stopped mysqld,could not find mysql.sock after stopping.
Tried removing command.
started mysql
Attached complete output.
mysql in running state and found mysql.sock
stopped mysqld,could not find mysql.sock after stopping.
Tried removing command.
started mysql
Attached complete output.
You do not have the required permissions to view the files attached to this post.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: nagios db issue
Are you running an offloaded database? If so, just as the document says you don't need it running locally. If you are running a local database, what does the red icon on the System Status page say when you mouse over it?
Re: nagios db issue
It is local database and when mouse over it is showing as database backend not running.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: nagios db issue
OK, let's get some basics out of the way then.
Code: Select all
ps -ef | grep bin/nag
ps -ef | grep bin/ndo
ps -ef | grep mysql
service ndo2db status
grep 'output=' /usr/local/nagios/etc/ndomod.cfg
grep 'socket_name' /usr/local/nagios/etc/ndo2db.cfg
grep 'db_' /usr/local/nagios/etc/ndo2db.cfg | grep -v 'user\|pass'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.
Re: nagios db issue
Attached output.
Can we have online session tommorow around 10:00am CST to fix this.
We have production luanch this weekend and we need to fix this ASAP.
Can we have online session tommorow around 10:00am CST to fix this.
We have production luanch this weekend and we need to fix this ASAP.
You do not have the required permissions to view the files attached to this post.
Re: nagios db issue
Lets check your mysqld logs for crashed tables and then restart ndo:
If you have any crashed tables, run the repair script:
Then restart ndo2db:
Code: Select all
tail -50 /var/log/mysqld.log | grep "crashed"Code: Select all
/usr/local/nagiosxi/scripts/repairmysql.sh nagios
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosqlCode: Select all
service ndo2db restart
service ndo2db status
service mysqld statusFormer 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.