[op5-users] User experience with Merlin first time install
Frater, Greg J
GJFRATER at bechtel.com
Tue Jun 16 01:10:23 CEST 2009
Andreas et. al.,
Based on information from the Nordic Meet, it looks like Merlin and Ninja are going to be default Nagios components in the future, thus I thought I would offer 2 cents worth of documentation and testing of Merlin from a users perspective.
Environment:
Nagios 3.0.6
MySQL 5.0.45
OS: RHEL 5.3 64-bit
Merlin: 0.5
Setup: Single Nagios installation with all components (Nagios core, CGI's, NagVis, PNP, Merlin, etc.) running on the same box, monitoring 577 hosts and 5290 services.
Download source:
I could not get git to work through our proxy, after messing with it for a while I opted for a web download (http://git.op5.org/git/?p=nagios/merlin.git;a=tree;hb=a0b54f3434b95e49a1ccdff1fefba3f1f52514e8) (click on snapshot link). Put the download somewhere on your Nagios server.
Rename downloaded source:
The git gzip file has a really ugly name (merlin-a0b54f3434b95e49a1ccdff1fefba3f1f52514e8.tar.gz) so I renamed it, this will also help me track what software I'm running when I look back at the source file later.
mv merlin-a0b54f3434b95e49a1ccdff1fefba3f1f52514e8.tar.gz merlin-0.5.tar.gz
Untar source:
tar zxvf merlin-0.5.tar.gz
Enter directory created by tar command:
cd merlin
Read README:
Check for required software:
- libdbi-dbd-mysql
- libdbi-devel
- sed (4.0.9 or later)
I had a good version of sed installed but I had to load the libdbi stuff:
yum install libdbi-dbd-mysql
yum install libdbi-devel
Make backup copy of Nagios config (install script for Merlin updates the nagios.cfg):
cp -R /usr/local/nagios/etc /usr/local/nagios/etc.6.15.2009
Create mysql user for the merlin module to use when connecting to the database
mysql -u root -e \
CREATE USER merlin IDENTIFIED BY 'YourPasswordHere';
Compile Merlin:
make
I got some warnings when I ran make, I don't know what they mean. I thought they might be related to my OS being 64 bit, but I don't know, I proceeded with my install Here they are though Note: my install crashed 10 minutes after starting it up, this may be related, I posted the crash info seperately:
CC module.o
module.c: In function âmrm_ipc_writeâ:
module.c:146: warning: cast from pointer to integer of different size
module.c: In function âsetup_host_hash_tablesâ:
module.c:186: warning: cast from pointer to integer of different size
module.c:194: warning: cast to pointer from integer of different size
CC hooks.o
CC control.o
control.c: In function âcreate_host_listsâ:
control.c:39: warning: cast from pointer to integer of different size
control.c: In function âcreate_service_listsâ:
control.c:57: warning: cast from pointer to integer of different size
CC hash.o
CC logging.o
CC config.o
CC ipc.o
CC shared.o
CC io.o
CC protocol.o
CC data.o
LINK merlin.so
CC status.o
CC daemonize.o
CC daemon.o
CC net.o
CC sql.o
CC db_updater.o
LINK merlind
Run Merlin Installation script:
sh install-merlin.sh --dest-dir=/usr/local/nagios/merlin --nagios-cfg=/usr/local/nagios/etc/nagios.cfg --db-type=mysql --db-user=merlin --db-pass=YourPasswordHere --db-name=merlin
I got some errors on install:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Creating database merlin
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Failed to setup database.
Aborting.
The script expects your mysql database to allow the user root at localhost to login without a password. We have a password for that user in our setup. I messed with the install script a bit to get around it but don't know enough to know how to do this right. So instead, I temporarily removed the password for this user on my system and reran the install script. It worked after that.
The Merlin install script modifies your Nagios configuration files (specifically the main one nagios.cfg). You need to check the Nagios config before restarting Nagios:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If the config verifies okay then restart Nagios:
service nagios restart
Running configuration check...done.
Stopping nagios: .done.
Starting nagios:Logging to '/usr/local/nagios/merlin/logs/neb.log'
[1245098202] 6: Merlin Module Loaded
[1245098202] 6: Coredumps in /tmp
done.
It appeared to restart okay, though the last line 'Coredumps in /tmp' made me a bit nervous.
Start Merlin Daemon:
service merlind start
I think that's it, it should be up and running. The Merlin module logs events to /usr/local/nagios/merlin/logs/neb.log, and the daemon logs events to /usr/local/nagios/merlin/logs/daemon.log.
Andreas, please review these steps for accuracy, I'm working only from the README and guessing the rest. Hopefully this is usefull to others.
Regards,
-greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.op5.com/pipermail/op5-users/attachments/20090615/4d851225/attachment-0001.html
More information about the op5-users
mailing list