mrtg speaker: yan-shiang wang adviser: quincy wu date: 2005/11/23

24
MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

Upload: franklin-ford

Post on 29-Dec-2015

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

MRTG

Speaker: Yan-Shiang Wang

Adviser: Quincy Wu

Date: 2005/11/23

Page 2: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

2

Network Management

OSI CMIP (Common Management Information Protocol) designed 1980

SNMP de facto network management standard

Page 3: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

3

SNMP

Simple Network Management Protocol application layer protocol facilitates the exchange of

management information between network devices

part of the TCP/IP UDP port 161

Page 4: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

4

SNMP-basic components

managed devices sometimes called network elements

agents network-management software module

network-management systems (NMSs) executes applications that monitor and co

ntrol managed devices

Page 5: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

5

SNMP-basic components (cont.)

Manager Agent

SNMP SNMP

UDP UDP

IP IP

Interface Interface

network

Page 6: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

6

SNMP-basic commands

read NMS examines different variables

write NMS changes the values of variables

trap used by managed devices to asynchronously

report events to the NMS traversal operations

which variables a managed device supports sequentially gather information in variable tables

Page 7: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

7

MIB

Management Information Base collection of information that is organized

hierarchically managed object (or MIB object or MO)

scalar and tabular each resource to be managed data variable

object identifier (or object ID or OID)

Page 8: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

8

MIB (cont.)

MIB

Agent

SNMP

UDP

IP

Interface

resources

Page 9: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

9

MIB tree exampleroot

ccitt(0) iso(1) iso-ccitt(2)

standard(0) registration-authority(1)

identified-organization(3)

dod(6)

internet(1)

member-body(2)

directory(1) mgmt(2) experimental(3) private(4) security(5) snmpV2(6)

enterprise(1)

ucdavis(2021)

memory(4)

memTotalFree(11)

systemStats(11)

ssCpuRawUser(50)

Page 10: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

10

MIB tree example

memTotalFree (MO) .1.3.6.1.4.1.2021.4.11 (OID)

ssCpuRawUser (MO) .1.3.6.1.4.1.2021.11.50 (OID)

Page 11: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

11

SNMPv1

RFC-1157 operates over UDP, IP, CLNS, DDP, IPX

SMI(Structure of Management Information) RFC-1155 ASN.1 data types

name, syntax, and encoding SMI-specific data types

simple, and application-wide SNMP MIB tables

Page 12: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

12

SNMPv2

evolution of the initial version draft standard currently SMI(Structure of Management Information) RFC-1902 modules

MIB modules, compliance statements, and capability statements

Page 13: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

13

SMI(Structure of Management Information) example

/usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt memTotalFree OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Total Available Memory on the host" ::= { memory 11 }

Page 14: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

14

SMI(Structure of Management Information) example

/usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt ssCpuRawUser OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "user CPU time." ::= { systemStats 50 }

Page 15: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

15

SNMPv1 vs. SNMPv2

request/response protocol Get, GetNext, Set, and Trap

adds/enhances protocol SNMPv2 Trap GetBulk and Inform

Page 16: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

16

SNMP Service

Getretrieve objects

GetNextretrieve next objects

Setupdate objects

Trapreport events

Get Request

Get ResponseManager Agent

GetNext Request

Get ResponseManager Agent

Set Request

Get ResponseManager Agent

Trap RequestManager Agent

Page 17: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

17

GetNext

MIB Tree only leaf objects

have values

1 2 3 4 1 2

Page 18: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

18

SNMP example

snmptranslate .1.3.6.1.4.1.2021.11.50.0 OID to MO

snmptranslate -On UCD-SNMP-MIB::ssCpuRawUser.0 MO to OID

snmptranslate -Of UCD-SNMP-MIB::ssCpuRawUser.0 show total path

snmptranslate -IR ssCpuRawUser show total MO

snmptranslate -IR -Td ssCpuRawUser show MO’s content

snmptranslate -IR -Tp ucdavis show tree structure

Page 19: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

19

SNMP example (cont.)

snmpget -c mrtg -v 2c localhost ssCpuRawUser.0 -c: community -v: version target MO.0 show MO’s value

snmpgetnext -c mrtg -v 2c localhost ssCpuRawUser.0 show MO’s next relative value

snmpwalk -v 2c -c mrtg localhost show all system MO’s value

snmpwalk -v 2c -c mrtg localhost systemStats show MO’s family value

snmptable -v 2c -Cw 80 -c mrtg localhost sysORTable -Cw: width show MO’s value (tabular)

snmptable -v 2c -Cw 80 -c mrtg localhost dskTable show MO’s value (tabular)

Page 20: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

20

MRTG

Multi Router Traffic Grapher required

net-snmp libpng: png library gd: draw graph zlib: zip graph perl apache

Page 21: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

21

MRTG - configure

/usr/local/share/snmp/snmpd.conf rocommunity mrtg syslocation Lab syscontact root@localhost

cfgmaker mrtg@localhost > mrtg.cfg mrtg mrtg.cfg indexmaker -output index.html mrtg.cfg

Page 22: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

22

MRTG - addition

CPU Utilization systemStats::ssCpuRawUser.0

Memory Usage memory::memAvailReal.0

Disk Usage dskTable::dskPercent.0

Page 23: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

23

Page 24: MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23

24