MRTG + FireDaemon HOWTO.docx

上传人:b****5 文档编号:8202756 上传时间:2023-01-29 格式:DOCX 页数:9 大小:134.85KB
下载 相关 举报
MRTG + FireDaemon HOWTO.docx_第1页
第1页 / 共9页
MRTG + FireDaemon HOWTO.docx_第2页
第2页 / 共9页
MRTG + FireDaemon HOWTO.docx_第3页
第3页 / 共9页
MRTG + FireDaemon HOWTO.docx_第4页
第4页 / 共9页
MRTG + FireDaemon HOWTO.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

MRTG + FireDaemon HOWTO.docx

《MRTG + FireDaemon HOWTO.docx》由会员分享,可在线阅读,更多相关《MRTG + FireDaemon HOWTO.docx(9页珍藏版)》请在冰豆网上搜索。

MRTG + FireDaemon HOWTO.docx

MRTG+FireDaemonHOWTO

MRTG+FireDaemonHOWTO

OPENXTRABASICS:

AmusthavetoolsetfornetworkmanagementandsystemadministrationforMicrosoftWindows.Thepackage,whichincludesMRTG,isreadytouse,free,andavailablenow!

Introduction

MultiRouterTrafficGrapher(MRTG)isanexcellenttooltomonitorthetrafficloadonnetwork-links(amongstotherthings).ItachievesthisbyexaminingthevariousOID'sofSNMPenableddevicesthatyouspecifytoproducearangeofgraphs.

ItisrelativelyeasytosetupMRTGtorunasaserviceunderNT/2K/XP/2K3.However,beforeyoubeginwerecommendthatyourreadALLthedocumentationshippedwithMRTGandavailablefromtheMRTGmasterwebsite:

http:

//people.ee.ethz.ch/~oetiker/webtools/mrtg/

DetaileddocumentationonconfiguringMRTGunderNTcanbefoundhere:

http:

//people.ee.ethz.ch/~oetiker/webtools/mrtg/nt-guide.html

WestronglyrecommendthatyourgetMRTGgoingmanuallybeforeattemptingtorunitasaservice(ie.makeitthelaststepinyourinstallationprocess).TheexamplethatwegivebelowisverysimpleandconcentratesonconfiguringMRTGandFireDaemoncorrectly.

AttemptingtorunMRTGofforgeneratingoutputtonetworkdrivesisnotrecommended.MRTGandFireDaemonshouldbeinstalledlocally.IfyoureallyhavetouseanetworkdrivefamiliariseyourselfwiththeuseandlimitationsofUNCpathsandinstalltheserviceasalocalordomainuser.

Finally,ifyouhaven'tpatchedyourserveryetwestronglyrecommendyoudoso.ForWindowsXPHomeorProfessionalandWindowsServer2003(NT5.1and5.2)performaWindowsUpdateandinstallallCriticalUpdates.ForWindows2000(NT5.0)Professional,ServerorAdvancedServerinstallServicePack3(orlater),InternetExplorer6.0,performaWindowsUpdateandinstallallCriticalUpdates.ForWindowsNT4.0WorkstationorServerinstallServicePack6aplusanyrelevantpostSP6ahotfixesandInternetExplorer6.0.

Hardware

InthisexampleweareusinganIBMT21(PIII800Mhzw/512Mb)laptoprunningSuSELinux8.2.Win2KProfessionalSP3isbeingrununderaVMwarevirtualmachine.ThismachineisconnectedonthesameethernetsegmenttoaFoundryServerIronXL(24xFastEthernet,2xGigabitEthernet).

Software

Wedownloadedandinstalledthefollowingsoftware:

Software

Version

URL

InstallationLocation

MRTG

v2.9.29

http:

//people.ee.ethz.ch/~oetiker/webtools/mrtg/

C:

\ProgramFiles\mrtg-2.9.29

ActiveStateActivePerl

v5.8.0.806

C:

\perl

FireDaemon

v1.6GA(LiteorPro)

C:

\ProgramFiles\FireDaemon

VIM(Optional)

v6.2

http:

//www.vim.org

C:

\ProgramFiles\vim

Apache(Optional)

v2.0.45

http:

//www.apache.org/httpd/

C:

\ProgramFiles\ApacheGroup

MRTGConfiguration

YourMRTGconfigurationwillundoubtablydiffer.However,thisiswhatwedid:

SetupasimpleSNMPconfigurationunderSW:

07.1.15T12ontheServerIronXL:

snmp-servercommunitypublicro

snmp-servercommunityprivaterw

snmp-servercontactJamesBourne

snmp-serverlocationCobbitty,Australia

Wealsorecommendthatyounameyourinterfacesasappropriateusingthecommandsasfollows:

inte1

port-nameInterface1

inte2

port-nameInterface2

writemem

Thenwecreatedaconfigurationfileasfollows:

mkdirc:

\ProgramFiles\Apache2\htdocs\mrtg

cdc:

\ProgramFiles\mrtg-2.9.29\bin

perlcfgmakerpublic@10.1.251.1--outputfoundry.cfg

Theneditedfoundry.cfg:

vimfoundry.cfg

Andinsertthelinesatthestartoffileasfollows:

RunAsDaemon:

yes

Interval:

5

WorkDir:

C:

\PROGRA~1\APACHE~1\APACHE2\HTDOCS\MRTG

MRTGwon'tacceptaWorkDirwithspacesinthename.EitheruseaWorkDirpathwithnospacesorusethe8.3abbreviation.(ie.C:

\PROGRA~1\APACHE~1\APACHE2\HTDOCS\MRTG).Aquickwayofdeterminingthe8.3namingofyourpathistorunaCommandPrompt(Start/Run/cmd),thenchangedirectorytoyourWorkDir,thentype"command"-theDOSpromptwilldisplaythepathin8.3format.

Also,notethatsettingyourIntervaltolessthan5minuteswillcauseanerror.NowrunMRTGmanuallytotestyourconfigurationasfollows(youmighthavetokilloffMRTGviatheTaskManagersinceithasbeendaemonised):

perlmrtg--logging=mrtg.logfoundry.cfg

Checkyourworkdir(c:

\ProgramFiles\Apache2\htdocs\mrtg)andconfirmthatthevariousHTMLandPNGfileshavebeengeneratedandthattherearenoerrorsinthelogfile(mrtg.log).Alternately,youcanlogtotheWindowsEventLogbysubstituting"eventlog"for"mrtg.log"above.

FireDaemonConfiguration

OnceyouaresatisfiedthatyourMRTGconfigurationisdoingwhatyouwantandgeneratingtheappropriategraphs,youneedtosetitupasaservicewithFireDaemon.StarttheFireDaemonServiceManagerfromtheStart/Programsmenu:

ClickontheCreateANewServiceDefinitionbuttonintheToolbarorpressCtrl+N:

Nowfilloutthepanelasperthescreenshotbelow(adjustyourpathsandconfigurationfilenamestosuite)-youcanusetheTABorSHIFT+TABkeystomovebetweenfields:

TheninstalltheservicebyclickingontheInstallbutton.Theserviceshouldinstallwithouterrorsandstartautomatically.CheckthattheservicehasbeenstartedcorrectlybyexaminingyourprocesslistintheTaskManagerandthattheMRTGstatisticsarebeingupdated(pointyourbrowserathttp:

//localhost/mrtg/).YoucanalsochecktheNT/2K/XP/2K3eventlogforFireDaemoneventsanderrors.

IfyouwanttobereallysmartyoucanrunmultipleinstancesofMRTGonthesamemachine.Justensurethatyoucreateaservicewithadifferingname(eg.mrtg1,mrtg2etc.).ItisalsoadvisabletoconfigureeachMRTGinstanceindependantlyofeachother(ie.differingconfigurationfiles,targetHTMLdirectoriesandsoforth).YouwillneedFireDaemonProinordertorunmorethanoneservice.

WhatIfItAllGoesHorriblyWrong?

OK,soyouhaveinstalledMRTG,testedtheinstallationtothen-thdegreeandyounownoticethatyourApplicationEventLogisfillingupwithathreeFireDaemonerrormessages:

∙TheFireDaemonProcesswasStarted

∙TheServiceFailedToShutdownCorrectly...

∙SubProcessMonitoringFailed...

TheerrormessagesaregeneratedbyFireDaemon'sServiceMonitoringFacility(SMF).Inanutshell:

MRTGisdyingbecauseofamisconfiguration.Sohowdoyoudebugyourconfiguration?

Thereareseveralapproachesbutyouaregoingtoneed:

atexteditorthathandlesUnixendoflinecharacters(eg.VIM),yourtrustyPerlreferencemanualandsomepatience.

MRTGfromversions2.9.17onwardsincludeacommandlineswitch:

--logging,whichallowsalldebuggingandotheroutputtobewrittentoafile.

ThemostcommonerroristhattheMRTGconfigurationfileisbroken.Forexample,spacesinfrontofconfigurationdirectives(aslistedabove)willbreakyourMRTGinstallation.Ifyouarewritingyouroutputtoadirectorylocatedonanetworkdrivethenyouaregoingtohavetosetupyourservicetorunasalocalordomainuserwithrelevantlogonscriptstoremountthenetworkdrives(oruseUNCpaths).

BelowisoneapproachtotrackdownMRTGerrors.

∙EnsurethatyourMRTGServicehasbeenstoppedviaFireDaemonServiceManager,ServicesAppletorcommandline:

netstopmrtg

∙Ensurethatyouhaveread_ALL_theMRTGdocumentation

∙EnsurethatyouhavefollowedtheconfigurationHOWTOtoletterabove

∙Openaconsolewindow(commandprompt-Start/Run/cmd.exe)

∙ChangedirectorytoyourMRTGbinfolder(eg.C:

\ProgramFiles\mrtg-2.9.29\bin)

∙Editthefile'mrtg'withyourtexteditor(eg.vimmrtg)

∙Lookforthefollowingline:

@main:

:

DEBUG=qw();(it'saroundline18)

∙Modifythislinetoreadthefollowing:

@main:

:

DEBUG=qw(base);

∙Saveandquitoutofyourtexteditor

∙NowattempttorunMRTGdamonisedmanually:

perlmrtg--logging=mrtg.logfoundry.cfg

∙Ifyouwantevenmoredebugging:

perl-wmrtg--logging=mrtg.logfoundry.cfg(or-W)

∙Anyconfigurationorprocessingerrorswillbeeasytospot

∙Reviewthecontentsofyourlogfileifyouspecifiedthe--loggingoption

IfyourMRTGconfigurationisgoodthenyoushouldseesomethinglikethisinthelogfile:

2003-06-0603:

46:

01--Startedmrtg

2003-06-0603:

46:

01----base:

CreatingLockfilesfoundry.cfg_l,foundry.cfg_l_1724

2003-06-0603:

46:

01----base:

ReadingConfigFile:

foundry.cfg

2003-06-0603:

46:

01----base:

ReadingInterfaceConfigcache

2003-06-0603:

46:

01----base:

CheckingConfigFile

2003-06-0603:

46:

01----base:

LoadingdefaultLocale

2003-06-0603:

46:

01----base:

StartingmainLoop

2003-06-0603:

46:

01----base:

PopulateTargetobjectbypollingSNMPandexternalDatasources

2003-06-0603:

46:

01----base:

ActonRouter/Target10.1.251.1_262148

2003-06-0603:

46:

01----base:

GetCurrentvalues:

2318323,114080,0:

56:

47,FOUNDRY,1054835161)

2003-06-0603:

46:

01----base:

CreateGraphics

2003-06-0603:

46:

01----base:

CheckforThresholds

2003-06-0603:

46:

01----base:

CheckforWriteHTMLPage

Searchthroughtthisfilelookingforanyerrors.Forexample:

2003-06-0603:

47:

55--ERROR:

CFGErrorin"Interval":

shouldbeatleast5Minutes(unlessyouuserrdtool)atC:

/ProgramFiles/mrtg-2.9.29/bin\..\lib\mrtg2/MRTG_lib.pmline654.

2003-06-0603:

53:

19--ERROR:

Line9(RunAsDaemon:

yes)inCFGfile(foundry.cfg)doesnotmakesense

NetworkDrives...Ifyourworkingdirectoryorconfigurationfileislocatedonanetworkdrivethenprovidingamappeddriveletterpathisnotgoingtowork(eg.d:

\somepath).YouaregoingtohavetouseaUNCpath(ie.\\someserver\someshare).Thereasonforthisisthatmappeddrivesareonlyre-establishedatlogon.InordertogetthistoworkproperlyyoumighthavetorunMRTGinadifferentsecuritycontext(eg.DOMAIN\userforadomainorSE

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1