NetworkMonitoringwithNagiosandMRTG
Nagiosisagreatmonitoringtoolandit'scompletelyfreetoo!
NagiosrunsonLinuxandusesapluginsystemwhichmakesitperfectlycustomizeable.
AtourfacilityIworkedthelastcoupleofmonthsprimarilyonreplacingourcommercial
monitoringsystemwithNagios.WeuseNagiosformonitoringourWANandLANinfrastructure.
Itstartedouttomonitorjusttheperfomanceandavailabilityofourroutersandswitches,but
quicklyitbeguntogrowmoreandmore.WhileIdiscoverednewfeaturesandpluginsforNagios
mycolleaguesstartedtoaskmeifIcouldmonitorotherstuff.Thisresultedinagreatdealofwork,
butworkingandlearningwithNagiosisfun!
Serverandoperatingsystem
BecauseIamagreatfanofLinuxanddon'twanttouseWindowsanymoreitwasclearfromthe
startthatourmonitoringsystemwouldbebuiltonLinux.IchoosetorunaDebianUnstable
installationonaHPNetserverE800with1024mbRAM.
Softwarecomponents
Ourmonitoringsetupismadeof2components.1)NagiosforAvailabilityandServermonitoring.
2)MRTGforperformancemonitoring.AroundthesetwosystemsIwroteawebbasedshellsoit
lookslikeanintegratedsystem.
Nagiospage
Whatdowemonitor?
WemonitoralmostallourservicesforWANandLANinfrastructure.Thismeansatthemoment
almost200servicesandthisnumberisstillgrowing.Otherlocationsofourcompany(wehave4
locationswithownAdministrators,ourlocationisresponsiblefortheWANinfrastructure)are
rapidlyaskingtomonitortheirservicestoo.
Theserviceswemonitorare:
1. Serverroomtemperature(withaselfmadesensorandselfwrittensoftware)
2. WANlinks
3. Netwareservers
4. Windows2000/NTservers
MonitoringServerroom
Wemonitorourserverroomusinganserialinterfacetemperaturesensorlogger.Thiskitiseasyto
build.ThenwewroteanapplicationthatreadsouttheTemperature.Thisprogramworksunder
LinuxandNetware.Thiswaywedon'thavetosetupLinuxboxesatourremoteoffices.MRTG
readsoutthetemperaturevaluesandgraphsthemnicely.
Servertemperature
MonitoringWANlinks
FormonitoringourWANlinksweuseNagiosandMRTG.Nagiospingstheremotelocationsevery
10minutes,ifthelinkisslowerthen100mswereceiveawarning,doesitgetslowerthen500mswe
getacriticalerrormessage.MRTGreadsoutperformanceinformationofourremoterouterswith
SNMPandgraphsthem.Thiswaywecanseeexactlythebandwithutilizationofourlinks.Before
weimplementedthissolutionwereceivedalotofquestionsofourremotelocationswhytheirlines
weresloworiftheyneededanbandwithupgrade.Thiswaywecanpresentthemwithgraphicsand
theycanseefortheirselvesthattheproblemwasn'tintheWANlinkbutintheirownnetwork.
MonitoringNetware
WemonitorNetwarewithNagiosthruapluginwhichpullshisinformationfromaNetwareserver
withMRTGEXT.NLMloaded.MRTEXT.NLMisaprogramwhichyou'llloadontheserverand
collectsstatisticsfromtheserver.Thenyoucanreaditoutwiththenwstatpluginfromnagiosor
withMRTG.Weuseboth!WithNagioswereceivewarningswhenaserverhasabended,whenit's
outoftimesync,wecangetnotificationifcertainNLMsaren'tloaded(greatformonitoring
Arcserve.)WealsoreceivewarningsiftheSYS:volumehaslessthen10%freeoriftheAverage
loadover15minutesget'shigherthen90%
NagiosandNetwaremonitoring
WithMRTGwegraphandmonitortheperformanceofNetwareservers.Allthestatisticswecan
gatherwithNagiosaregraphedbyMRTGbyusingthesameMRTGEXT.NLM.
MonitoringWindowsNT/2000servers
WeuseNagiostomonitorourWindowsservers.Wepingthemiftheyarestillthereandwe
monitorifsomeapplicationsarestillrunning.Wehadoneapplicationwhichwouldkillitselfoncea
while.Nowwegetanemailmessagewhentheapplicationisunloaded.
Conclusion
NagiosandMRTGprovideuswithanessentialinsightinourNetworkperfomanceandavailability.
Ithasenabledustorespondquicklytoerrorsinournetwork,andmostimportantly:itenablesusto
solveproblemsevenbeforeanyonenoticesthereareproblems!Ifyouarethinkingofimplementing
anmonitoringsystemyoushouldtakealooktothesetogreatfreeprograms.Anothergreatexample
ofhowtheOpenSourcecommunitycanhelpyouinnetworkmanagement.
Contactinformation
IfyouhavequestionsaboutNagiosoraboutourimplementationpleasecontactme.Iamalways
availableatGjdeBoer@rocfriesepoort.nl
GertJandeBoer
NetworkAdministratorROCFriesePoort
Links
www.nagios.orgNagios
http://people.ee.ethz.ch/~oetiker/webtools/mrtg/MRTG
http://forge.novell.com/modules/xfmod/project/?mrtgextMRTGEXT.NLM