Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SNMP & MRTG made in easy (Power Under Control ;)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Fri Nov 14, 2003 3:54 pm    Post subject: SNMP & MRTG made in easy (Power Under Control ;) Reply with quote

Object required:
* [net-analyzer/net-snmp]
* [media-libs/libgd]
* [net-analyzer/mrtg]
* [sys-apps/dcron]

Optionally:
* [net-www/mini_httpd] or [net-www/apache]

WARNING: Do not Cut&Paste commands that begin with:
Code:

/bin/cat -s > /foo/bar


Example: http://www.orson.it/stat

0) Switch User

Code:

/bin/su -

Enter Password

1) Begin

Code:

/usr/bin/mkdir /etc/mrtg
/usr/bin/mkdir /etc/cron.mrtg
/usr/bin/mkdir /var/www/localhost/mrtg


2) Edit

Code:

/bin/cat -s > /etc/snmp/snmpd.conf

com2sec local     127.0.0.1/32    public
com2sec local     10.10.10.0/24   public

group MyROGroup v1         local
group MyROGroup v2c        local
group MyROGroup usm        local

view all    included  .1                               80

access MyROGroup ""      any       noauth    exact  all    none   none

syslocation MyLocation
syscontact Me <me@somewhere.org>

Now just press [ctrl+d].

Edit /etc/conf.d/snmpd file, and add:
Code:

-c /etc/snmp/snmpd.conf

in SNMPD_FLAGS line
(like this: SNMPD_FLAGS="-c /etc/snmp/snmpd.conf")

3) Daemon
Code:

/etc/init.d/snmpd start
/sbin/rc-update add snmpd default


4) Configuration
Traffic:
Code:

/usr/bin/cfgmaker  \
--output=/etc/mrtg/traffic.cfg \
--ifdesc=ip \
--ifref=descr \
--global "WorkDir: /var/www/localhost/mrtg" \
--global "Options[_]: bits,growright" \
public@localhost


Cpu:
Code:

/bin/cat -s > /etc/mrtg/cpu.cfg
WorkDir: /var/www/localhost/mrtg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@localhost + ssCpuRawSystem.0&ssCpuRawSystem.
0:public@localhost + ssCpuRawNice.0&ssCpuRawNice.0:public@localhost
RouterUptime[localhost.cpu]: public@localhost
MaxBytes[localhost.cpu]: 100
Title[localhost.cpu]: CPU Load
PageTop[localhost.cpu]: <H1>Active CPU Load %</H1>
Unscaled[localhost.cpu]: ymwd
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: Active CPU in % (Load)
Legend2[localhost.cpu]:
Legend3[localhost.cpu]:
Legend4[localhost.cpu]:
LegendI[localhost.cpu]:  Active
LegendO[localhost.cpu]:
Options[localhost.cpu]: growright,nopercent

Now just press [ctrl+d].

Mem:
Code:

/bin/cat -s > /etc/mrtg/mem.cfg
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[localhost.mem]: .1.3.6.1.4.1.2021.4.11.0&.1.3.6.1.4.1.2021.4.11.0:public@localhost
PageTop[localhost.mem]: <H1>Free Memory </H1>
WorkDir: /var/www/localhost/mrtg
Options[localhost.mem]: nopercent,growright,gauge,noinfo
Title[localhost.mem]: Free Memory
MaxBytes[localhost.mem]: 1000000
kMG[localhost.mem]: k,M,G,T,P,X
YLegend[localhost.mem]: bytes
ShortLegend[localhost.mem]: bytes
LegendI[localhost.mem]:  Free Memory:
LegendO[localhost.mem]:
Legend1[localhost.mem]: Free memory, not including swap, in bytes

Now just press [ctrl+d].

Swap:
Code:

/bin/cat -s > /etc/mrtg/swap.cfg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.swap]: memAvailSwap.0&memAvailSwap.0:public@localhost
PageTop[localhost.swap]: <H1>Swap Memory</H1>
WorkDir: /var/www/localhost/mrtg
Options[localhost.swap]: nopercent,growright,gauge,noinfo
Title[localhost.swap]: Free Memory
MaxBytes[localhost.swap]: 1000000
kMG[localhost.swap]: k,M,G,T,P,X
YLegend[localhost.swap]: bytes
ShortLegend[localhost.swap]: bytes
LegendI[localhost.swap]:  Free Memory:
LegendO[localhost.swap]:
Legend1[localhost.swap]: Swap memory avail, in bytes

Now just press [ctrl+d].

Ping:
Code:

/bin/cat -s > /etc/mrtg/ping.cfg
WorkDir: /var/www/localhost/mrtg
Title[localhost.ping]: Round Trip Time
PageTop[localhost.ping]: <H1>Round Trip Time</H1>
Target[localhost.ping]: `/etc/mrtg/ping.sh`
MaxBytes[localhost.ping]: 2000
Options[localhost.ping]: growright,unknaszero,nopercent,gauge
LegendI[localhost.ping]: Pkt loss %
LegendO[localhost.ping]: Avg RTT
Legend1[localhost.ping]: Maximum Round Trip Time in ms
Legend2[localhost.ping]: Minimum Round Trip Time in ms
Legend3[localhost.ping]: Maximal 5 Minute Maximum Round Trip Time in ms
Legend4[localhost.ping]: Maximal 5 Minute Minimum Round Trip Time in ms
YLegend[localhost.ping]: RTT (ms)

Now just press [ctrl+d].

5) Make the jobs
Traffic:
Code:

/bin/cat -s > /etc/cron.mrtg/traffic.sh
#!/bin/sh
/usr/bin/mrtg /etc/mrtg/traffic.cfg

Now just press [ctrl+d].

Cpu:
Code:

/bin/cat -s > /etc/cron.mrtg/cpu.sh
#!/bin/sh
/usr/bin/mrtg /etc/mrtg/cpu.cfg

Now just press [ctrl+d].

Mem:
Code:

/bin/cat -s > /etc/cron.mrtg/mem.sh
#!/bin/sh
/usr/bin/mrtg /etc/mrtg/mem.cfg

Now just press [ctrl+d].

Swap:
Code:

/bin/cat -s > /etc/cron.mrtg/swap.sh
#!/bin/sh
/usr/bin/mrtg /etc/mrtg/swap.cfg

Now just press [ctrl+d].

Ping:
Code:

/bin/cat -s > /etc/cron.mrtg/ping.sh
#!/bin/sh

/usr/bin/mrtg /etc/mrtg/ping.cfg



ping.sh
Code:

/bin/cat -s > /etc/mrtg/ping.sh
#!/bin/sh
PING="/bin/ping"
# Google, for example
ADDR="google.com"
DATA=`$PING -c10 -s500 $ADDR -q `
LOSS=`echo $DATA | awk '{print $18 }' | tr -d %`
echo $LOSS
if [ $LOSS = 100 ];
then
               echo 0
else
        echo $DATA | awk -F/ '{print $5 }'
fi

Now just press [ctrl+d].

Code:

/bin/chmod +x /etc/cron.mrtg/*.sh
/bin/chmod +x /etc/mrtg/ping.sh


Run each script 3 times (don't care warnings)
Code:

/etc/cron.mrtg/traffic.sh
/etc/cron.mrtg/cpu.sh
/etc/cron.mrtg/mem.sh
/etc/cron.mrtg/swap.sh
/etc/cron.mrtg/ping.sh


6) Make the index
Code:

/usr/bin/indexmaker --output=/var/www/localhost/mrtg/index.html \
--title="Power Under Control :)" \
--sort=name \
--enumerate \
/etc/mrtg/traffic.cfg \
/etc/mrtg/cpu.cfg \
/etc/mrtg/mem.cfg \
/etc/mrtg/swap.cfg \
/etc/mrtg/ping.cfg


7) Cronjob
Code:

/bin/cat >> /var/spool/cron/crontabs/root
*/5 * * * * /bin/run-parts /etc/cron.mrtg 1> /dev/null

Now just press [ctrl+d].
(or /usr/bin/crontab -e)

Power Under Control
Open Mozilla (I love it) and browse:

Code:

/var/www/localhost/www/index.html


(or use yours httpd server)

http://localhost/mrtg

# Advanced Users#

For other targets (and other stat), try with other object identifier (OID)

* Polling:
Code:

roberto@moira mrtg $ snmpwalk -v 1 -c public localhost mgmt.1.2.2.1.10.2
IF-MIB::ifInOctets.2 = Counter32: 140021440


* Translating:
Code:

roberto@moria mrtg $ snmptranslate -IR -Td mgmt.1.2.2.1.10.2
IF-MIB::ifInOctets.2
ifInOctets OBJECT-TYPE
  -- FROM       IF-MIB, RFC1213-MIB
  SYNTAX        Counter32
  MAX-ACCESS    read-only
  STATUS        current
  DESCRIPTION   "The total number of octets received on the interface,
            including framing characters.

            Discontinuities in the value of this counter can occur at
            re-initialization of the management system, and at other
            times as indicated by the value of
            ifCounterDiscontinuityTime."
::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) interfaces(2) ifTable(2) ifEntry(1) ifInOctets(
10) 2 }


* Most important files:
Code:

/usr/share/doc/net-snmp
/usr/share/doc/mrtg-*/contrib

- man mrtg
- man snmpd
- man snmpwalk
- man crontab
- man cat


Enjoy,

khazad-dum


Last edited by khazad-dum on Mon Nov 17, 2003 12:04 am; edited 3 times in total
Back to top
View user's profile Send private message
Krigare
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2003
Posts: 92
Location: ::1

PostPosted: Fri Nov 14, 2003 10:50 pm    Post subject: Reply with quote

Great guide!
Thanks!
_________________
Together we are strong.
Back to top
View user's profile Send private message
ckdake
l33t
l33t


Joined: 10 Apr 2003
Posts: 889
Location: Atlanta, GA

PostPosted: Sat Nov 15, 2003 4:32 pm    Post subject: Reply with quote

Awesome help! Got me partially up and running pretty quickly, however, I am using a 2.6 kernel and none of the memory stuff or network traffic stuff will work. Is this just because mrtg/snmp doesnt like 2.6 or is there something I can do?

(in traffic.cfg, all my interfaces are commented out, eth 0 says:
Quote:
### * it is operationally DOWN
### * has a speed of 0 which makes no sense


i tried uncommenting it and changing the speed in the cfg file, but still nothing on the graph (which i also added to the index.html file by hand)

Figured i would post this here instead of somewhere else because other people running 2.6 are bound to run into this problem.
_________________
http://ckdake.com/
Back to top
View user's profile Send private message
grover
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2002
Posts: 77
Location: Melbourne, Australia

PostPosted: Sat Nov 15, 2003 4:32 pm    Post subject: Re: SNMP & MRTG made in easy (Power Under Control ;) Reply with quote

Excellent guide. I've got it all working properly except for mem.cfg, it displays free RAM + free swap. To get it to display only free RAM you need to change this
Code:
Target[localhost.mem]: .1.3.6.1.4.1.2021.4.11.0&.1.3.6.1.4.1.2021.4.11.0:public@localhost

to this
Code:
Target[localhost.mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.6.0:public@localhost
Back to top
View user's profile Send private message
zend
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2002
Posts: 112
Location: Shanghai,China

PostPosted: Sun Nov 16, 2003 11:16 pm    Post subject: Reply with quote

I want to get disk usage,memory usage,but can't get it .please help me !!
Back to top
View user's profile Send private message
ckdake
l33t
l33t


Joined: 10 Apr 2003
Posts: 889
Location: Atlanta, GA

PostPosted: Sun Nov 16, 2003 11:23 pm    Post subject: Reply with quote

Just an update on mine.. the network stuff just started working *shrug* but the mem/swap stuff still is not working. 2.6 kernel issues is my guess..
_________________
http://ckdake.com/
Back to top
View user's profile Send private message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Sun Nov 16, 2003 11:54 pm    Post subject: Reply with quote

Disk usage:

Code:

/usr/bin/snmpwalk -v 1 -c public localhost | grep hrStorageDescr



Now, you have the map of your disk (for example: hrStorageDescr.1 is /, hrStorageDescr.2 is /home...etc etc)

After that, you can get the value of partitions:
Code:

/usr/bin/snmpwalk -v 1 -c public localhost hrStorageUsed.1
HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 1640653


Mrtg's config file must have 2 value: hrStorageSize.1 and hrStorageUsed.1.

Code:

/bin/cat -s > /etc/mrtg/disk.cfg
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
WorkDir: /var/www/localhost/mrtg
Target[localhost.partition-name]:hrStorageSize.1&hrStorageUsed.1:public@localhost
MaxBytes[localhost.partition-name]: 3000000
Title[localhost.partition-name]: Disk / Usage
PageTop[localhost.partition-name]: <H1>Disk / Usage</H1>
ShortLegendlocalhost.partition-name[]: B
kMG[localhost.partition-name]: k,M,G,T,P
kilo[localhost.partition-name]: 1024
YLegend[localhost.partition-name]: DISK / Utilization
Legend1localhost.partition-name[]: Root disk size
Legend2[localhost.partition-name]: Root disk usage
Legend3[localhost.partition-name]:
Legend4[localhost.partition-name]:
LegendIlocalhost.partition-name]:  Root disk size
LegendO[localhost.partition-name]:  Root disk usage
Options[localhost.partition-name]: gauge,nopercent


Now just press [ctrl+d]

Memory usage was described in the first post.

khazad-dum


Last edited by khazad-dum on Mon Nov 17, 2003 12:33 am; edited 1 time in total
Back to top
View user's profile Send private message
RageX
n00b
n00b


Joined: 01 Sep 2002
Posts: 16

PostPosted: Mon Nov 17, 2003 12:20 am    Post subject: Reply with quote

beautiful guide man, mucho thanks!!!
Back to top
View user's profile Send private message
innovatel
Apprentice
Apprentice


Joined: 26 Jul 2003
Posts: 176
Location: Italy - Crema (Cr)

PostPosted: Mon Nov 17, 2003 10:40 pm    Post subject: Reply with quote

I have a problem

Code:

bash-2.05b# emerge sys-apps/dcron
Calculating dependencies ...done!

!!! Error: the virtual/cron package conflicts with another package.
!!!        both can't be installed on the same system together.
!!!        Please use 'emerge --pretend' to determine blockers.

bash-2.05b# emerge --pretend sys-apps/dcron

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[blocks B     ] sys-apps/vcron ("virtual/cron" from pkg sys-apps/dcron-2.9)
[ebuild  N    ] sys-apps/dcron-2.9

bash-2.05b#


And now what can I do? :(

Bye.

Andrea
_________________
innovatel's Blog
Back to top
View user's profile Send private message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Tue Nov 18, 2003 12:27 am    Post subject: Reply with quote

There are two ways:

replace your cron's system (not suggested)

Code:

emerge -C vcron ; emerge dcron


or simply

Code:

crontab -e


and add
Code:

*/5 * * * * /bin/run-parts /etc/cron.mrtg 1> /dev/null


to add the scheduled jobs.

khazad-dum


Last edited by khazad-dum on Tue Nov 18, 2003 3:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
innovatel
Apprentice
Apprentice


Joined: 26 Jul 2003
Posts: 176
Location: Italy - Crema (Cr)

PostPosted: Tue Nov 18, 2003 8:51 am    Post subject: Reply with quote

I try the second way but I recived another error

Code:

bash-2.05b# crontab -v
crontab: invalid option -- v
crontab: usage error: unrecognized option
usage:  crontab [-u user] file
        crontab [-u user] { -e | -l | -r }
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)

_________________
innovatel's Blog
Back to top
View user's profile Send private message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Tue Nov 18, 2003 9:37 am    Post subject: Reply with quote

Sorry, I've mistaken.
the correct command is:

Code:

crontab -e


khazad-dum
Back to top
View user's profile Send private message
frippz
Guru
Guru


Joined: 22 Aug 2002
Posts: 460
Location: Malmö, Sweden

PostPosted: Tue Nov 18, 2003 8:18 pm    Post subject: Reply with quote

I get this:
Code:

ERROR: Target[localhost.cpu][_IN_] ' $$target[0]{$mode}  + ssCpuRawSystem.0&ssCpuRawSystem.' (warn): Ambiguous use of & resolved as operator & at (eval 4) line 1.
ERROR: Target[localhost.cpu][_OUT_] ' $$target[0]{$mode}  + ssCpuRawSystem.0&ssCpuRawSystem.' (warn): Ambiguous use of & resolved as operator & at (eval 5) line 1.
WARNING: Skipping Update of localhost.cpu, inlast is not defined
WARNING: Skipping Update of localhost.cpu, outlast is not defined

Did I miss anything?
Back to top
View user's profile Send private message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Tue Nov 18, 2003 10:34 pm    Post subject: Reply with quote

I think the Cut&Paste have failed.

Target[localhost.cpu]:
Code:
ssCpuRawUser.0&ssCpuRawUser.0:public@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0:public@localhost + ssCpuRawNice.0&ssCpuRawNice.0:public@localhost


a important thing is that the command is in one line only.
Check your "Target" line in the .cfg file.

khazad-dum
Back to top
View user's profile Send private message
frippz
Guru
Guru


Joined: 22 Aug 2002
Posts: 460
Location: Malmö, Sweden

PostPosted: Tue Nov 18, 2003 10:57 pm    Post subject: Reply with quote

Aw, should've seen that one coming... :wink:
Works great now. Thanks!

How should I go about getting some graphs showing the amount of traffic over a certain timespan? It would be nice to se how much data that flows to and from my server. :)
Back to top
View user's profile Send private message
nexxai
n00b
n00b


Joined: 15 Nov 2003
Posts: 11
Location: Winnipeg MB Canada

PostPosted: Tue Nov 18, 2003 11:16 pm    Post subject: Reply with quote

n/m, got it.
Back to top
View user's profile Send private message
samegutt
n00b
n00b


Joined: 16 Jun 2003
Posts: 26
Location: Oslo, Norway

PostPosted: Tue Nov 18, 2003 11:53 pm    Post subject: Reply with quote

*Levi* wrote:
I get this:
Code:

ERROR: Target[localhost.cpu][_IN_] ' $$target[0]{$mode}  + ssCpuRawSystem.0&ssCpuRawSystem.' (warn): Ambiguous use of & resolved as operator & at (eval 4) line 1.
ERROR: Target[localhost.cpu][_OUT_] ' $$target[0]{$mode}  + ssCpuRawSystem.0&ssCpuRawSystem.' (warn): Ambiguous use of & resolved as operator & at (eval 5) line 1.
WARNING: Skipping Update of localhost.cpu, inlast is not defined
WARNING: Skipping Update of localhost.cpu, outlast is not defined

Did I miss anything?


In your cpu.cfg file, just make sure you have
Code:
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0:public@localhost + ssCpuRawNice.0&ssCpuRawNice.0:public@localhost

on one single line.
Back to top
View user's profile Send private message
samegutt
n00b
n00b


Joined: 16 Jun 2003
Posts: 26
Location: Oslo, Norway

PostPosted: Wed Nov 19, 2003 12:20 am    Post subject: Reply with quote

Bummer, I'm perhaps a bit slow on my reload-button :)
Back to top
View user's profile Send private message
zend
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2002
Posts: 112
Location: Shanghai,China

PostPosted: Wed Nov 19, 2003 10:15 am    Post subject: Reply with quote

cfgstoragemakerhttp://savannah.nongnu.org/projects/cfgstoragemk/
I've get it work in my debian box.so it will work in gentoo
Back to top
View user's profile Send private message
lowbatt
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2002
Posts: 83

PostPosted: Wed Nov 19, 2003 6:24 pm    Post subject: Reply with quote

I've got everything working but my traffic. It give no errors when i run the traffic script. Also I get 0 traffic png's . I have tried about 15 diffrent mrtg.cfg files. I have verified my snmp works .. ( or so I think it does )

I'm using kernel 2.4 does it need something special in the kernel to monitor traffic?

I can figgure out why I can't get a traffic report. Any one have any idea's.

EDIT

After reading my post maybe I should say. I am unable to get the bandwidth graph. The ping is fine. I was messing with some things and kicked myself outta the box for now. since I'm at work I'll get you the snmp info asap.
_________________
Information is pure. Take a knife, for example. You can use it to cut up vegetables, butter your bread, etc. Or you can use it as a weapon. The way in which information exists in its many forms leaves for us the decision how to use it. - Maynard -TOOL


Last edited by lowbatt on Wed Nov 19, 2003 7:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Wed Nov 19, 2003 7:04 pm    Post subject: Reply with quote

Please, give me the output of:

Code:

snmpwalk -v 1 -c public localhost | grep ifDescr


and try to:

Code:

ping www.google.com


Do you ping it?
Back to top
View user's profile Send private message
lowbatt
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2002
Posts: 83

PostPosted: Thu Nov 20, 2003 1:16 am    Post subject: Reply with quote

ok here is the output

Code:

[root@localhost]snmpwalk -v 1 -c public localhost | grep ifDescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
HOST-RESOURCES-MIB::hrSWRunParameters.2635 = STRING: "ifDescr"

_________________
Information is pure. Take a knife, for example. You can use it to cut up vegetables, butter your bread, etc. Or you can use it as a weapon. The way in which information exists in its many forms leaves for us the decision how to use it. - Maynard -TOOL
Back to top
View user's profile Send private message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Thu Nov 20, 2003 4:46 pm    Post subject: Reply with quote

FIXED

Code:

/bin/rm /etc/mrtg/traffic.cfg

/bin/cat -s > /etc/mrtg/traffic.cfg
WorkDir: /var/www/localhost/htdocs/mrtg
Options[_]: bits,growright

Target[localhost_eth0]: 2:public@localhost:
SetEnv[localhost_eth0]: MRTG_INT_IP="" MRTG_INT_DESCR="eth0"
MaxBytes[localhost_eth0]: 1250000
Title[localhost_eth0]: Title
PageTop[localhost_eth0]: <H1>PageTop</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>System</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>Maintainer</TD></TR>
   <TR><TD>Description:</TD><TD>eth0  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>xxx Mbits/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>Ip()</TD></TR>
 </TABLE>

Now just press [ctrl+d].

Try with this configuration. Give me feedback soon.

khazad-dum


Last edited by khazad-dum on Fri Nov 21, 2003 2:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
zend
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2002
Posts: 112
Location: Shanghai,China

PostPosted: Thu Nov 20, 2003 5:11 pm    Post subject: Reply with quote

units in rrdtools and normal log is different!!
Back to top
View user's profile Send private message
lowbatt
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2002
Posts: 83

PostPosted: Thu Nov 20, 2003 9:13 pm    Post subject: Reply with quote

khazad-dum wrote:
Code:

/bin/rm /etc/mrtg/cpu.cfg

/bin/cat -s > /etc/mrtg/cpu.cfg
WorkDir: /var/www/localhost/htdocs/mrtg
Options[_]: bits,growright

Target[localhost_eth0]: 2:public@localhost:
SetEnv[localhost_eth0]: MRTG_INT_IP="" MRTG_INT_DESCR="eth0"
MaxBytes[localhost_eth0]: 1250000
Title[localhost_eth0]: Title
PageTop[localhost_eth0]: <H1>PageTop</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>System</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>Maintainer</TD></TR>
   <TR><TD>Description:</TD><TD>eth0  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>xxx Mbits/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>Ip()</TD></TR>
 </TABLE>

Now just press [ctrl+d].

Try with this configuration. Give me feedback soon.

khazad-dum


Ok this worked. Of course I named it traffic.cfg. Sine I figgured cpu.cfg was a typo. Thanks alot. Ill have to compart this to the above output to see what is so diffrent about it.
_________________
Information is pure. Take a knife, for example. You can use it to cut up vegetables, butter your bread, etc. Or you can use it as a weapon. The way in which information exists in its many forms leaves for us the decision how to use it. - Maynard -TOOL
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum