Need to install some of the previous packet, namely:
- Snmp dan Snmpd SNMP and Snmpd
- Mrtg Mrtg
The step-step of installation is:
Because with debian, installation easy to do with how to:
#apt-get install snmp, snmpd, mrtg and let the process run to complete ..
because there is already at cron, so I only do we:
cp /etc/mrtg.cfg /etc/mrtg.cfg.old
cfgmaker passpublic@localhost > /etc/mrtg.cfg
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html
note :
passpublic is a community you have in /etc/snmp/snmpd.conf and make sure that snmpd is running well.
To check whether SNMP works correctly, run the following command:
snmpwalk -Os -c passpublic -v 1 localhost system
The above command will produce output like the following:
sysDescr.0 = STRING: Linux frigg 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (29668961) 3 days, 10:24:49.61
sysContact.0 = STRING: admin
sysName.0 = STRING: jenmannii
root@jenmanni:~# vim /etc/snmp/snmpd.conf
I must be edited in the command:
#sec.name source community
com2sec readonly localhost public12
com2sec readonly 203.190.40.0/24 public23
com2sec readonly 192.168.11.1/32 public23
com2sec readonly 192.168.13.2/32 public23
#sec.model sec.name
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
then restart snmp with the command:
root@tyr:~# cfgmaker public12@localhost > /etc/mrtg.cfg
root@tyr:~# snmpwalk -Os -c public12 -v 1 localhost system
sysDescr.0 = STRING: Linux tyr 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (430) 0:00:04.30
sysContact.0 = STRING: Root(configure /etc/snmp/snmpd.local.conf)
sysName.0 = STRING: tyr
sysLocation.0 = STRING: Unknown (configure /etc/snmp/snmpd.local.conf)
sysORLastChange.0 = Timeticks: (1) 0:00:00.01
sysORID.1 = OID: ifMIB
sysORID.2 = OID: snmpMIB
sysORID.3 = OID: tcpMIB
sysORID.4 = OID: ip
sysORID.5 = OID: udpMIB
sysORID.6 = OID: vacmBasicGroup
sysORID.7 = OID: snmpFrameworkMIBCompliance
sysORID.8 = OID: snmpMPDCompliance
sysORID.9 = OID: usmMIBCompliance
sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers
sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
sysORDescr.3 = STRING: The MIB module for managing TCP implementations
sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
sysORDescr.5 = STRING: The MIB module for managing UDP implementations
sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
sysORDescr.8 = STRING: The MIB for Message Processing and Dispatching.
sysORDescr.9 = STRING: The management information definitions for the SNMP User-based Security Model.
sysORUpTime.1 = Timeticks: (0) 0:00:00.00
sysORUpTime.2 = Timeticks: (1) 0:00:00.01
sysORUpTime.3 = Timeticks: (1) 0:00:00.01
sysORUpTime.4 = Timeticks: (1) 0:00:00.01
sysORUpTime.5 = Timeticks: (1) 0:00:00.01
sysORUpTime.6 = Timeticks: (1) 0:00:00.01
sysORUpTime.7 = Timeticks: (1) 0:00:00.01
sysORUpTime.8 = Timeticks: (1) 0:00:00.01
sysORUpTime.9 = Timeticks: (1) 0:00:00.01
root@tyr:~# cfgmaker public12@localhost > /etc/mrtg.cfg
root@tyr:~# indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html
than open file /etc/mrtg.cfg and at:
# to get bits instead of bytes and graphs growing to the right
Options[_]: growright, bits <<>
to test, mrtg running well, please open browser and type url : http://ip_address/mrtg.
the grow traffik run from left to right.
0 komentar:
Posting Komentar