Hi Steve,

the reson this works is because mrtg sends the target lines through
an eval pass after substituting the target expressions with perl
variable names ... what it poils down to is, that you can use any
perl code in a target line that does not look like a taret itself
.. and you have to make sure that the target is separated from the
rest of the code by whitespace ...

chers
tobi

ps this btw is not new, I just never bragged about it ...

Today Steve Shipway wrote:

> Tobi Wrote:
> >David Wrote:
> > > Is there anyway to do this?
> >
> > yes, write your targets like this
> > target[..]: 1:[EMAIL PROTECTED] || 0 + 4:[EMAIL PROTECTED] || 0
>
> Oh, I like that.  This must be a relatively new MRTG ability, I don't
> remember the || operator being there before.  I must take a look at the
> latest version docco and see what else has been added.
>
> Steve
>
> --
> Unsubscribe mailto:[EMAIL PROTECTED]
> Archive     http://lists.ee.ethz.ch/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://tobi.oetiker.ch [EMAIL PROTECTED] ++41 62 213 9907

--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

Reply via email to