[op5-users] Nagios 3.2.1 + Latest Merlin & Ninja GIT on Ubuntu or CentOs

Mirza Dedic mirde at oppy.com
Thu Jul 23 03:54:49 CEST 2009


I followed the guide and it worked flawlessly.

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()



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 !!

-----Original Message-----
From: op5-users-bounces at lists.op5.com [mailto:op5-users-bounces at lists.op5.com] On Behalf Of Mirza Dedic
Sent: July/13/2009 3:44 PM
To: 'Mailinglist for op5's products'
Subject: Re: [op5-users] Nagios 3.2.1 + Latest Merlin & Ninja GIT on Ubuntu or CentOs

Hi Peter,

Thank you for the post; I will be using this tutorial with the latest Nagios/Merlin/Ninja and let the mailing list know of my success.

So far, the Ninja/Merlin combo has fueled me to re-do my Nagios setup to include the two mods, reason for re-doing it is because I want to start the host/service monitoring configuration from scratch.

Thanks.

-----Original Message-----
From: op5-users-bounces at lists.op5.com [mailto:op5-users-bounces at lists.op5.com] On Behalf Of Peter Östlin
Sent: July/13/2009 2:10 AM
To: Mailinglist for op5's products
Subject: Re: [op5-users] Nagios 3.2.1 + Latest Merlin & Ninja GIT on Ubuntu or CentOs

Hi Mirza

A colleague send the following installation instruction for ubuntu to
the list a few month ago:

# Nagios3:
Settings:
        object_cache_file=/var/cache/nagios3/objects.cache


aptitude install nagios-nrpe-plugin nagios-snmp-plugins nsca \
nagios-plugins nagios-plugins-basic nagios-plugins-standard nagios3 \
nagios3-common nagios3-dbg nagios3-doc libdbd-mysql libdbi0 libdbi0-dev \
mysql-server php5-cli php5 php5-mysql

cd /etc/nagios3/
htpasswd -c htpasswd.users nagiosadmin


# Merlin:
mkdir /etc/nagios3/addons
cd /etc/nagios3/addons
git clone git://git.op5.org/nagios/merlin.git merlin-src

cd merlin-src
make
./install-merlin.sh --nagios-cfg=/etc/nagios3/nagios.cfg
--dest-dir=/etc/nagios3/addons/merlin

remove vrml_image from nagios config (bugreport unknown field 'vrml_image' ?)
/etc/init.d/nagios3 restart

./import.php
/etc/init.d/merlind start


# Ninja
cd /etc/nagios3/addons
git clone git://git.op5.org/nagios/ninja.git
mkdir ninja-gui
cd ninja-gui
ln -s /etc/nagios3/addons/ninja/op5build/index.php .
ln -s /etc/nagios3/addons/ninja/application .

cd /etc/nagios3/addons/ninja/op5build
edit ninja.httpd-conf and correct paths
cd /etc/apache2/conf.d
ln -s /etc/nagios3/addons/ninja/op5build/ninja.httpd-conf ninja.conf
/etc/init.d/apache2 restart

edit /etc/nagios3/addons/ninja/op5build/index.php
correct following:
        $ninja_base = '/etc/nagios3/addons/ninja';

edit /etc/nagios3/addons/ninja/application/config/config.php
correct following:
        $config['nagios_base_path'] = '/etc/nagios3';
        $config['nagios_etc_path'] = '/etc/nagios3';
        $config['logos_path'] = '/nagios/images/logos/';
        $config['pnp4nagios_path'] = false;



# To create the ninja db and import user/password from htpasswd:
cd /etc/nagios3/addons/ninja/install_scripts
./ninja_db_init.sh /etc/nagios3/addons/ninja
./auth_import.php /etc/nagios3/addons/ninja


Then point your browser to <server-ip>/ninja


I hope this help.

/Peter Östlin



On Fri, Jul 10, 2009 at 10:58 PM, Mirza Dedic<mirde at oppy.com> wrote:
> Hi list,
>
> I want to use Nagios 3.2.1 with the latest Merlin & Ninja GIT; on either the latest CentOS or Ubuntu build; does anyone have any reference to any installation instructions to get this working?
>
> Currently I am using Nagiox 3.06, with no 3rd party add-ons but would love to use Merlin/Ninja so that my other fellow techs can access the web interface for viewing host information and up/down status.
>
> Can you please help?
>
> I have previously used Centreon, but I think it is too big of a package for my liking, we are only monitoring about 300 services and about 30-40 hosts.
>
> Our environment is a mix of: VMWare ESX, Routers, Switches, PBX, Frames, VPN, back-up connections, ArcServe backups, SQL Server, AIX, RHEL 3 and 4, Exchange 2005, ISA 2003.
>
>
> _______________________________________________
> op5-users mailing list
> op5-users at lists.op5.com
> http://lists.op5.com/mailman/listinfo/op5-users
>



--
op5 AB
Första Långgatan 19
SE-413 27 Göteborg
Mob: +46 733-70 90 31
Fax: +46 31-774 04 32
http://www.op5.com
_______________________________________________
op5-users mailing list
op5-users at lists.op5.com
http://lists.op5.com/mailman/listinfo/op5-users


_______________________________________________
op5-users mailing list
op5-users at lists.op5.com
http://lists.op5.com/mailman/listinfo/op5-users




More information about the op5-users mailing list