[op5-users] Nagios 3.2.1 + Latest Merlin & Ninja GIT on Ubuntu or CentOs
Per Åsberg
perasb at op5.com
Thu Jul 23 09:44:24 CEST 2009
Mirza Dedic wrote:
> I followed the guide and it worked flawlessly.
Great! :)
> The only issue I had is:
>
> install-merlin.sh
> Had to change the #!/bin/sh to #!/bin/bash for the script to work, it also expects the mysql's root password to be blank; so to get it running I had to put a null password for mysql's root.
>
> Now my issue is..
>
> With the default Nagios setup, there is the localhost host being monitored with a few services, they show up in http://myip/nagos's interface... but not in http://myip/ninja's interface. It shows 0 hosts.
>
> I browsed Merlin's database and I can see the in the "Host" table, there is the one record of localhost.
>
> Tailing merlin's daemon.log:
>
> [1248313905] 7: Inserting check result for service 'PING' on host 'localhost'
> [1248313905] 7: sel_val: 7; ipc_listen_sock: 5; ipc_sock: 7; net_sock: 6
> [1248313905] 7: select() returned 1 (errno = 0: Success)
>
> [1248313905] 6: inbound data available on ipc socket
>
> [1248313905] 7: Successfully read 1 NEBCALLBACK_SERVICE_STATUS_DATA event (621 bytes; 557 bytes body) from socket 7
>
> [1248313905] 7: Updating status for service 'PING' on host 'localhost'
> [1248313905] 7: sel_val: 7; ipc_listen_sock: 5; ipc_sock: 7; net_sock: 6
> [1248313905] 7: select() returned 1 (errno = 0: Success)
>
> [1248313905] 6: inbound data available on ipc socket
>
> [1248313905] 7: Successfully read 1 NEBCALLBACK_PROGRAM_STATUS_DATA event (264 bytes; 200 bytes body) from socket 7
>
> [1248313905] 7: sel_val: 7; ipc_listen_sock: 5; ipc_sock: 7; net_sock: 6
> [1248313907] 7: select() returned 1 (errno = 0: Success)
>
> [1248313907] 6: inbound data available on ipc socket
>
> [1248313907] 7: Successfully read 1 NEBCALLBACK_PROGRAM_STATUS_DATA event (264 bytes; 200 bytes body) from socket 7
>
> [1248313907] 7: sel_val: 7; ipc_listen_sock: 5; ipc_sock: 7; net_sock: 6
>
> We can see good activity without any errors.... Can anyone shed some light as to what could be wrong with my NINJA? :)
> Ninja/Merlin were both cloned from GIT at about 2:00PM today and installed.
> I did notice if I clicked on Ninja's "Host Group Grid" menu, I get error:
>
>
> An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.
>
> /usr/local/nagios/addons/ninja/application/controllers/status.php [1422]:
>
> Invalid argument supplied for foreach()
This is now fixed in git.
> Or if I tried to search for localhost using NINJA's search I got:
>
> A database error occurred while performing the requested procedure. Please review the database error below for more information.
>
> /usr/local/nagios/addons/ninja/system/libraries/drivers/Database/Mysql.php [367]:
>
> There was an SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LIMIT 0, 10' at line 7 - SELECT DISTINCT * FROM `host` WHERE `host_name` LIKE '%localhost%' OR `alias` LIKE '%localhost%' OR `display_name` LIKE '%localhost%' OR `address` LIKE '%localhost%' AND `id` IN () LIMIT 0, 10
>
>
> Please help... thanks !!
It seems to me that you are not authorized to see anything for the user you
are logged in as. Check the db in ninja_user_authorization and see if your
user id has been defined properly.
The import of current users from your Nagios installation should have been
done during install by executing ninja_db_init.sh which also uses
auth_import.php. These scripts will create the necessary ninja specific db
tables and insert default values as well as trying to import your existing
Nagios users and their authorization settings. As you are able to log on, it
seems that the tables are there allright but the authorization data might be
wrong (or missing).
What user are you logging in as? Are that user authorized to see your host in
Nagios?
Regards,
/Per
---------------
Per Åsberg
Senior developer
www.op5.com
More information about the op5-users
mailing list