Hi Andreas,<br><br>When I carried out my install of Merlin I had to modify the following lines from the install-merlin.sh and object_importer.inc.php. I would suggest it may be better to allow the users to specify the path to the Nagios base directory on the commandline as a parrameter for the install. Failing this, the default installation path for Nagios should be in the files. I know this is what stopped my initial installation.<br>
<br>Heres the parts Im talking about in both files along with line numbers. and what i think they should default to.<br><br>Regards<br><br>Tom<br><br>In install-merlin.sh<br><br>From<br><br> 8 nagios_cfg=/opt/monitor/etc/nagios.cfg<br>
9 dest_dir=/opt/monitor/op5/merlin<br><br>To<br><br> 8 nagios_cfg=/usr/local/nagios/etc/nagios.cfg<br> 9 dest_dir=/usr/local/nagios/merlin<br><br>In object_importer.inc.php<br><br>From<br><br> 318 if (!$object_cache)<br>
319 $object_cache = '/opt/monitor/var/objects.cache';<br><br>To<br><br> 318 if (!$object_cache)<br> 319 $object_cache = '/usr/local/nagios/var/objects.cache';<br>
<br>And<br><br> 500 if (!$object_cache)<br> 501 $object_cache = '/usr/local/nagios/var/objects.cache';<br><br><div class="gmail_quote">2009/6/16 Andreas Ericsson <span dir="ltr"><<a href="mailto:ae@op5.se">ae@op5.se</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Frater, Greg J wrote:<br>
> Andreas et. al.,<br>
><br>
> Based on information from the Nordic Meet, it looks like Merlin and<br>
> Ninja are going to be default Nagios components in the future, thus I<br>
> thought I would offer 2 cents worth of documentation and testing of<br>
> Merlin from a users perspective.<br>
><br>
<br>
</div>Ooh, neat :-)<br>
<div class="im"><br>
> Environment: Nagios 3.0.6 MySQL 5.0.45 OS: RHEL 5.3 64-bit Merlin:<br>
> 0.5 Setup: Single Nagios installation with all components (Nagios<br>
> core, CGI's, NagVis, PNP, Merlin, etc.) running on the same box,<br>
> monitoring 577 hosts and 5290 services.<br>
><br>
> Download source:<br>
><br>
<br>
</div>[ so far so good ]<br>
<div class="im"><br>
><br>
> Create mysql user for the merlin module to use when connecting to the<br>
> database<br>
><br>
> mysql -u root -e \ CREATE USER merlin IDENTIFIED BY<br>
> 'YourPasswordHere';<br>
><br>
> Compile Merlin:<br>
><br>
> make<br>
><br>
> I got some warnings when I ran make, I don't know what they mean. I<br>
> thought they might be related to my OS being 64 bit, but I don't<br>
> know, I proceeded with my install Here they are though Note: my<br>
> install crashed 10 minutes after starting it up, this may be related,<br>
> I posted the crash info seperately:<br>
><br>
<br>
</div>They are related to 64-bitness of your system. It's safe to ignore them<br>
until you're using more than 4 billion poller nodes to a single Merlin<br>
system, so I haven't bothered to correct them.<br>
<div class="im"><br>
><br>
> Run Merlin Installation script:<br>
><br>
> sh install-merlin.sh --dest-dir=/usr/local/nagios/merlin<br>
> --nagios-cfg=/usr/local/nagios/etc/nagios.cfg --db-type=mysql<br>
> --db-user=merlin --db-pass=YourPasswordHere --db-name=merlin<br>
><br>
> I got some errors on install: ERROR 1045 (28000): Access denied for<br>
> user 'root'@'localhost' (using password: NO) ERROR 1045 (28000):<br>
> Access denied for user 'root'@'localhost' (using password: NO)<br>
> Creating database merlin mysqladmin: connect to server at 'localhost'<br>
> failed error: 'Access denied for user 'root'@'localhost' (using<br>
> password: NO)'<br>
><br>
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using<br>
> password: NO) Failed to setup database. Aborting.<br>
><br>
> The script expects your mysql database to allow the user<br>
> root@localhost to login without a password. We have a password for<br>
> that user in our setup. I messed with the install script a bit to<br>
> get around it but don't know enough to know how to do this right. So<br>
> instead, I temporarily removed the password for this user on my<br>
> system and reran the install script. It worked after that.<br>
><br>
<br>
</div>Right. I'll make it prompt the user for the password to use.<br>
<div class="im"><br>
> The Merlin install script modifies your Nagios configuration files<br>
> (specifically the main one nagios.cfg). You need to check the Nagios<br>
> config before restarting Nagios:<br>
><br>
> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg<br>
><br>
> If the config verifies okay then restart Nagios: service nagios<br>
> restart<br>
><br>
> Running configuration check...done. Stopping nagios: .done. Starting<br>
> nagios:Logging to '/usr/local/nagios/merlin/logs/neb.log'<br>
> [1245098202] 6: Merlin Module Loaded [1245098202] 6: Coredumps in<br>
> /tmp done.<br>
><br>
> It appeared to restart okay, though the last line 'Coredumps in /tmp'<br>
> made me a bit nervous.<br>
><br>
<br>
</div>Heh. It's only there to say "current working directory is ... ", but<br>
when I added that line I was specifically looking for where Nagios put<br>
its coredumps, so it turned out that way ;-)<br>
<div class="im"><br>
> Start Merlin Daemon: service merlind start<br>
><br>
> I think that's it, it should be up and running. The Merlin module<br>
> logs events to /usr/local/nagios/merlin/logs/neb.log, and the daemon<br>
> logs events to /usr/local/nagios/merlin/logs/daemon.log.<br>
><br>
> Andreas, please review these steps for accuracy, I'm working only<br>
> from the README and guessing the rest. Hopefully this is usefull to<br>
> others.<br>
><br>
<br>
</div>That's indeed the correct steps. I'll amend the install script so that<br>
root users with a password for mysql can use it with less hassle than<br>
temporarily removing the password though.<br>
<br>
Thanks for the writeup! :-)<br>
<br>
--<br>
Andreas Ericsson <a href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>
OP5 AB <a href="http://www.op5.se" target="_blank">www.op5.se</a><br>
Tel: +46 8-230225 Fax: +46 8-230231<br>
<br>
Considering the successes of the wars on alcohol, poverty, drugs and<br>
terror, I think we should give some serious thought to declaring war<br>
on peace.<br>
_______________________________________________<br>
op5-users mailing list<br>
<a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
<a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
</blockquote></div><br>