<div dir="ltr">On 28 August 2013 06:51, KING, KEVIN <span dir="ltr"><<a href="mailto:KK1051@att.com" target="_blank">KK1051@att.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I did get log fetch to work with your script, sorta. I added the file in the script to collect and it collects it and posts it to the message column</span></p>

</div></div></blockquote><div><br></div><div>Good.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> but of
 course it is not processed for alerts, Just collected.</span></p></div></div></blockquote><div><br></div><div>So it just needs an entry in analysis.cfg?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><div><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="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt">I added this to the xymonclient-linux.sh that I use for the hosts I use your script for. Hmmm If I get this other log fetch working I might be able to smash
 your script with this and make that work.  Ok better stick to one thing at a time.</span></p></div></div></blockquote><div><br></div><div>Always.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt">echo "[msgs:/var/log/messages]"</span><br></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">tail -c 10240 /var/log/messages | egrep -v MARK<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">echo "[msgs:/var/TKLC/log/syscheck/fail_log]"<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">tail -c 10240 /var/TKLC/log/syscheck/fail_log</span></p></div></div></blockquote><div> </div><div>Well this works, in as much as you'll get message lines in your client data, but you'll end up with repeated and skipped messages.  So if you alert on the text "WARNING" and it appears in the log, sure you'll get an alert. But if the log gets less than 10k of data appended throughout the day, Xymon will repeat the alert all day.  Or if, between one sample and the next, the "WARNING" message and then 10k of log data is added, the second sample won't see the matching message because it always gets the last 10k.</div>

<div><br></div><div>These issues are dealt with by the logfetch utility.  It keeps state so that it (generally) gives out each log message line exactly once - none is missed and none is repeated.</div><div><br></div><div>

You can handle this yourself, by keeping state of the size of the log file you're watching, and always tailing what's after that size.  You also have to detect and handle log rotation.  Doable, but lots of trouble.  If you can get logfetch to work, then why not use it.  Especially as it can give you your (its) config file from client-local.cfg to boot.</div>

<div><br></div><div>J</div><div><br></div></div></div></div>