Rh442-1 use snmp and mrtg to monitor the network traffic of the Linux server

  

Use snmp and mrtg to monitor the network traffic of the Linux server

<!--[if !supportLists]-->1, < ;!--[endif]-->Environment

snmpd, mrtg server: station2.example.com: 192.168.32.32

Monitored client: station3.example.com: 192.168 .32.33

<!--[if !supportLists]-->2, <!--[endif]-->snmp server-side installation and configuration (station2)

<!--[if !supportLists]-->1. <!--[endif]-->snmpInstallation

[root@station2 ~]# yum install net-snmp. I386

[root@station2 ~]#yuminstall net-snmp-devel.i386

[root@station2 ~]#yum install net-snmp-utils.i386


<!--[if !supportLists]-->2. <!--[endif]-->snmp configuration

[root@station2 ~]# snmptranslate -On SNMPv2-MIB::system

.1.3.6.1.2.1.1 #View system in mib oid#


[root@station2 ~]#cp /etc/snmp/snmpd /etc/snmp/snmpd.orig

#Back up the snmpd file. By default, the snmpconf command is run. Snmp will overwrite this file

[root@station2 ~]# snmpconf

The following installed configuration files were found:

1: ./snmpd.conf

2: /etc/snmp/snmpd.conf

Would you like me to read them in? Their content will be merged with the

output files created by this session.

Valid answer examples: "all", "none","3","1,2,5"

Read in which (default = all): 2

#Read the contents of the /etc/snmp/snmpd.conf file and add its contents to the new configuration file


I can create the following types of configuration files for you .

Select the file type you wish to create:

(you can create more than one as you run this program)

1: snmpd.conf

2: snmptrapd.conf

3: snmp.conf

Other options: quit

Select File: 1

#Select the configuration file name, The default path is in the current directory

The configuration information which can be put into snmpd.conf is divided

into sections. Select a configur Section section for snmpd.conf

that you wish to create:

1: Trap Destinations

2: System Information Setup

3: Monitor Various Aspects Of the Running Host

4: Extending the Agent

5: Access Control Setup

6: Agent Operating Mode

Other options: finished

Select section: 5

#Select the configuration type, 5 is the access configuration. To monitor the system information through snmp, you must first configure the access control


Section: Access Control Setup

Description:

This section defines who is allowed to talk to your running

snmp agent.

Select from:

1: a SNMPv3 read-write user

2: a SNMPv3 read-only user

3: a SNMPv1/SNMPv2c read-only access community name

4: a SNMPv1/SNMPv2c read-write access community name

Other options: finished, list

Select section: 3

#Scope permissions, select 3 via community (access password) Read-only access


Configuring: rocommunity

Description:

a SNMPv1/SNMPv2c read- Only access community name

arguments: community [default| Hostname| Network/bits] [oid]

The community name to add read-only access for: example

#example is community ie access password

The hostname or network address to Accept this community name from [RETURN for all]: 0.0.0.0/0 #accessible network segment

The OID that this community should be restricted to [RETURN for no-restriction]: #snmp monitoring type, Entering means monitoring all information.

Finished Output: rocommunity example 0.0.0.0/0

Section: Access Control Setup

Description:

This section defines who is allowed to talk to Your running

snmp agent.

Select from:

1: a SNMPv3 read-write user

2: a SNMPv3 read-only user

3: a SNMPv1/SNMPv2c read-only access community name

4: a SNMPv1/SNMPv2c read-write access community name

Other options: finished, list

Select section: finished #Save configuration

The configuration information which can be put into snmpd.conf is divided

into sections. Select a configuration section for snmpd.conf

that you wish to create:

1: Trap Destinations

2: System Information Setup

3: Monitor Various Aspects of the Running Host

4 : Extending the Agent

5: Access Control Setup

6: Agent Operating Mode

Other options: finished

Select section: finished

I can create the following types of configuration files for you.

Sele Ct the file type you wish to create:

(you can create more than one as you run this program)

1: snmpd.conf

2: snmptrapd.conf

3: snmp.conf


Other options: quit

Select File: quit

Error: An snmpd.conf file Already exists in this directory.

'overwrite', 'skip', 'rename' or 'append'? : overwrite #Overwrite the original configuration file

The following files were created:

snmpd.conf

These files should be moved to /usr/share/snmp if you

want them used by everyone on the system. In the future, if you add

the -i option to the command line I'll copy them there automatically for you.

Or, if you want them for your personal use only, copy them to

Copyright © Windows knowledge All Rights Reserved