Re: NDOUtils - Nagios and MySQL Server on different hosts
Posted: Tue Dec 03, 2013 12:58 pm
My apologies. I need the ndo2db.cfg file instead.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
alias -pCode: 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
Code: Select all
mysql -u nagios -p'<PASSWORD>' -h <IP_ADDRESS_OF_MYSQL_SERVER> 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>
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>
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=nagiosYes, 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?
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)
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)
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?