From: Buchan M. <bg...@st...> - 2009-12-28 15:43:13
|
Prompted by Wim's post on the Hobbit list, I made a quick script to use for a custom title for the if_load graphs. It is (at present) using a perl module (Xymon::Client) which I've started, and for which I am looking at use cases. For this use case, it could easily enough be replaced with a call to 'bb' if you don't want this additional dependency. To use this: 1)Edit hobbitserver.cfg, add a PERL5LIB pointing to a directory under which you will install the attached Client.pm file. I used: PERL5LIB=$BBHOME/perl 2)In the directory, create a directory named "Xymon", and place Client.pm in the directory (e.g. $BBHOME/perl/Xymon) 3)Save the attached devmongraphtitle.pl somewhere (I used $BBHOME/ext) 4)Test that as the user your xymon runs as, under a xymon environment (e.g. after 'bbcmd bash') you can execute the script successfully. With no arguments, the output should be "Network Traffic" 5)Modify your devmon-graph.cfg (or whichever file has the graph definitions for if_load), so that you have something like: TITLE exec:$BBHOME/ext/devmongraphtitle.pl instead of the original: TITLE Network Traffic If it all works, you should now have the interface description in all your if_load graphs (for interfaces that have descriptions). Let me know what you think (of either ...). Once I find a home for Xymon::Client, I will probably add devmongraphtitle.pl to the extras directory in svn. Regards, Buchan |