[mrtg] all generated files going to last workdir of included cfg files in mrtg.cfg

Steve Shipway s.shipway at auckland.ac.nz
Thu May 19 00:19:45 CEST 2011


You shouldn't really use WorkDir like this - the setting for WorkDir is
supposed to be global, and defined once only.  Instead, use the Directory[]
setting for each Target and split them this way.  Redefining a global is
dodgy practice as it is handled differently depending on the parser, and
redefining within an included file is even more unpredictable.

 

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:  <mailto:s.shipway at auckland.ac.nz> s.shipway at auckland.ac.nz

P Please consider the environment before printing this e-mail 

 

 

From: mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch
[mailto:mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On Behalf Of
Jason R. Butterfield
Sent: Thursday, 19 May 2011 7:32 a.m.
To: mrtg at lists.oetiker.ch
Subject: [mrtg] all generated files going to last workdir of included cfg
files in mrtg.cfg

 

My mrtg.cfg utilizes the 'Include:' feature to pull in config files for a
handful of devices.

 

In each of the device.cfg files, I specify a different 'workdir' to keep
things separated per device. 

 

When I run mrtg (I have the cron disabled while I figure this out)
everything seems to work fine, except that all of the files generated go in
the 'workdir' specified by the last cfg file 'included' in the mrtg.cfg.  So
things look fine from a web browser for the last device in the config, but
not for the rest since the html indices point to the respective directories
where nothing is being updated.

 

Specifically -my mrtg.cfg file: 

 

**snip**

HtmlDir: /var/www/mrtg

ImageDir: /var/www/mrtg

LogDir: /var/lib/mrtg

ThreshDir: /var/lib/mrtg

Include: sw375024sv01.cfg      #[workdir line in cfg file == workdir:
/var/www/mrtg/10.4.88.232_sw375024sv01.gracecottage.int]

Include: sw356024sv02.cfg     #[workdir:
/var/www/mrtg/10.4.88.235_sw356024sv02.gracecottage.int]

Include: c2801.cfg     #[workdir:
/var/www/mrtg/10.1.1.1_gracerouter2.gracecottage.int]

**snip**

 

All html/log/png files are created in the last workdir:
/var/www/mrtg/10.1.1.1_gracerouter2.gracecottage.int

 

I'm a bit stumped.

 

Any thoughts or input would be most appreciated.

 

-Jason

 

 

  _____  

This message (and any included attachments) is from Grace Cottage Hospital
and is intended only for the addressee(s). The information contained herein
may include privileged or otherwise confidential information. Unauthorized
review, forwarding, printing, copying, distributing, or using such
information is strictly prohibited and may be unlawful. If you received this
message in error, or have reason to believe you are not authorized to
receive it, please promptly delete this message and notify the sender by
e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20110518/8b4b5bfd/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4928 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20110518/8b4b5bfd/attachment-0001.bin 


More information about the mrtg mailing list