Presentation is loading. Please wait.

Presentation is loading. Please wait.

18 Ottobre 2000 CNAFMichele Michelotto MRTG nasce per Monitoring di ROUTER Riesce a monitorare qualsiasi contatore SNMP Quindi anche la maggior parte degli.

Similar presentations


Presentation on theme: "18 Ottobre 2000 CNAFMichele Michelotto MRTG nasce per Monitoring di ROUTER Riesce a monitorare qualsiasi contatore SNMP Quindi anche la maggior parte degli."— Presentation transcript:

1 18 Ottobre 2000 CNAFMichele Michelotto MRTG nasce per Monitoring di ROUTER Riesce a monitorare qualsiasi contatore SNMP Quindi anche la maggior parte degli switch managed Ma anche computer general purpose.

2 18 Ottobre 2000 CNAFMichele Michelotto MRTG nasce per Monitoring di ROUTER Riesce a monitorare qualsiasi contatore SNMP Quindi anche la maggior parte degli switch managed Ma anche computer general purpose.

3 18 Ottobre 2000 CNAFMichele Michelotto I log files Ospd03.pd.infn.it> more garrb-16aal5.log omissis Ultimo Valore Valori recenti Valori mediati

4 18 Ottobre 2000 CNAFMichele Michelotto File di configurazione WorkDir: /d1/mrtg/html ThreshDir: /d1/mrtg/thresh Title[^]: Padova LAN - Monitoring with MRTG PageTop[^]: INFN Padova LAN devices WriteExpires: Yes WithPeak[_]: ymw # # ospd00 # PageTop[ospd00feth]: In and Out Octets on ospd00 Fast Ethernet MaxBytes[ospd00feth]: Target[ospd00feth]: #Unscaled[ospd00feth]: ymw WithPeak[ospd00feth]: ymw # USO il nome abbreviato

5 18 Ottobre 2000 CNAFMichele Michelotto La temperatura del nostro router CISCO

6 18 Ottobre 2000 CNAFMichele Michelotto File di configurazione # Temperature # MaxBytes[pdags2.temp]: 100 Target[pdags2.temp]: PageTop[pdags2.temp]: Temperatura di pdags2 Options[pdags2.temp]: gauge, noinfo, absolute, nopercent ShortLegend[pdags2.temp]: °C YLegend[pdags2.temp]: Degree Celsius Legend1[pdags2.temp]: inlet Legend2[pdags2.temp]: outlet Legend3[pdags2.temp]: max-inlet Legend4[pdags2.temp]: max-outlet LegendI[pdags2.temp]: inlet LegendO[pdags2.temp]: outlet WithPeak[pdags2.temp]: ym ThreshMaxI[pdags2.temp]: 26 ThreshProgI[pdags2.temp]: /d1/mrtg/bin/threshold2.pl ThreshProgOKI[pdags2.temp]: /d1/mrtg/bin/thresholdOK2.pl Uso l OID

7 18 Ottobre 2000 CNAFMichele Michelotto File di configurazione # # User and Process # MaxBytes[ospd00.usr.proc]: 1000 Target[ospd00.usr.proc]: PageTop[ospd00.usr.proc]: User and Process on ospd00 Current Users and Current Process < /H2> Options[ospd00.usr.proc]: gauge, noinfo, absolute, nopercent ShortLegend[ospd00.usr.proc]: unit YLegend[ospd00.usr.proc]: User and Process #Colours[ospd00.usr.proc]: BLUE#1000FF,RED#FF0000,BLUE#1000FF,RED#FF0000 Legend1[ospd00.usr.proc]: users Legend2[ospd00.usr.proc]: processes Legend3[ospd00.usr.proc]: max users Legend4[ospd00.usr.proc]: max processes LegendI[ospd00.usr.proc]: Users LegendO[ospd00.usr.proc]: Procs WithPeak[ospd00.usr.proc]: ymwd # Uso l OID

8 18 Ottobre 2000 CNAFMichele Michelotto Lo spazio su disco Non cè un contatore SNMP, si deve usare uno script

9 18 Ottobre 2000 CNAFMichele Michelotto Monitor disco locale # Spool Disk Usage on ospd03. # Target[spool.disk.alloc]: `/d1/mrtg/script/diskspace.sh /dev/rz2a` Title[spool.disk.alloc]: Disk Usage /dev/rz2a (/var) PageTop[spool.disk.alloc]: Disk Usage /dev/rz2a (/var) Options[spool.disk.alloc]: gauge, nopercent MaxBytes[spool.disk.alloc]:100 Unscaled[spool.disk.alloc]: dwmy WithPeak[spool.disk.alloc]: dwmy YLegend[spool.disk.alloc]: % Used ShortLegend[spool.disk.alloc]: % Legend1[spool.disk.alloc]: Avg Percent Diskspace Used Legend2[spool.disk.alloc]: Avg Percent Inodes Used LegendI[spool.disk.alloc]: Diskspace LegendO[spool.disk.alloc]: Inodes ThreshMaxI[spool.disk.alloc]: 65 ThreshProgI[spool.disk.alloc]: /d1/mrtg/bin/threshold2.pl ThreshProgOKI[spool.disk.alloc]: /d1/mrtg/bin/thresholdOK2.pl

10 18 Ottobre 2000 CNAFMichele Michelotto Script per disco locale !/bin/sh # by Michele Michelotto 18 Aug 1999 # Get various diskspace numbers for MRTG.# # This is the output format by df -k -i # usage: diskspace.sh Filesystem # i.e. diskpace.sh /dev/rz2a # where /dev/rz2a is the filesys. # retch=`df -k -i $1 | tail -1 | tr -d %` set $retch # break apart into fields using IFS seperators echo $5 # Percentage diskspace used echo $8 # Percentage inodes used

11 18 Ottobre 2000 CNAFMichele Michelotto Threshold !/usr/local/bin/perl # Called when MRTG detects a threshold problem for a variable. # ARGV[0] = Parameter name, such as 'mpclm1005.disk0'. # ARGV[1] = Threshold value which was breached, such as "95". # ARGV[2] = Actual current value of the parameter, such as "100". # Example: thisprogram mpclm my($timestr, $param, $thresh, $value, $message, $logfile); $timestr = localtime(time); $param = $ARGV[0]; $thresh = $ARGV[1]; $value = $ARGV[2]; $logfile = "/tmp/mrtgthresh.log"; $ prog = "/usr/bin/mailx -s 'MRTG Thresh of $param '"; $ user = # Do something meaningful with the information. # Send an message, log to a file, execute some script... if ($thresh > $value) { $abovebelow = "below"; } else { $abovebelow = "above"; } $message.= "$param ($value) is $abovebelow threshold ($thresh)"; # Log it. open(LOG, ">>$logfile"); print LOG "$timestr $message\n"; close(LOG); # it. system("echo '$message' | $ prog $ user"); exit(0);

12 18 Ottobre 2000 CNAFMichele Michelotto I mail entranti e uscenti dal mail server

13 18 Ottobre 2000 CNAFMichele Michelotto MailServer lo script !/usr/local/bin/perl5 # this script relies on the sendmail.st file being activated. # the data is called via mailstats that run out of inetd, on port open (OLD," { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://slideplayer.com/619028/2/images/slide_12.jpg", "name": "18 Ottobre 2000 CNAFMichele Michelotto MailServer lo script !/usr/local/bin/perl5 # this script relies on the sendmail.st file being activated.", "description": "# the data is called via mailstats that run out of inetd, on port 7256. open (OLD,

14 18 Ottobre 2000 CNAFMichele Michelotto MailServer lo script continua while ( ) { if ($. == "5" ) { $line = $_; ($a, $curfrm, $b, $curto, $c, $d) = split(' ',$line); # do some sums $msgsfrm = $curfrm - $oldfrm; $msgsto = $curto - $oldto; chomp $msgsfrm; chomp $msgsto; # open the old file for overwrite open (OLD,">/tmp/mailstat01.old") or die "can't open file!\n"; # print the data for mrtg print "$msgsfrm\n$msgsto\n1\nospd01\n"; # print the data to the old file print OLD "$curfrm $curto\n"; } #endif } close (SOCK) or die "close: $!"; exit; $!";

15 18 Ottobre 2000 CNAFMichele Michelotto Nellalbero di un linux noi]$ snmpwalk lxde01 public | more enterprises.ucdavis.memory.memIndex.0 = 0 enterprises.ucdavis.memory.memErrorName.0 = swap enterprises.ucdavis.memory.memTotalSwap.0 = enterprises.ucdavis.memory.memAvailSwap.0 = enterprises.ucdavis.memory.memTotalReal.0 = enterprises.ucdavis.memory.memAvailReal.0 = enterprises.ucdavis.memory.memTotalFree.0 = enterprises.ucdavis.memory.memMinimumSwap.0 = enterprises.ucdavis.memory.memShared.0 = enterprises.ucdavis.memory.memBuffer.0 = enterprises.ucdavis.memory.memCached.0 = enterprises.ucdavis.memory.memSwapError.0 = 0 enterprises.ucdavis.memory.memSwapErrorMsg.0 =

16 18 Ottobre 2000 CNAFMichele Michelotto Nellalbero di un linux enterprises.ucdavis.laTable.laEntry.laIndex.1 = 1 enterprises.ucdavis.laTable.laEntry.laIndex.2 = 2 enterprises.ucdavis.laTable.laEntry.laIndex.3 = 3 enterprises.ucdavis.laTable.laEntry.laNames.1 = Load-1 enterprises.ucdavis.laTable.laEntry.laNames.2 = Load-5 enterprises.ucdavis.laTable.laEntry.laNames.3 = Load-15 enterprises.ucdavis.laTable.laEntry.laLoad.1 = 0.36 enterprises.ucdavis.laTable.laEntry.laLoad.2 = 0.12 enterprises.ucdavis.laTable.laEntry.laLoad.3 = 0.03 enterprises.ucdavis.laTable.laEntry.laConfig.1 = enterprises.ucdavis.laTable.laEntry.laConfig.2 = enterprises.ucdavis.laTable.laEntry.laConfig.3 = enterprises.ucdavis.laTable.laEntry.laLoadInt.1 = 35 enterprises.ucdavis.laTable.laEntry.laLoadInt.2 = 11 enterprises.ucdavis.laTable.laEntry.laLoadInt.3 = 2 enterprises.ucdavis.laTable.laEntry.laLoadFloat.1 = Opaque: Float: enterprises.ucdavis.laTable.laEntry.laLoadFloat.2 = Opaque: Float: enterprises.ucdavis.laTable.laEntry.laLoadFloat.3 = Opaque: Float: enterprises.ucdavis.laTable.laEntry.laErrorFlag.1 = 0 enterprises.ucdavis.laTable.laEntry.laErrorFlag.2 = 0 enterprises.ucdavis.laTable.laEntry.laErrorFlag.3 = 0 enterprises.ucdavis.laTable.laEntry.laErrMessage.1 = enterprises.ucdavis.laTable.laEntry.laErrMessage.2 = enterprises.ucdavis.laTable.laEntry.laErrMessage.3 =

17 18 Ottobre 2000 CNAFMichele Michelotto Nellalbero di un linux enterprises.ucdavis.systemStats.ssIndex.1 = 1 enterprises.ucdavis.systemStats.ssErrorName.1 = systemStats enterprises.ucdavis.systemStats.ssSwapIn.1 = 0 enterprises.ucdavis.systemStats.ssSwapOut.1 = 0 enterprises.ucdavis.systemStats.ssIOSent.1 = 0 enterprises.ucdavis.systemStats.ssIOReceive.1 = 1 enterprises.ucdavis.systemStats.ssSysInterrupts.1 = 13 enterprises.ucdavis.systemStats.ssSysContext.1 = 15 enterprises.ucdavis.systemStats.ssCpuUser.1 = 0 enterprises.ucdavis.systemStats.ssCpuSystem.1 = 0 enterprises.ucdavis.systemStats.ssCpuIdle.1 = 14 enterprises.ucdavis.version.versionIndex.0 = 1 enterprises.ucdavis.version.versionTag.0 = enterprises.ucdavis.version.versionDate.0 = $Date: 1999/08/18 09:51:57 $ enterprises.ucdavis.version.versionCDate.0 = Tue Oct 17 12:51:

18 18 Ottobre 2000 CNAFMichele Michelotto La Farm di Delphi/CMS Uso della CPU

19 18 Ottobre 2000 CNAFMichele Michelotto La Farm di Delphi/CMS System CPU User CPU

20 18 Ottobre 2000 CNAFMichele Michelotto La Farm di Delphi/CMS Interrupt Context Switch

21 18 Ottobre 2000 CNAFMichele Michelotto La Farm di Delphi/CMS IO Sent IO Received

22 18 Ottobre 2000 CNAFMichele Michelotto La Farm di Delphi/CMS Real Memory Free Memory

23 18 Ottobre 2000 CNAFMichele Michelotto Penso sia usato anche nella farm di D.G.O.

24 18 Ottobre 2000 CNAFMichele Michelotto Possibili uso in WP2.4 Monitor di variabili SNMP in una farm Linux Script per chiedere via socket/inetd altri valori non SNMP Modifiche a SNMP su Linux per inserire nuove variabili Uso di RRD e front-end grafici separati con RRD separo la fase di acquisizione da quella di visualizzazione (on demand)

25 18 Ottobre 2000 CNAFMichele Michelotto


Download ppt "18 Ottobre 2000 CNAFMichele Michelotto MRTG nasce per Monitoring di ROUTER Riesce a monitorare qualsiasi contatore SNMP Quindi anche la maggior parte degli."

Similar presentations


Ads by Google