Search squid archive

Fwd: Squid, SNMP and MRTG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again,

before running this command pl make the mrtg working directory like
"/var/www/mrtg"

Yes, I made it. pls see below

[root@mail ~]# mkdir /var/www/mrtgnew

after making the directory run this command

cfgmaker --global 'WorkDir: /mrtg_working_dir_path/'  --output
/etc/mrtg/mrtg.cfg public@localhost

yes , I did it. pls see below

[root@mail ~]# cfgmaker --global 'WorkDir: /var/www/mrtgnew'  --output
/etc/mrtg/mrtgnew.cfg public@localhost
It worked.
then, I checked my /etc/mrtg/mrtgnew.cfg . it is a traditinal mrtg.cfg file.


after running this make a entry in /etc/mrtg/mrtg.cfg
LoadMIBs: /etc/squid/mib.txt
Yes, I added it.

this is my full /etc/mrtg/mrtgnew.cfg

[root@mail mrtgnew]# cat /etc/mrtg/mrtgnew.cfg
# Created by
# /usr/bin/cfgmaker --global 'WorkDir: /var/www/mrtgnew' --output
/etc/mrtg/mrtgnew.cfg public@localhost


### Global Config Options

#  for UNIX
# WorkDir: /home/http/mrtg

#  or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits

EnableIPv6: no
WorkDir: /var/www/mrtgnew
LoadMIBs: /etc/squid/mib.txt
######################################################################
# System: mail.douglas.lk
# Description: Linux mail.douglas.lk 2.6.9-55.EL #1 Fri Apr 20
16:35:59 EDT 2007 i686
# Contact: mrtg@xxxxxxxxxxxx
# Location: Unknown
######################################################################


### Interface 1 >> Descr: 'lo' | Name: '' | Ip: '127.0.0.1' | Eth: '' ###
### The following interface is commented out because:
### * it is a Software Loopback interface
#
# Target[localhost_1]: 1:public@localhost:
# SetEnv[localhost_1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="lo"
# MaxBytes[localhost_1]: 1250000
# Title[localhost_1]: Traffic Analysis for 1 -- mail.douglas.lk
# PageTop[localhost_1]: <H1>Traffic Analysis for 1 -- mail.douglas.lk</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>mail.douglas.lk in Unknown</TD></TR>
#    <TR><TD>Maintainer:</TD> <TD>mrtg@xxxxxxxxxxxx</TD></TR>
#    <TR><TD>Description:</TD><TD>lo  </TD></TR>
#    <TR><TD>ifType:</TD>     <TD>softwareLoopback (24)</TD></TR>
#    <TR><TD>ifName:</TD>     <TD></TD></TR>
#    <TR><TD>Max Speed:</TD>  <TD>1250.0 kBytes/s</TD></TR>
#    <TR><TD>Ip:</TD>         <TD>127.0.0.1 (localhost)</TD></TR>
#  </TABLE>


### Interface 2 >> Descr: 'eth0' | Name: '' | Ip: '192.168.122.54' |
Eth: '00-11-5b-78-db-ad' ###### The following interface is commented
out because:
### * it is operationally DOWN
#
# Target[localhost_2]: 2:public@localhost:
# SetEnv[localhost_2]: MRTG_INT_IP="192.168.122.54" MRTG_INT_DESCR="eth0"
# MaxBytes[localhost_2]: 1250000
# Title[localhost_2]: Traffic Analysis for 2 -- mail.douglas.lk
# PageTop[localhost_2]: <H1>Traffic Analysis for 2 -- mail.douglas.lk</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>mail.douglas.lk in Unknown</TD></TR>
#    <TR><TD>Maintainer:</TD> <TD>mrtg@xxxxxxxxxxxx</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>1250.0 kBytes/s</TD></TR>
#    <TR><TD>Ip:</TD>         <TD>192.168.122.54 ()</TD></TR>
#  </TABLE>


### Interface 3 >> Descr: 'eth1' | Name: '' | Ip: '192.168.4.6' | Eth:
'00-50-ba-83-41-d9' ###

Target[localhost_3]: 3:public@localhost:
SetEnv[localhost_3]: MRTG_INT_IP="192.168.4.6" MRTG_INT_DESCR="eth1"
MaxBytes[localhost_3]: 12500000
Title[localhost_3]: Traffic Analysis for 3 -- mail.douglas.lk
PageTop[localhost_3]: <H1>Traffic Analysis for 3 -- mail.douglas.lk</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>mail.douglas.lk in Unknown</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>mrtg@xxxxxxxxxxxx</TD></TR>
   <TR><TD>Description:</TD><TD>eth1  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>12.5 MBytes/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>192.168.4.6 (mail.douglas.lk)</TD></TR>
 </TABLE>


### Interface 4 >> Descr: 'sit0' | Name: '' | Ip: '' | Eth:
'00-00-00-00-41-d9' ###
### The following interface is commented out because:
### * it is administratively DOWN
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
#
# Target[localhost_4]: 4:public@localhost:
# SetEnv[localhost_4]: MRTG_INT_IP="" MRTG_INT_DESCR="sit0"
# MaxBytes[localhost_4]: 0
# Title[localhost_4]: Traffic Analysis for 4 -- mail.douglas.lk
# PageTop[localhost_4]: <H1>Traffic Analysis for 4 -- mail.douglas.lk</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>mail.douglas.lk in Unknown</TD></TR>
#    <TR><TD>Maintainer:</TD> <TD>mrtg@xxxxxxxxxxxx</TD></TR>
#    <TR><TD>Description:</TD><TD>sit0  </TD></TR>
#    <TR><TD>ifType:</TD>     <TD>Encapsulation Interface (131)</TD></TR>
#    <TR><TD>ifName:</TD>     <TD></TD></TR>
#    <TR><TD>Max Speed:</TD>  <TD>0.0 Bytes/s</TD></TR>
#  </TABLE>


and here is my /etc/snmp/snmpd.conf file

[root@mail mrtgnew]# cat /etc/snmp/snmpd.conf
com2sec local localhost public
com2sec mynetwork 192.1.54.0/24 public
com2sec mynetwork 192.168.9.0/24 public

group MyRWGroup v1 local
group MyROGroup v1 mynetwork
group MyRWGroup v1 otherv3user

view all included .1 80

access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all all

syscontact mrtg@xxxxxxxxxxxx

then , I ran below command. it worked too.

[root@mail mrtgnew]# indexmaker
--output=/var/www/mrtgnew/indexnew.html /etc/mrtg/mrtgnew.cfg

then, I ran below commands 3 times.

[root@mail mrtgnew]#  indexmaker
--output=/var/www/mrtgnew/indexnew.html /etc/mrtg/mrtgnew.cfg

[root@mail mrtgnew]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtgnew.cfg
Rateup WARNING: /usr/bin/rateup could not read the primary log file
for localhost_3
Rateup WARNING: /usr/bin/rateup The backup log file for localhost_3
was invalid as well
Rateup WARNING: /usr/bin/rateup Can't remove localhost_3.old updating log file
Rateup WARNING: /usr/bin/rateup Can't rename localhost_3.log to
localhost_3.old updating log file[root@mail mrtgnew]# env LANG=C
/usr/bin/mrtg /etc/mrtg/mrtgnew.cfg
Rateup WARNING: /usr/bin/rateup Can't remove localhost_3.old updating log file
[root@mail mrtgnew]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtgnew.cfg


But, I get traditional mrtg page. Nothing related to squid.

No LoadMIBs: /etc/squid/mib.txt file hase been loaed to that index.html page?

HELP NEEDED again?



-- 
Thank you
Indunil Jayasooriya

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux