> extensive); I wanted to know if it is possible to evaluate a command
> in a mrtg configration file, similar to how the graveyard ticks are
> used in bash shell scripting. Basically I have a PHP script that I use
> to print an HTML menu (it uses iterative loops and conditional logic
> to apply various CSS styles depending on the state of a hyperlink
> (i.e. active).  I want to execute an arbitrary external PHP script
> from within an mrtg file; is this possible?  If so could somebody
> please send me a code snippet or syntax example of how this can be
> achieved?

You can have MRTG call an external script to either:
a) collect the data, using Target[]:`command`
or
b) handle threshold breaks/heals, using ThreshProg{I/O}[]:command

However, from your posting it sounds as if you want an arbitrary script to be 
run every pass in order to generate static web pages?  I would have thought it 
would be better to use some sort of CGI to do this processing on demand from 
the web server, rather than every pass of MRTG.  If you are running MRTG in 
RRDTool mode (as opposed to Native mode) then MRTG will not generate the HTML 
and images every pass but will simply update the RRD files, leaving the image 
and HTML creation to your frontend ( routers2/mrtg-rrd/14all.cgi etc) -- this 
is much more efficient.  

Steve

Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 924 6487
Mobile: +64 (0)21 753 189
Email: [email protected]
 Please consider the environment before printing this e-mail 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to