Ahh, thanks William, that was enough to help me figure it out. I forgot to mention that I want to have my cfgmaker and indexmaker running on a cron, so the generation of the cfg and html files can be updated regularly to catch newly in service switch ports, etc. -without having admin-down entries clutter things. I finally got my syntax working, and for anyone else trying to do this, here's what my cfgmaker and indexmaker syntax look like:
cfgmaker --global "workdir: /var/www/mrtg" --subdirs="10.1.1.1_gracerouter2.gracecottage.int" --ifref=name --output /etc/mrtg/c2801.cfg --global 'options[_]: growright,bits' ****@10.1.1.1<mailto:****@10.1.1.1> indexmaker /etc/mrtg/c2801.cfg > /var/www/mrtg/c2801.html -Jason From: William Owen [mailto:[email protected]] Sent: Wednesday, May 18, 2011 4:04 PM To: Jason R. Butterfield; [email protected] Subject: RE: [mrtg] all generated files going to last workdir of included cfg files in mrtg.cfg 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. Master.cfg ##### 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 server1.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@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: [email protected] [mailto:[email protected]] On Behalf Of Jason R. Butterfield Sent: Wednesday, May 18, 2011 2:32 PM To: [email protected] 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. ________________________________ 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.
_______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
