[SOLVED] NDOUtils Nagios and MySQL Server on different hosts
Re: NDOUtils - Nagios and MySQL Server on different hosts
My apologies. I need the ndo2db.cfg file instead.
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.
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: NDOUtils - Nagios and MySQL Server on different hosts
Both files have been extracted in 'binary mode' so that they will show if something is wrong
- Attachments
-
ndo2db.cfg- (4.42 KiB) Downloaded 501 times
-
ndomod.cfg- (5.01 KiB) Downloaded 421 times
Re: NDOUtils - Nagios and MySQL Server on different hosts
You know, sockets actually have a trailing equals sign, it is just normally hidden, but can be listed with "ls -F". Maybe your "ll" alias includes "-F". What is the output of:
Code: Select all
alias -pFormer 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.
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: NDOUtils - Nagios and MySQL Server on different hosts
You're right,
I thought that ll was just an 'ls -l' but is seems to be 'ls -alF':
When I ran 'ls -l' I got rid of the '='
I thought that ll was just an 'ls -l' but is seems to be 'ls -alF':
Code: Select all
root@myServer:~# alias -p
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'Code: Select all
root@myServer:/usr/local/nagios/var# ls -l
total 1544
drwxrwxr-x 2 nagios nagios 4096 Dec 4 00:00 archives
-rw-r--r-- 1 nagios nagios 6 Dec 4 15:42 nagios.lock
-rw-rw-r-- 1 nagios nagios 1507298 Dec 4 18:22 nagios.log
srwxr-xr-x 1 nagios nagios 0 Dec 3 17:16 ndo.sock
-rw-rw-rw- 1 nagios nagios 0 Nov 29 17:07 ndo2db.debug
-rw-r--r-- 1 nagios nagios 4 Dec 3 17:16 ndo2db.lock
-rw-r--r-- 1 nagios nagios 13840 Dec 4 15:42 objects.cache
-rw------- 1 nagios nagios 14877 Dec 4 17:42 retention.dat
drwxrwsr-x 2 nagios nagcmd 4096 Dec 4 15:42 rw
drwxr-xr-x 3 root root 4096 Jul 4 19:18 spool
-rw-rw-r-- 1 nagios nagios 15473 Dec 4 18:22 status.dat
Re: NDOUtils - Nagios and MySQL Server on different hosts
Well, dang. There is most likely nothing wrong with the socket. Lets check to see if you can log into the remote database. From the nagios core server, run:
Make sure to replace <PASSWORD> and <IP_ADDRESS_OF_MYSQL_SERVER>.
Code: Select all
mysql -u nagios -p'<PASSWORD>' -h <IP_ADDRESS_OF_MYSQL_SERVER> 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.
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: NDOUtils - Nagios and MySQL Server on different hosts
Yes, at first, I thought that was my problem,abrist wrote:Well, dang. There is most likely nothing wrong with the socket. Lets check to see if you can log into the remote database. From the nagios core server, run:Make sure to replace <PASSWORD> and <IP_ADDRESS_OF_MYSQL_SERVER>.Code: Select all
mysql -u nagios -p'<PASSWORD>' -h <IP_ADDRESS_OF_MYSQL_SERVER>
But I can actually use CLI to connect to MySQL server from Nagos Core Server
Code: Select all
root@myServer:/usr/local/nagios/etc# mysql -u nagios -h 172.20.81.135 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 194
Server version: 5.5.31-0ubuntu0.12.04.2-log (Ubuntu)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use ndoutils
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SELECT * FROM nagios_hosts;
Empty set (0.00 sec)
mysql>
Re: NDOUtils - Nagios and MySQL Server on different hosts
From your ndo2db.cfg:
Is the pass actually 'nagios'? Does the nagios db user have the correct privileges?
Code: Select all
# DATABASE USERNAME/PASSWORD
# This is the username/password that will be used to authenticate to the DB.
# The user needs at least SELECT, INSERT, UPDATE, and DELETE privileges on
# the database.
db_user=nagios
db_pass=nagiosFormer 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.
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: NDOUtils - Nagios and MySQL Server on different hosts
Yes, I kept it like that unill I could figure the communications properly,abrist wrote:From your ndo2db.cfg:
Is the pass actually 'nagios'? Does the nagios db user have the correct privileges?
About the privilleges, I've done a:
Code: Select all
GRANT ALL ON ndoutils.* TO 'nagios'@'172.20.82.134' IDENTIFIED BY 'nagios';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: NDOUtils - Nagios and MySQL Server on different hosts
I'm now wondering if I should try to reinstall NDOUtils on my Nagios Core server.sebastiaopburnay wrote:Yes, I kept it like that unill I could figure the communications properly,abrist wrote:From your ndo2db.cfg:
Is the pass actually 'nagios'? Does the nagios db user have the correct privileges?
About the privilleges, I've done a:So, I guess that the user even has more privileges than it needsCode: Select all
GRANT ALL ON ndoutils.* TO 'nagios'@'172.20.82.134' IDENTIFIED BY 'nagios'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)
I don't need anything else than MySQL server, NDOUtils database and correct privileges on my MySQL Server, do I?
Re: NDOUtils - Nagios and MySQL Server on different hosts
Nope, that is all you need on the remote system.sebastiaopburnay wrote:I don't need anything else than MySQL server, NDOUtils database and correct privileges on my MySQL Server, do I?
Any logs worth mentioning from the remote db?
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.