On 11/6/07, Andy France <user-ee2a9e4eaf57@xymon.invalid> wrote:
Hi Martin,
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.
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 :-)
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.
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.
*BB-HOSTS ENTRIES :*
127.0.0.1 citrix-farm # COMMENT:"Farm Totals" testip noconn
noinfo notrends
192.168.1.101 citrix-01 #
192.168.1.102 citrix-02 #
*SHELL SCRIPT* /opt/hobbit/bin/citrix-totals.sh :
#!/bin/sh
TFIL=/tmp/`basename $0`.$$
/opt/hobbit/server/bin/bb localhost "hobbitdboard host=citrix-[0-9][0-9]
test=citrix fields=msg" | gsed 's/\\n/\n/g' > ${TFIL}
LINE=`grep -v 'users active' ${TFIL}`
CSUM=`grep "users active" ${TFIL} | awk ' { sum += $1; } END { print sum;
} '`
if [ -z "${CSUM}" ]
then
CSUM=0
fi
/opt/hobbit/server/bin/bb localhost "status citrix-farm.citrix green
`date`
${CSUM} users active
${LINE}"
rm ${TFIL}
*HOBBITLAUNCH.CFG ENTRY:*
[citrix-totals]
ENVFILE /opt/hobbit/server/etc/hobbitserver.cfg
NEEDS hobbitd
CMD /opt/hobbit/bin/citrix-totals.sh
LOGFILE $BBSERVERLOGS/logs/citrix-totals.log
INTERVAL 5m
The paths for the binaries etc would obviously need massaging to suit your
installation. Good luck!
Andy.
*From:* Ward, Martin [mailto:user-2d33a6eb6a05@xymon.invalid]
*Sent:* Wednesday, 7 November 2007 1:11 a.m.
*To:* user-ae9b8668bcde@xymon.invalid
*Subject:* [hobbit] Creating a fake, or combination, client
Hi all,
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.
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.
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).
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.
Thanks for your time,
|\/|artin
----
NetOps TAC
T:+44 20 7863 5218
Group: +49 69 56607 0412
F: +44 20 7863 5210
#####################################################################################
This email is intended for the person to whom it is addressed
only. If you are not the intended recipient, do not read, copy
or use the contents in any way. The opinions expressed may not
necessarily reflect those of ZESPRI Group of Companies ('ZESPRI').
While every effort has been made to verify the information
contained herein, ZESPRI does not make any representations
as to the accuracy of the information or to the performance
of any data, information or the products mentioned herein.
ZESPRI will not accept liability for any losses, damage or
consequence, however, resulting directly or indirectly from
the use of this e-mail/attachments.
#####################################################################################