|
From: Buchan M. <bg...@st...> - 2011-05-13 13:01:25
|
On Wednesday, 11 May 2011 15:27:27 Steve Staples wrote: > Hi, I originally sent this to the XYMON list, but a reply was suggested > i send it here... so here is what I wrote, and maybe hopefully someone > has a suggestion on how I can do this :) > Well, I had intended you reply to my reply, but on this list. As in my other reply, you shouldn't need to touch either of: 1)RRD collector code - the collector code in Xymon doesn't modify the contents of the 'test' that is stored by Xymon. 2)The page generation code. The Xymon page generation code more or less just wraps whatever was sent by the "client" (devmon) in headers and footers, plus adds in the graphs at the end of the page. Now, if you don't want the graphs at the bottom of the page at all, then you may need to touch some of the bbgen code. However, if you want the graphs to appear in the table, you should be able to do that by inserting some js in the table, by modifying the 'messages' file of the devmon template. If this is seen as something that devmon users would like for most devmon tests that have graphs, I could possibly add a new TABLE option for it. However, it would probably be best first to prototype it by changing a 'messages' file. However, the real question is, what are you trying to achieve. If you are trying to make it easier to present/see the utilisation of important network links, the weathermap (e.g. http://staff.telkomsa.net/~bgmilne/xymon/weathermap/nbsc.html) may be a better solution. That said, in some cases, you would just like to be able to associate the graph to the interface description, without scrolling up and down a lot. In that case, I have a short perl script (just commited to svn[1]) that uses an unreleased perl module for Xymon, to get the interface description out of the if_load test and put it in the graph[3]. You need to put the Xymon::Client (Client.pm file[2]) somewhere perl can find it (e.g. you can add PERL5LIB to hobbitserver.cfg, and in the directory it points to, create a Xymon directory, and drop the attached file there). I will find a place to host this project (either in Xymon itself, devmon, or a separate project) later, hopefully soon. 1. http://devmon.svn.sf.net/viewvc/devmon/trunk/extras/devmongraphtitle.pl 2. http://staff.telkomsa.net/~bgmilne/xymon/Client.pm 3. http://staff.telkomsa.net/~bgmilne/xymon/if_load_graph_with_int_descr.png Now, the question is whether the page load time on a device with > 200 interfaces, due to the graphs, warrants taking the code out of the bbgen pieces, and instead rely on JS generated by devmon, to show the graphs on demand. Regards, Buchan > -- ORIGINAL MESSAGE TO XY...@XY... -- > Hi! > > This is my first post here... I am just trying to make some small > changes to our xymon system, and I am having some weird issues... > > we are using the 4.3.0 branch, and the issues i am running into, are > with the devmon if_load pages. > > The thing that I am doing, is in this page there is the table at the > top, and a bunch of graphs on the bottom (i didn't set this up, and i am > assuming that this is the "default"). I am trying to create a link from > the table, that will open the corresponding graph url (as if i had > scrolled down to the graph and click on it). > > I had it sort of working with some creative javascripting, but after > looking into it, it wasn't 100%. > > the "table" is not sorted at all, but the "graphs" section is sorted > based on the rrd name. > > > is there anyway (i am sure that there is) to put the same value from the > transforms file {ifLoad} into the ./lib/xymonrrd.c file? does that > make sense? doesn't have to be that {ifLoad} perse, but something that > i can make match from teh table to the graphs... > > i was thinking in this area, to add the 'id=\"ifload_%s\"': > static const char *xymonlinkfmt = "<table summary=\"%s Graph > \"><tr><td><A HREF=\"%s&action=menu\" id=\"ifload_%s\"><IMG BORDER=0 > SRC=\"%s&graph=hourly&action=view\" ALT=\"xymongraph %s > \"></A></td><td>..... > > If you could point me in the right direction, I would be greatful :) > > Steve. |