這是我在windows下的安裝步驟,最后運行結果也貼出來了,回傳結果是否正確?我打開index.html檔案后已經讀取出路由器型號、埠等配置資訊,就是不顯示流量曲線圖,是什么原因?
1、 安裝ActivePerl
2、 windows下IIS服務開啟支持其web頁面的瀏覽。用“打開或關閉windows功能”選項開啟,找到ISS后勾選所有。
3、windows以及路由器上SNMP服務開啟。windows開啟方法如IIS,打開后用services.msc查看并編輯屬性中的安全選項卡,添加團體名和IP;路由器上需在snmp管理里配置團體名并選擇版本號。
4、下載MRTG,注意下載的windows版本,格式為zip格式。安裝完成后配置環境變數,并cd到bin目錄下用perl mrtg測驗,如果列印
Usage: mrtg <config-file>
mrtg-2.17.4 - Multi Router Traffic Grapher
Copyright 1995-2006 by Tobias Oetiker Licensed under the Gnu GPL. If you want to know more about this tool, you might want to read the docs. You can find everything on the mrtg website: http://oss.oetiker.ch/mrtg/則說明Perl和mrtg安裝正確。
5、運行命令列切換到mrtg的bin目錄下去指定需要監控的主機地址等相關資訊,在bin目錄執行如下命令: C:/mrtg-2.17.2/bin/perl cfgmaker [email protected] --global "workdir: c:/inetpub/wwwroot/mrtg" --output "c:/inetpub/wwwroot/mrtg/pc.cfg" 然后直接回車,cfgmaker是mrtg的命令,[email protected] 中fiberhome就是SNMP Service中配置的接受團體名稱,@后面是IP地址;workdir是指定作業目錄,而output是指定生成組態檔的輸出目錄,最后生成的組態檔以cfg后綴格式。這樣就已經配置好了監控的那臺主機的配置服務。
6、生成一個web頁面來顯示當前監控的資訊
c:\mrtg\bin>perl indexmaker c:/inetpub/wwwroot/mrtg/mrtg.cfg>c:/inetpub/wwwroot/mrtg/index.html
7、運行mrtg,執行命令
c:\mrtg\bin>perl mrtg --logging=c:/inetpub/wwwroot/mrtg/mrtg.log c:/inetpub/wwwr
oot/mrtg/mrtg.cfg
運行這個命令之后就可以在dos螢屏下看到有資料資訊在滾動,說明SNMP已經在發送和接受資訊了,這個時候可以在本地瀏覽器或者遠程流程上訪問當前的IIS服務,訪問index.html頁面,查看流量資訊,默認是5分鐘發送一次資訊。最后一步資訊如下:
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup could not read the prima
ry log file for 192.168.100.1_16777217
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup The backup log file for
192.168.100.1_16777217 was invalid as well
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't remove 192.168.100
.1_16777217.old updating log file
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't rename 192.168.100
.1_16777217.log to 192.168.100.1_16777217.old updating log file
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup could not read the prima
ry log file for 192.168.100.1_385875968
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup The backup log file for
192.168.100.1_385875968 was invalid as well
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't remove 192.168.100
.1_385875968.old updating log file
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't rename 192.168.100
.1_385875968.log to 192.168.100.1_385875968.old updating log file
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup could not read the prima
ry log file for 192.168.100.1_385875969
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup The backup log file for
192.168.100.1_385875969 was invalid as well
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't remove 192.168.100
.1_385875969.old updating log file
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't rename 192.168.100
.1_385875969.log to 192.168.100.1_385875969.old updating log file
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup could not read the prima
ry log file for 192.168.100.1_385875970
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup The backup log file for
192.168.100.1_385875970 was invalid as well
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't remove 192.168.100
.1_385875970.old updating log file
2018-01-05 13:45:05, Rateup WARNING: C:/mrtg/bin\rateup Can't rename 192.168.100
.1_385875970.log to 192.168.100.1_385875970.old updating log file
2018-01-05 13:45:06, Rateup WARNING: C:/mrtg/bin\rateup could not read the prima
ry log file for 192.168.100.1_385875971
2018-01-05 13:45:06, Rateup WARNING: C:/mrtg/bin\rateup The backup log file for
192.168.100.1_385875971 was invalid as well
2018-01-05 13:45:06, Rateup WARNING: C:/mrtg/bin\rateup Can't remove 192.168.100
.1_385875971.old updating log file
2018-01-05 13:45:06, Rateup WARNING: C:/mrtg/bin\rateup Can't rename 192.168.100
.1_385875971.log to 192.168.100.1_385875971.old updating log file
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/105301.html
標籤:網絡維護與管理
下一篇:新手求助
