<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">What is the home directory for the user running xymon in /etc/passwd. Nothing else matters.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Paul Root    - Senior Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Managed Services Systems - CenturyLink<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<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""> xymon-bounces@xymon.com [mailto:xymon-bounces@xymon.com]
<b>On Behalf Of </b>Leon Volfson<br>
<b>Sent:</b> Thursday, November 29, 2012 7:43 AM<br>
<b>To:</b> xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] mysql password file on centos 5, xymon client<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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<o:p></o:p></p>
<div>
<p class="MsoNormal">On Thu, Nov 29, 2012 at 2:50 PM, Mike Burger <<a href="mailto:Mike.Burger@freedommortgage.com" target="_blank">Mike.Burger@freedommortgage.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Leon,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;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 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><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><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><o:p></o:p></p>
</div>
<pre> <o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for<o:p></o:p></pre>
<pre>the sole use of the intended recipient(s) and may contain confidential<o:p></o:p></pre>
<pre>information. Any unauthorized review, use, disclosure, alteration or<o:p></o:p></pre>
<pre>distribution is strictly prohibited and may violate state or federal law. If you<o:p></o:p></pre>
<pre>are not the intended recipient, please contact the sender by reply e-mail,<o:p></o:p></pre>
<pre>delete this email and destroy all copies of the message.<o:p></o:p></pre>
</div>
</div>
</div>
</div>
<div>
<div>
<pre>CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for<o:p></o:p></pre>
<pre>the sole use of the intended recipient(s) and may contain confidential<o:p></o:p></pre>
<pre>information. Any unauthorized review, use, disclosure, alteration or<o:p></o:p></pre>
<pre>distribution is strictly prohibited and may violate state or federal law. If you<o:p></o:p></pre>
<pre>are not the intended recipient, please contact the sender by reply e-mail,<o:p></o:p></pre>
<pre>delete this email and destroy all copies of the message.<o:p></o:p></pre>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>