[mrtg] Graphs in different subdirectories.

Ikechukwu Anyanwu ian at emperion.net
Tue Feb 10 20:00:06 CET 2009


You have to include deferent directories for the deferent hosts. Eg

 

 

 

WorkDir: /home/mrtg/

Options[_]: growright,gauge,bits

Factor[_]:125

RunAsDaemon: yes

WithPeak[_]: d,w

Refresh: 300

Interval: 5

 

Target[host1 1.3.6.1.4.1.2603.5.4.2.1.8.4.951.1007.48&1.3.6.1.4.1.2603.5.4.2.1.9.4.951.1007.48:xxxxxx at 200.18.2.229:::::2

MaxBytes[host1]: 12500000

Title[host1]: Traffic xxxxxx 

PageTop[host1]: <H1>xxxxxxx </H1>

Directory[host1]: host1_dir

 

 

#########################################

 

Target[host2] 1.3.6.1.4.1.2603.5.4.2.1.8.4.951.1007.48&1.3.6.1.4.1.2603.5.4.2.1.9.4.951.1007.48:xxxxxx at 200.18.2.229:::::2

MaxBytes[host2]: 12500000

Title[host2]: Traffic xxxxxxxx

PageTop[host2]: <H1>xxxxxxx </H1>

Directory[host2]: host2_dir

 

You have to make sure that the following directory exists in /home/mrtg/

 

 

Kind Regards,

Iyke Anyanwu

 

Head, Network and IP Infrastructure,

Emperion West Africa Limited

Chevron Drive

Lekki Expressway

Lagos, Nigeria

Mail: ian at emperion.net 

YID:      iykeanny; MSN:    iykeanny at hotmail.com

 

Cell:                  +234 (0)8087184184; (0)7028145226

Support Lines    +234 (1)7949167-8 , (1)7741926 

Fax                   +234 (1)4611370

 

From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of McDonald, Dan
Sent: Tuesday, February 10, 2009 1:32 PM
To: mrtg at lists.oetiker.ch
Subject: Re: [mrtg] Graphs in different subdirectories.

 

On Mon, 2009-02-09 at 20:21 -0800, AustralianSummer wrote: 

 
Hi,
 
I am just wondering what is the best way to have a subfolder for each
device. (e.g mrtg/hostname1/ , mrtg/hostname2/ )
 
I do something similar, but I have two levels to keep it somewhat sane...





 
 
I tried using the  --subdirs=format 

subdir should be singular, e.g.:
/usr/bin/cfgmaker --if-template=iosv3.iftemplate --ifref=name --interfaces --host-template=iosv3.template --subdir=site1/HOSTNAME --username='foo' --authkey='0x21de...' --authproto='sha' --privkey='0xa897...' --privproto=aesfcb128 --output=/var/mrtg/cfg/site1/site1-router.cfg 'foo'@site1-router.example.com <mailto:'public'@onioncreek-net.austin-energy.net> ::2:1:1:3




 
and  'Directory[hostname1]: hostname1 '

Not [hostname1], you need the individual targets there.  E.g.:
Directory[site1-router.example.com.cpu1]: site1/site1-router.example.com





 
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.


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20090210/b2ae1124/attachment-0001.html 


More information about the mrtg mailing list