[mrtg] Variable Interpolation in the <Table> description (maxbytes, etc)

Fred Richards mrtg at geexology.org
Tue Apr 15 16:39:13 MEST 2003


Hi folks!

   Just want to say we've been using mrtg and rrdtool for quite some 
times here to monitor many bandwidth links ... it's fantastic.  I have a 
need to change some MaxBytes entries quite often, which means in the cfg 
files, I'm changing the MaxBytes line and then the description down 
below, in the html table (the <TR><TD>Max Speed:</TD>  <TD>128 
kbits/s</TD></TR> line)... I wanted to automate this process, perhaps 
write a script, (we already have a php/mysql front end, if we modify 
someone's bandwidth, I want the change to propagate back to the config 
file.)  So my question is this: any way to make the description table 
interpolate variables (such as ones set by the SetEnv keyword) or does 
the mrtg script take all html tags literally?  My idea is to write a 
script that selects out the MaxBytes[] line of a specific target, 
replace it with the new value, and if there is a corresponding 
description in the table, make it dependent on the value of the MaxBytes 
line.  (Tried a few things such as setting SetEnv[target]: 
MaxBytes="16000" then having it interpolate in the <table>, but to no 
avail...)  Any help would be greatly appreciated!  Thanks!

					-- Fred

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list