From: Buchan M. <bg...@st...> - 2011-05-20 10:53:49
|
On Monday, 16 May 2011 21:17:42 Mark Jones wrote: > Let me respond for Steve here as he is doing this for me. > > As you know devmon builds the table of interfaces with the values etc. it > also sends the ncv data to Xymon so Xymon can build the rrd files etc. > > When the page is viewed in the browser it is created on the fly by the > servicestatus cgi. So as you said it takes what devmon has sent it and > wraps it in headers and footers etc. it also adds the graphs to the bottom > of the page based on the rrd files it finds. > > What we are trying to do is add another column to the table to have a link > to the page that clicking on the graph gives. The problem being is that > there is no way to identify the graphs as Xymon uses an id starting at 1 or > 0 for the first graph based on some kind of ordering of the rrd files. You can use a URL that uses the interface name (with some minor changes). For example, a URL taken from the weathermap example I gave (the graph popups are empty for you, but on the live versions you would see an 'overlib' interface graph) in my previous reply uses: http://seaknight.area51.telkomsa.net/hobbit- cgi/hobbitgraph.sh?host=phi&service=if_load:Gi5_2.&graph_height=120&graph_width=576&color=green&action=menu for interface Gi5/2 (the . is added to ensure it doesn't match Gi5/20 etc.). So, you would need a regex transform to get the interface name right, and some means to pull out the host and service names (dynamically), and then decide how to construct the rest of the URL (e.g. using some of the Xymon environment variables). So, some of this might be messy to have in the template, but devmon has most of them available. Since this is generally useful, the real question becomes, how do we want to present the graph. In many cases, going back and forward in the browser is not convenient. Would the overlib method (as used in the weathermap) be better. For example, displaying the graph in a "popup" when mousing over the interface name? > So Steve has tried to duplicate this ordering of the ifnames so that he can > match to the graph id. But the method of sort is not as one would expect > so we have issues where things don't match up. I don't think relying on the sorting matching is reliable. Regards, Buchan |