On 11/6/07, <b class="gmail_sendername">Andy France</b> <<a href="mailto:Andy@zespri.com">Andy@zespri.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2">Hi Martin,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2">I do a similar thing with our Citrix servers, where I have
a "Farm" host to hold a summary of the total number of connections across all
servers.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2">I do this by running a script from hobbitlaunch on the
server, and summing up the results of the individual Citrix servers using
hobbitdboard. After parsing the results, I send a single message for the
"Farm" host in the same format as the individual host messages and Hobbit
magically makes the graph for me :-)</font></span></div></div></blockquote><div><br>If you want to reuse the data in the existing RRD files, assuming a symlink to them works as I previously described, you can probably just create a script similar to below and have it output a dummy value. The main purpose of the script would then just be to associate a column with the dummy host, that you can then build a graph for using existing RRD files.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2">
It's not too flash, but here are all the bits and pieces
which make it work. I hope they may help you in making a similar script
for a postfix farm.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2"><strong>BB-HOSTS ENTRIES :</strong></font></span></div>
<blockquote dir="ltr" style="margin-right: 0px;">
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"><a href="http://127.0.0.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1</a> citrix-farm
# COMMENT:"Farm Totals" testip noconn noinfo notrends</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"><a href="http://192.168.1.101" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.101</a>
citrix-01 # <br><a href="http://192.168.1.102" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.102</a>
citrix-02 # </font></span></div></blockquote>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2"><strong>SHELL SCRIPT</strong>
/opt/hobbit/bin/citrix-totals.sh :</font></span></div>
<blockquote dir="ltr" style="margin-right: 0px;">
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">#!/bin/sh</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">TFIL=/tmp/`basename
$0`.$$</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">/opt/hobbit/server/bin/bb localhost
"hobbitdboard host=citrix-[0-9][0-9] test=citrix fields=msg" | gsed
's/\\n/\n/g' > ${TFIL}</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">LINE=`grep -v 'users active'
${TFIL}`</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">CSUM=`grep "users active" ${TFIL} |
awk ' { sum += $1; } END { print sum; } '`</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">if [ -z "${CSUM}"
]<br>then<br>
CSUM=0<br>fi</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">/opt/hobbit/server/bin/bb localhost
"status citrix-farm.citrix green `date`</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">${CSUM} users
active</font></span></div>
<div><font color="#0000ff" face="Courier New" size="2"></font> </div><span>
<div dir="ltr" align="left"><font color="#0000ff" size="2"></font><font color="#0000ff" size="2"></font><br><font color="#0000ff" face="Tahoma" size="2">${LINE}"</font></div>
<div><font color="#0000ff" face="Tahoma" size="2"></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Tahoma" size="2">rm
${TFIL}</font></div></span></blockquote>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Tahoma" size="2"><strong>HOBBITLAUNCH.CFG
ENTRY:</strong></font></span></div>
<blockquote dir="ltr" style="margin-right: 0px;">
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">[citrix-totals]<br> ENVFILE
/opt/hobbit/server/etc/hobbitserver.cfg<br>
NEEDS hobbitd<br> CMD
/opt/hobbit/bin/citrix-totals.sh<br>
LOGFILE
$BBSERVERLOGS/logs/citrix-totals.log<br>
INTERVAL 5m</font></span></div></blockquote>
<div><font color="#0000ff" face="Tahoma" size="2"></font><span><font color="#0000ff" face="Tahoma" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Tahoma" size="2">The
paths for the binaries etc would obviously need massaging to suit your
installation. Good luck!</font></span></div>
<div><span><font color="#0000ff" face="Tahoma" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Tahoma" size="2">Andy.</font></span></div>
<div><font color="#0000ff" face="Tahoma" size="2"></font><font color="#0000ff" face="Tahoma" size="2"></font><br></div>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> Ward, Martin [mailto:<a href="mailto:Martin.Ward@colt.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Martin.Ward@colt.net</a>]
<br><b>Sent:</b> Wednesday, 7 November 2007 1:11 a.m.<br><b>To:</b>
<a href="mailto:hobbit@hswn.dk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">hobbit@hswn.dk</a><br><b>Subject:</b> [hobbit] Creating a fake, or combination,
client<br></font><br></div><span class="q">
<div></div>
<p><font face="Arial" size="2">Hi all,</font> </p>
<p><font face="Arial" size="2">I am a newbie to Hobbit and have inherited a working
system. I have a good idea of how it all hangs together but now I want to
produce certain graphs and cannot figure out how.</font></p>
<p><font face="Arial" size="2">I have a cluster of mail servers that run Postfix;
each of these clients is monitored within Hobbit. In the Trends link for each
client I have graphs showing the various mail queues (incoming, deferred etc)
and this data is stored in RRD files on the Hobbit server.</font></p>
<p><font face="Arial" size="2">Is there a way within Hobbit of creating a false or
meta- client that can have a graph with data from all of these RRD files?
Particularly I would like a graph that has all the incoming mail queue sizes on
it with one line per server. I already have this information in lots of
different RRD files but would like to have them all in one graph. I can create a
graph outside of Hobbit to do this, but within the monitoring system it
restricts the RRD files it will display data from to those in the data directory
of the selected client (in the Trends link).</font></p>
<p><font face="Arial" size="2">I have tried creating a new client in the data files
ans symbolically linking the other RRD files into its data directory, but cannot
persude the graphs to appear in the trends web page.</font></p>
<p><font face="Arial" size="2">Thanks for your time,</font> </p>
<p><font face="Arial" size="2">|\/|artin</font> <br><font face="Arial" size="2">----</font> <br><font face="Arial" size="2">NetOps TAC</font> <br><font face="Arial" size="2">T:+44 20 7863 5218</font> <br><font face="Arial" size="2">
Group:</font> <font face="Arial" size="2">+49 69 56607 0412</font> <br><font face="Arial" size="2">F: +44 20 7863 5210</font> </p></span>
<p>#####################################################################################</p>
<p>This email is intended for the person to whom it is addressed<br>only. If you
are not the intended recipient, do not read, copy<br>or use the contents in any
way. The opinions expressed may not<br>necessarily reflect those of ZESPRI Group
of Companies ('ZESPRI').</p>
<p>While every effort has been made to verify the information<br>contained
herein, ZESPRI does not make any representations <br>as to the accuracy of the
information or to the performance<br>of any data, information or the products
mentioned herein.<br>ZESPRI will not accept liability for any losses, damage
or<br>consequence, however, resulting directly or indirectly from<br>the use of
this
e-mail/attachments.<br>#####################################################################################</p>
</div>
</blockquote></div><br>