Using variables in clientlaunch.cfg?

Charles Jones Charles.Jones at ciscolearning.org
Sat Jul 29 01:02:45 CEST 2006


I plan on making some custom graphs for things like tomcat thread counts. The documentation for creating custom graphs should get me through that part, but the problem is my environment is such that groups of my monitored servers share a common home directory.

Fortunately, the hobbitclient uses the hostname as part of most of its dynamic files, so there are no conflicts.

The problem I forsee is lets say that servers 1-10 all share a common client homedirectory (SAN mount). Lets say that I want to collect data on tomcat thread counts on just some of the servers. I cannot just add an entry to clientlaunch.cfg, as this will affect ALL the servers.

Can you suggest how I should handle this?

The only way I can think of, is to define a generic "launcher" script, like:

[launcher]
        	ENVFILE /home/hobbit/client/etc/hobbitclient.cfg
                CMD /home/hobbit/client/ext/launcher.sh
                INTERVAL 5m


This launcher.sh script could do something like:
------------------------------------------------------------------------------
#!/bin/sh
if [ -f /home/hobbit/client/ext/$HOSTNAME_tct.sh ]
then
      /home/hobbit/client/ext/$HOSTNAME_tct.sh
fi
------------------------------------------------------------------------------
This would launch an external script that matched the hostname, if it existed, otherwise does nothing. This would allow all of the custom ext scripts to be in the same shared directory, with different names.


Another option would be, if clientlaunch could handle variables:
------------------------------------------------------------------------------
[tomcat_threads]
        	ENVFILE /home/hobbit/client/etc/hobbitclient.cfg
                CMD /home/hobbit/client/ext/$HOSTNAME_tct.sh
                INTERVAL 5m
------------------------------------------------------------------------------
I imagine this method though would generate errors when hobbit tries to execute the script on the hosts where it does not exist?

-Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20060728/a4cf3acd/attachment.html>


More information about the Xymon mailing list