<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Writing client-side scripts is difficult in my environment because I
have dozens of servers whose hobbit directories are on a shared SAN, so
for any client-side script that needs to only run on a few hosts, I
have to put checks in to make sure that $HOSTNAME is equal to the hosts
I want it to run on.  Also, the builtin linecount function is already
sending the counts for the keywords to the hobbit server, so why run
another process on the client to do the same thing when the server
already has the data.<br>
<br>
Since my last email I have figured out how to access the client data
from the server.  In my case this is:<br>
<br>
<tt>./bb 127.0.0.1 "clientlog prod-web-12
section=linecount:/apps/apache/logs/access_main_log"</tt><br>
Which returns:<br>
<tt>[linecount:/apps/apache/logs/access_main_log]<br>
SessionTimeouts: 1756</tt><br>
<br>
So now I can make a server side ext script which processes the latest
linecounts and sends alerts if they exceed a certain threshold. 
Hopefully Henrik will add a more graceful solution for this in a future
version of Hobbit.<br>
<br>
-Charles<br>
<br>
<br>
<br>
Hubbard, Greg L wrote:
<blockquote
 cite="mid58EF0861D3A1A04182720B3A5231C7C24B62BF@usplm205.amer.corp.eds.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2900.2995" name="GENERATOR">
  <div dir="ltr" align="left"><span class="782502619-11122006"><font
 color="#0000ff" face="Arial" size="2">Use CLIENT side.  Much easier. 
Don't try to leverage what the client is already doing.</font></span></div>
  <br>
  <blockquote style="margin-right: 0px;">
    <div class="OutlookMessageHeader" dir="ltr" align="left"
 lang="en-us">
    <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b>
Charles Jones [<a class="moz-txt-link-freetext" href="mailto:jonescr@cisco.com">mailto:jonescr@cisco.com</a>] <br>
    <b>Sent:</b> Monday, December 11, 2006 1:09 PM<br>
    <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</a><br>
    <b>Subject:</b> [hobbit] Accessing "client data" from a server side
ext script? (Re: [hobbit] Alerting on number of times a keyword appers
in a logfile?)<br>
    </font><br>
    </div>
After searching the Hobbit mailing list, I believe the answer to this
question is "no". All I found is mention of how Henrik first created
the linecount functionality (<a class="moz-txt-link-freetext"
 href="http://www.hswn.dk/hobbiton/2006/06/msg00084.html">http://www.hswn.dk/hobbiton/2006/06/msg00084.html</a>).
    <br>
    <br>
So it looks like I will have to implement this myself.  I'm thinking
this would be easiest to do as a <b>server</b> side ext script, rather
than client, since I am using the linecount option, the hobbit client
is already sending the number of times the keyword appears in the <i>client
data</i>.  Here's a snippet of my client data message for a particular
host:<br>
    <br>
    <pre>[linecount:/apps/apache/logs/access_main_log]
SessionTimeouts: 1683</pre>
    <b>So I guess my question is now, how can I access client data for
a host from a server side ext script?</b><br>
I tried doing a recursive grep for "Session" in the data and tmp
directories, and found nothing?<br>
    <br>
-Charles<br>
    <br>
Charles Jones wrote:
    <blockquote cite="mid457DA62A.1020801@cisco.com" type="cite">Is
this possible without an ext script? <br>
      <br>
-Charles <br>
    </blockquote>
    <br>
  </blockquote>
</blockquote>
<br>
</body>
</html>