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 = &#39;/opt/monitor/var/objects.cache&#39;;<br><br>To<br><br> 318                 if (!$object_cache)<br> 319                         $object_cache = &#39;/usr/local/nagios/var/objects.cache&#39;;<br>
<br>And<br><br> 500                 if (!$object_cache)<br> 501                         $object_cache = &#39;/usr/local/nagios/var/objects.cache&#39;;<br><br><div class="gmail_quote">2009/6/16 Andreas Ericsson <span dir="ltr">&lt;<a href="mailto:ae@op5.se">ae@op5.se</a>&gt;</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>
&gt; Andreas et. al.,<br>
&gt;<br>
&gt; Based on information from the Nordic Meet, it looks like Merlin and<br>
&gt; Ninja are going to be default Nagios components in the future, thus I<br>
&gt; thought I would offer 2 cents worth of documentation and testing of<br>
&gt; Merlin from a users perspective.<br>
&gt;<br>
<br>
</div>Ooh, neat :-)<br>
<div class="im"><br>
&gt; Environment: Nagios 3.0.6 MySQL 5.0.45 OS: RHEL 5.3 64-bit Merlin:<br>
&gt; 0.5 Setup: Single Nagios installation with all components (Nagios<br>
&gt; core, CGI&#39;s, NagVis, PNP, Merlin, etc.) running on the same box,<br>
&gt; monitoring 577 hosts and 5290 services.<br>
&gt;<br>
&gt; Download source:<br>
&gt;<br>
<br>
</div>[ so far so good ]<br>
<div class="im"><br>
&gt;<br>
&gt; Create mysql user for the merlin module to use when connecting to the<br>
&gt; database<br>
&gt;<br>
&gt; mysql -u root -e \ CREATE USER merlin IDENTIFIED BY<br>
&gt; &#39;YourPasswordHere&#39;;<br>
&gt;<br>
&gt; Compile Merlin:<br>
&gt;<br>
&gt; make<br>
&gt;<br>
&gt; I got some warnings when I ran make, I don&#39;t know what they mean.  I<br>
&gt; thought they might be related to my OS being 64 bit, but I don&#39;t<br>
&gt; know, I proceeded with my install  Here they are though Note: my<br>
&gt; install crashed 10 minutes after starting it up, this may be related,<br>
&gt; I posted the crash info seperately:<br>
&gt;<br>
<br>
</div>They are related to 64-bitness of your system. It&#39;s safe to ignore them<br>
until you&#39;re using more than 4 billion poller nodes to a single Merlin<br>
system, so I haven&#39;t bothered to correct them.<br>
<div class="im"><br>
&gt;<br>
&gt; Run Merlin Installation script:<br>
&gt;<br>
&gt; sh install-merlin.sh --dest-dir=/usr/local/nagios/merlin<br>
&gt; --nagios-cfg=/usr/local/nagios/etc/nagios.cfg  --db-type=mysql<br>
&gt; --db-user=merlin --db-pass=YourPasswordHere --db-name=merlin<br>
&gt;<br>
&gt; I got some errors on install: ERROR 1045 (28000): Access denied for<br>
&gt; user &#39;root&#39;@&#39;localhost&#39; (using password: NO) ERROR 1045 (28000):<br>
&gt; Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: NO)<br>
&gt; Creating database merlin mysqladmin: connect to server at &#39;localhost&#39;<br>
&gt; failed error: &#39;Access denied for user &#39;root&#39;@&#39;localhost&#39; (using<br>
&gt; password: NO)&#39;<br>
&gt;<br>
&gt; ERROR 1045 (28000): Access denied for user &#39;root&#39;@&#39;localhost&#39; (using<br>
&gt; password: NO) Failed to setup database. Aborting.<br>
&gt;<br>
&gt; The script expects your mysql database to allow the user<br>
&gt; root@localhost to login without a password.  We have a password for<br>
&gt; that user in our setup.  I messed with the install script a bit to<br>
&gt; get around it but don&#39;t know enough to know how to do this right.  So<br>
&gt; instead, I temporarily removed the password for this user on my<br>
&gt; system and reran the install script.  It worked after that.<br>
&gt;<br>
<br>
</div>Right. I&#39;ll make it prompt the user for the password to use.<br>
<div class="im"><br>
&gt; The Merlin install script modifies your Nagios configuration files<br>
&gt; (specifically the main one nagios.cfg).  You need to check the Nagios<br>
&gt; config before restarting Nagios:<br>
&gt;<br>
&gt; /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg<br>
&gt;<br>
&gt; If the config verifies okay then restart Nagios: service nagios<br>
&gt; restart<br>
&gt;<br>
&gt; Running configuration check...done. Stopping nagios: .done. Starting<br>
&gt; nagios:Logging to &#39;/usr/local/nagios/merlin/logs/neb.log&#39;<br>
&gt; [1245098202] 6: Merlin Module Loaded [1245098202] 6: Coredumps in<br>
&gt; /tmp done.<br>
&gt;<br>
&gt; It appeared to restart okay, though the last line &#39;Coredumps in /tmp&#39;<br>
&gt; made me a bit nervous.<br>
&gt;<br>
<br>
</div>Heh. It&#39;s only there to say &quot;current working directory is ... &quot;, 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>
&gt; Start Merlin Daemon: service merlind start<br>
&gt;<br>
&gt; I think that&#39;s it, it should be up and running.  The Merlin module<br>
&gt; logs events to /usr/local/nagios/merlin/logs/neb.log, and the daemon<br>
&gt; logs events to /usr/local/nagios/merlin/logs/daemon.log.<br>
&gt;<br>
&gt; Andreas, please review these steps for accuracy, I&#39;m working only<br>
&gt; from the README and guessing the rest.  Hopefully this is usefull to<br>
&gt; others.<br>
&gt;<br>
<br>
</div>That&#39;s indeed the correct steps. I&#39;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>