<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.2">
</HEAD>
<BODY>
On Mon, 2009-02-09 at 20:21 -0800, AustralianSummer wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi,
I am just wondering what is the best way to have a subfolder for each
device. (e.g mrtg/hostname1/ , mrtg/hostname2/ )
</PRE>
</BLOCKQUOTE>
<PRE>
I do something similar, but I have two levels to keep it somewhat sane...
</PRE>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
I tried using the --subdirs=format
</PRE>
</BLOCKQUOTE>
subdir should be singular, e.g.:<BR>
/usr/bin/cfgmaker --if-template=iosv3.iftemplate --ifref=name --interfaces --host-template=iosv3.template <B>--subdir=site1/HOSTNAME</B> --username='foo' --authkey='0x21de...' --authproto='sha' --privkey='0xa897...' --privproto=aesfcb128 --output=/var/mrtg/cfg/site1/site1-router.cfg <A HREF="mailto:'public'@onioncreek-net.austin-energy.net">'foo'@site1-router.example.com</A>::2:1:1:3<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
and 'Directory[hostname1]: hostname1 '
</PRE>
</BLOCKQUOTE>
Not [hostname1], you need the individual targets there. E.g.:<BR>
Directory[site1-router.example.com<B>.cpu1</B>]: site1/site1-router.example.com<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
options but cant seem to get it to work.
and also will the above methods require making seperate .cfg files or will
they all use the mrtg.conf file.
</PRE>
</BLOCKQUOTE>
<BR>
Either way works, but if you have so many configs that you want separate directories, it is more scalable to create a separate config file for every device, then have a master mrtg.cfg with Include: statements for each one.<BR>
<BR>
</BODY>
</HTML>