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

William Owen William.Owen at profilesmail.com
Wed May 18 22:04:19 CEST 2011

I have one master config with workdir specified and then a separate "Directory[_]: Device" included in all of my include files. This seems to work well. If you can overlook the fact that I'm running on Windows, this is an example of my master.cfg and a server.

##### change dirs as needed versions etc etc ####
PathAdd: D:\mrtg\bin
PathAdd: D:\rrdtool

###### the rest of your cfg file here #####
LogFormat: rrdtool
WorkDir: D:\mrtg\data\
EnableIPv6: no
Refresh: 300
Interval: 5

Include: D:\mrtg\configs\server1.cfg
Include: D:\mrtg\configs\server2.cfg
Include: D:\mrtg\configs\device1.cfg
Include: D:\mrtg\configs\device2.cfg

Directory[_]: PICBI002
routers.cgi*Desc: PICBI002
routers.cgi*Icon: power_edge-sm.gif

### Interface 65539 >> Descr: 'Broadcom-BCM5708C-NetXtreme-II-GigE-(NDIS-VBD-Client)' | Name: '' | Ip: 'xxx.xxx.xxx.xxx' | Eth: 'xx-xx-xx-xx-xx-xx' ###

Target[server1_65539]: !xx-xx-xx-xx-xx-xx:community at server1:
SetEnv[server1_65539]: MRTG_INT_IP="xxx.xxx.xxx.xxx" MRTG_INT_DESCR="Broadcom-BCM5708C-NetXtreme-II-GigE-(NDIS-VBD-Client)"
MaxBytes[server1_65539]: 125000000
Title[server1_65539]: Traffic Analysis for 65539 - Server1
PageTop[server1_65539]: null

From: mrtg-bounces+william.owen=profilesmail.com at lists.oetiker.ch [mailto:mrtg-bounces+william.owen=profilesmail.com at lists.oetiker.ch] On Behalf Of Jason R. Butterfield
Sent: Wednesday, May 18, 2011 2:32 PM
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:

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/]
Include: sw356024sv02.cfg     #[workdir: /var/www/mrtg/]
Include: c2801.cfg     #[workdir: /var/www/mrtg/]

All html/log/png files are created in the last workdir: /var/www/mrtg/

I'm a bit stumped.

Any thoughts or input would be most appreciated.


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/b97d1869/attachment-0001.htm 

More information about the mrtg mailing list