Try running this as the xymon user, to find out where it's looking for the file:<div><br></div><div>HOME=~xymon sudo -u xymon xymoncmd strace -f mysql 2>&1 | grep ^stat<br></div><div><br></div><div>On my system:</div>

<div><br></div><div><div>stat("/etc/my.cnf", 0x7fff9cbc1830)     = -1 ENOENT (No such file or directory)</div><div>stat("/usr/lib/xymon/.my.cnf", 0x7fff9cbc1830) = -1 ENOENT (No such file or directory)</div>

<div>stat("/etc/my.cnf", 0x7fff9cbc1830)     = -1 ENOENT (No such file or directory)</div></div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 30 November 2012 00:43, Leon Volfson <span dir="ltr"><<a href="mailto:leon@one.co.il" target="_blank">leon@one.co.il</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mike,<br>thanks for answering,<br>I did run the "whereis xymon-client" and I do know about this directory.<br>

unfortunately, putting the file there doesn't do anything.<br><br><br>Lenny<div><div class="h5"><br><br>
<div class="gmail_quote">On Thu, Nov 29, 2012 at 2:50 PM, Mike Burger <span dir="ltr"><<a href="mailto:Mike.Burger@freedommortgage.com" target="_blank">Mike.Burger@freedommortgage.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Oops…client…if you installed it from RPM, the home dir is likely /usr/share/xymon-client.<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">


<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:xymon-bounces@xymon.com" target="_blank">xymon-bounces@xymon.com</a> [mailto:<a href="mailto:xymon-bounces@xymon.com" target="_blank">xymon-bounces@xymon.com</a>] <b>On Behalf Of </b>Mike Burger<br>


<b>Sent:</b> Thursday, November 29, 2012 7:49 AM<br><b>To:</b> Leon Volfson; <a href="mailto:xymon@xymon.com" target="_blank">xymon@xymon.com</a><br><b>Subject:</b> Re: [Xymon] mysql password file on centos 5, xymon client<u></u><u></u></span></p>


</div></div><div><div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Leon,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If you installed Xymon from RPM on your CentOS 5 system, and you run either “finger xymon” or “grep xymon /etc/passwd”, you’ll likely note that the xymon user’s home directory is /usr/lib/xymon. Try creating/moving the .my.cnf there.<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">


<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:xymon-bounces@xymon.com" target="_blank">xymon-bounces@xymon.com</a> [<a href="mailto:xymon-bounces@xymon.com" target="_blank">mailto:xymon-bounces@xymon.com</a>] <b>On Behalf Of </b>Leon Volfson<br>


<b>Sent:</b> Wednesday, November 28, 2012 7:21 AM<br><b>To:</b> <a href="mailto:xymon@xymon.com" target="_blank">xymon@xymon.com</a><br><b>Subject:</b> [Xymon] mysql password file on centos 5, xymon client<u></u><u></u></span></p>


</div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br><br>I have a question.<br>Recently I've added a script to monitor the mysql replication.<br>I got it off the internet:<br>


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><span style="font-family:"Georgia","serif";color:#222222;background:white">#!/bin/bash<span> </span></span><span style="font-family:"Georgia","serif";color:#222222"><br>


<br><br><span style="background:white">############################################################################################</span><br><span style="background:white">test -e /usr/local/mysql/bin/mysql && PROG=/usr/local/mysql/bin/mysql</span><br>


<span style="background:white">test -e /usr/bin/mysql && PROG=/usr/bin/mysql</span><br><span style="background:white">MAXDRIFT=5</span><br><span style="background:white">############################################################################################</span><br>


<br><span style="background:white">MYSQLCOLOR=""</span><br><span style="background:white">MYSQLLINE=""</span><br><span style="background:white">HOSTIP=127.0.0.1</span><br><span style="background:white">IPADDR=127.0.0.1</span><br>


<span style="background:white">MACHINE=`uname -n`</span><br><br><span style="background:white">MAXSEC=60</span><br><br><span style="background:white">MYSQLUSER=root</span><br><span style="background:white">MYSQLPORT=3306</span><br>


<span style="background:white">LINE=`echo "show slave status \G" | ${PROG} -h ${HOSTIP} -u ${MYSQLUSER} -P ${MYSQLPORT} 2>&1`</span><br><span style="background:white">MASTERPOS=`echo $LINE | grep Read_Master_Log_Pos | awk -F 'Read_Master_Log_Pos: ' '{print $2}' | awk '{print $1}'`</span><br>


<span style="background:white">SLAVEPOS=`echo $LINE | grep -i Exec_Master_Log_Pos | awk -F 'Exec_Master_Log_Pos: ' '{print $2}' | awk '{print $1}'`</span><br><span style="background:white">SLAVEUP=`echo $LINE | grep Running | wc -l`</span><br>


<span style="background:white">SLAVE_SECOND_BEHIND_MASTER=`echo $LINE | grep 'Seconds_Behind_Master:'  | awk -F 'Seconds_Behind_Master: ' '{print $2}'  | awk '{print $1}'`<span> </span></span><br>


<span style="background:white">test $SLAVEUP -eq "1"  &&  DRIFT=$((${MASTERPOS} - ${SLAVEPOS}))</span><br><span style="background:white">echo "${LINE}" | ${GREP} "Running: No" >/dev/null</span><br>


<span style="background:white">if test "$?" -eq "0"</span><br><span style="background:white">then</span><br><span style="background:white">    MYSQLCOLOR="red"</span><br><span style="background:white">    MYSQLLINE="`${DATE}` MYSQL Slave in error</span><br>


<span style="background:white">${LINE}"</span><br><span style="background:white">elif test ${SLAVEUP} -ne "1"</span><br><span style="background:white">then</span><br><span style="background:white">    MYSQLCOLOR="green"</span><br>


<span style="background:white">    MYSQLLINE="`${DATE}` MYSQL Slave is Stopped</span><br><span style="background:white">${LINE}"</span><br><span style="background:white">elif test ${SLAVE_SECOND_BEHIND_MASTER} -ge ${MAXSEC}<span> </span></span><br>


<span style="background:white">then</span><br><span style="background:white">    MYSQLCOLOR="yellow"</span><br><span style="background:white">    MYSQLLINE="`${DATE}` MYSQL Slave is ${DRIFT} statements behind!</span><br>


<span style="background:white">${LINE}"</span><br><span style="background:white">else</span><br><span style="background:white">    MYSQLCOLOR="green"</span><br><span style="background:white">    MYSQLLINE="`${DATE}` MYSQL Slave is ${DRIFT} statements behind!</span><br>


<span style="background:white">${LINE}"</span><br><span style="background:white">fi</span><br><br><span style="background:white">#echo "${BB} ${BBDISP} status ${MACHINE}.mysqlslave ${MYSQLCOLOR} ${MYSQLLINE}"</span><br>


<span style="background:white">${BB} ${BBDISP} "status ${MACHINE}.mysqlslave ${MYSQLCOLOR} ${MYSQLLINE}"</span></span><br><br><span style="font-family:"Georgia","serif";color:#222222;background:white">-----------------</span><span style="font-family:"Georgia","serif";color:#222222"><br>


<br><span style="background:white">To make it working, you need to create the file : ~hobbit/.my.cnf  </span><br><br><span style="background:white">[mysql]</span><br><span style="background:white">password=XXXXXXXX</span><br>


<span style="background:white">[mysqlclient]</span><br><span style="background:white">password= XXXXXXXX</span><br><span style="background:white">[mysqladmin]</span><br><span style="background:white">password= XXXXXXXX</span><br>


<span style="background:white">[mysqlshow]</span><br><span style="background:white">password= XXXXXXXX</span><br><span style="background:white">[mysqldump]</span><br><span style="background:white">password= XXXXXXXX</span><br>


</span>-------------------------------------------<span style="font-family:"Georgia","serif";color:#222222"><br><span style="background:white">chown hobbit: ~hobbit/.my.cnf</span><br><span style="background:white">chmod 600 ~hobbit/.my.cnf</span><br>


<br><br><span style="background:white">Add the section in clientlaunch.cfg</span><br><br><span style="background:white">[mysqlslave]</span><br><span style="background:white">        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg</span><br>


<span style="background:white">        CMD $HOBBITCLIENTHOME/ext/mysqlslave.sh</span><br><span style="background:white">        LOGFILE $HOBBITCLIENTHOME/logs/mysqlslave.log</span><br><span style="background:white">        INTERVAL 5m</span><br>


<br><br><span style="background:white">Restart hobbit-client.<br>------------------------------------------------------------------------------------------------------------------------<br><br><br>as you can see, the author instructs to put the .my.cnf file with all the passwords in the ~hobbit/.my.cnf directory.<br>


While that went fine on the Ubuntu 12.04 server, it doesn't work on the CentOS 5 server.<br>I got the xymon client.rpm from some website and it just doesn't recognize this file no matter where I put it.<br>The version is 4.3.10.<br>


the client is installed in these directories:<br>/etc/xymon-client<br>/usr/libexec/xymon-client<br>/usr/share/xymon-client<br><br>I also noticed that there's no /var/lib/xymon-client directory. <br>The Ubuntu version was installed via apt-get and still has "hobbit" naming. <br>


On CentOS client I renamed all the "hobbit" into "xymon".<br>If I put the pass into the script itself - it works. But I really don't want to do that.<br><br>Any ideas?<br> <br>Thanks,<br>Lenny</span></span><u></u><u></u></p>


</div><pre><u></u> <u></u></pre><pre><u></u> <u></u></pre><pre>CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for<u></u><u></u></pre><pre>the sole use of the intended recipient(s) and may contain confidential<u></u><u></u></pre>


<pre>information. Any unauthorized review, use, disclosure, alteration or<u></u><u></u></pre><pre>distribution is strictly prohibited and may violate state or federal law. If you<u></u><u></u></pre><pre>are not the intended recipient, please contact the sender by reply e-mail,<u></u><u></u></pre>


<pre>delete this email and destroy all copies of the message.<u></u><u></u></pre></div></div></div></div><div><div>

<pre>CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for
the sole use of the intended recipient(s) and may contain confidential
information. Any unauthorized review, use, disclosure, alteration or
distribution is strictly prohibited and may violate state or federal law. If you
are not the intended recipient, please contact the sender by reply e-mail,
delete this email and destroy all copies of the message.</pre>
</div></div></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br></div>