Page 3 of 4

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Wed Dec 04, 2013 2:40 pm
by sebastiaopburnay
abrist wrote: Any logs worth mentioning from the remote db?
Just failed manual logins I've wrongly done myself

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Wed Dec 04, 2013 2:59 pm
by slansing
So you are able to connect them just fine now?

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Thu Dec 05, 2013 6:04 am
by sebastiaopburnay
No, that GRANT ALL has been done more that a week ago...

Strangely the Nagios Core Server is still unable to write no the remote MySQL DB.

I will ytry to reinstall NDOUtils in the Nagios Core Server... I've sen that solution working for others in some posts at linuxforums

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Thu Dec 05, 2013 11:06 am
by abrist
Alright, keep us informed.

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Mon Dec 09, 2013 12:52 pm
by sebastiaopburnay
Well, I'm a bit frustrated:
- I've uninstalled and reinstalled ndoutils from my nagios core server:
- Removed binaries and config files;
- Deleted log files
- Recompiled source code and placed generated binaries in respective place
- Re-Created configs and set them to appropriate values
- I've deleted and re-created nagios' BD at my MySQL server and granted required privileges

I still have exactly the same issue.....

Anyone has any idea?

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Mon Dec 09, 2013 1:11 pm
by abrist
Hmm. I presume you have checked remote access after the reinstall?

Code: Select all

su nagios
mysql -u nagios -p'<PASSWORD>' -h <IP_ADDRESS_OF_MYSQL_SERVER>

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Mon Dec 09, 2013 1:33 pm
by sebastiaopburnay
abrist wrote:Hmm. I presume you have checked remote access after the reinstall?

Code: Select all

su nagios
mysql -u nagios -p'<PASSWORD>' -h <IP_ADDRESS_OF_MYSQL_SERVER>
Yes, it works fine trough CLI mysql access

Code: Select all

root@NagiosCoreServer:/usr/local/nagios/var# mysql -u nagios  -h 172.20.81.135 -pnagios
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 91
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> 
I've seen in some far-fetcehd forum some french guys commenting on how the TCP sockets are less prone to errors than the UNIX' sockets,

I'll try that aproach tomorrow

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Mon Dec 09, 2013 3:01 pm
by abrist
OK. I will go back over this thread and see if I missed anything. Let us know.

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Fri Dec 13, 2013 1:45 pm
by sebastiaopburnay
Well, I'm getting strange results

1 - I dropped my previous NDOUtils Schema on my DB server
2 - I stopped the NDO2DB service on my Nagios' Core Server
3 - I removed binaries and log/lock/sock files associated with NDOUtils
4 - I installed version 1.5.2 and used the installdb script on my DB server on a newly created schema with adequate previleges
5 - Moved chmod'ed and chown'ed the binaries to /usr/local/nagios/var on my Nagios' Core Server
6 - Stopped Nagios
7 - Started ndo2db
8 - Started Nagios while tracking (tail -f) the nagios.log activity

My nagios.log gives strande output

Code: Select all

[1386959714] Nagios 3.5.0 starting... (PID=22090)
[1386959714] Local time is Fri Dec 13 18:35:14 UTC 2013
[1386959714] LOG VERSION: 2.0
[1386959714] Error: Unable to open file '/usr/local/nagios/bin/ndomod.o' for reading: No such file or directory
[1386959714] Error: Failed to safely copy module '/usr/local/nagios/bin/ndomod.o'. The module will not be loaded
My NDOUtils DataBase is already showing Nagios' reccords of hosts and services on nagios_objects, bun nagios_services and nagios_hosts come as empty sets

Code: Select all

mysql> SELECT * FROM nagios_objects;
+-----------+-------------+---------------+----------------------+-----------------+-----------+
| object_id | instance_id | objecttype_id | name1                | name2           | is_active |
+-----------+-------------+---------------+----------------------+-----------------+-----------+
|         1 |           1 |             1 | ITEN-SRVCARTMSCORE01 | NULL            |         0 |
|         2 |           1 |             9 | 24x7                 | NULL            |         0 |
|         3 |           1 |            12 | check-host-alive     | NULL            |         0 |
|         4 |           1 |             2 | ITEN-SRVCARTMSCORE01 | Current Users   |         0 |
|         5 |           1 |            12 | check_local_users    | NULL            |         0 |
|         6 |           1 |             2 | ITEN-SRVCARTMSCORE01 | Total Processes |         0 |
|         7 |           1 |            12 | check_local_procs    | NULL            |         0 |
|         8 |           1 |             2 | ITEN-SRVCARTMSCORE01 | Current Load    |         0 |
|         9 |           1 |            12 | check_local_load     | NULL            |         0 |
|        10 |           1 |             1 | ITEN-SRVCAREZV01     | NULL            |         0 |
|        11 |           1 |             2 | ITEN-SRVCARTMSCORE01 | PING            |         0 |
|        12 |           1 |            12 | check_ping           | NULL            |         0 |
|        13 |           1 |             2 | ITEN-SRVCARTMSCORE01 | SSH             |         0 |
|        14 |           1 |            12 | check_ssh            | NULL            |         0 |
+-----------+-------------+---------------+----------------------+-----------------+-----------+
14 rows in set (0.00 sec)

mysql> SELECT * FROM nagios_hosts;
Empty set (0.00 sec)

mysql> SELECT * FROM nagios_services;
Empty set (0.00 sec)

Re: NDOUtils - Nagios and MySQL Server on different hosts

Posted: Fri Dec 13, 2013 2:12 pm
by abrist
What is the output of:

Code: Select all

ls -la /usr/local/nagios/bin/
grep "ndomod" /usr/local/nagios/etc/nagios.cfg