Mrtg for Winxp設定安裝問題



贊助商連結


頁 : [1] 2 3

shung0116
2009-06-02, 02:38 PM
請教各位前輩
這是在winxp上,要安裝設定mrtg 流量管理的問題,我在一開始執行下列命令的時候
-->perl cfgmaker [email protected] > mrtg.cfg

都會出現下列錯誤訊息
-->
SNMP Error:
no response received
SNMPv1_Session <remote host:"192.168.0.11" [192.168.0.11].161>
community:"public"
request ID: 1218759401
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff:1>
at c:/mrtg/bin\..\lib\mrtg2/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.1 on [email protected]::::::v4only at cfgmaker line 950
WARNING: Skipping [email protected]: as no info could be retrieved

我試了三台電腦,但都是這樣的狀況,我看網路上有人說可以使用netstat -an來檢查161埠是否有在listening,我執行後它沒有在listening,它的狀態如下
-->0.0.0.0:161 *:*

但我有將xp的防火牆都停掉,卻也是這樣的狀況,SNMP Service/SNMP Trap Service這兩個服務都有正常啟動,但為什麼還會這樣呢?
煩請各位前輩指點
謝謝

贊助商連結


tvirus
2009-06-02, 04:02 PM
http://www.pczone.com.tw/members/33275-albums14-picture-224.png
有沒有正確設了public?

其實不是很建議用Windows架MRTG...

PS:這個是Windows 2003的畫面,XP記得也差不多

shung0116
2009-06-02, 07:50 PM
因為linux裝mrtg的方式 試不出來
很久前我有用xp設定mrtg成功過,但是現在忘記它的關鍵點 仍在測試中
謝謝

tvirus
2009-06-02, 08:07 PM
會用Linux的話...
請用Cacti
至少設定手續都是在Web上處理

shung0116
2009-06-25, 08:22 PM
請教各位前輩
我以Winxp為平台,搭配Apache 2.2/Mysql來架設cacti,依照網路介紹的方式,已經成功安裝,但是卻有下列的狀況
1.圖形無法顯示 (Memory Usage/Load Average/Logged in Users)

2.在新增裝置後,卻會產生錯誤訊息:SNMP error
(Host Template是選Windows 2000/XP Host)

在1的問題部份,我有將extension=php_gd2.dll 啟用,但是卻問題依舊,

煩請各位前輩指點
謝謝

bx2aa
2009-06-26, 05:00 PM
MRTG 安裝設定比較簡單, 只要有裝 ActivePerl-5.8.8.820-MSWin32-x86-274739.msi 在把 MRTG 解壓縮, 基本完成了.
剩下
PERL CFGMAKER
PERL INDEXMAKER
PERL MRTG

MRTG 的錯誤訊息是防火牆的問題, 或是 SNMP 沒設定對.
不然就是除了 XP 本身的防火牆關了以外其他軟體的防火牆有沒有關?

Cacti 要先確認
php.exe c:\WWW\cacti\poller.php

就是 cacti 下的 rra 內 除了 .placeholder 還有沒有產生一堆 .rrd

mysql 有沒有建對 cacti 的資料庫

create database cacti;
use cacti
source c:\WWW\cacti\cacti.sql

MySQL帳號有沒有權限 增刪改查
Grant all on *.* to "root"@"localhost";

我用的 php-5.2.5-Win32.zip
cacti-0.8.6j.zip 裏面還要修改 cmd.php
notepad c:\WWW\cacti\cmd.php

"5.2.0", PHP_VERSION, "<"
改為
"5.2.0", PHP_VERSION, ">="

都改好了確認 系統環境變數 PHPRC 和 MIBDIRS 對不對
MIBDIRS
C:\NET-SNMP\share\snmp\mibs

C:\NET-SNMP\bin>snmptranslate -IR -Td IF-MIB::linkDown
IF-MIB::linkDown
linkDown NOTIFICATION-TYPE
-- FROM IF-MIB
OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }
DESCRIPTION "A linkDown trap signifies that the SNMP entity, acting in
an agent role, has detected that the ifOperStatus object for
one of its communication links is about to enter the down
state from some other state (but not from the notPresent
state). This other state is indicated by the included value
of ifOperStatus."
::= { iso(1) org(3) dod(6) internet(1) snmpV2(6) snmpModules(3) snmpMIB(1) snmpM
IBObjects(1) snmpTraps(5) 3 }

C:\NET-SNMP\bin>snmpwalk -v 1 -c public localhost 1.3.6.1.2.1.1.3
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (504181) 1:24:01.81

C:\NET-SNMP\bin>snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.65539 = INTEGER: 65539

全部確認完畢再執行一次
進到 PHP 的目錄
php.exe c:\WWW\cacti\poller.php

然後查看 CACTI 目錄裡的 RRA 目錄裏有沒有多出 很多 .RRD

有的話圖形應該就有了.

shung0116
2009-06-28, 09:10 PM
請教前輩
snmp的檢測都有通過,但是在執行下列檢測的時候
-->C:\AppServ\php\php.exe C:\AppServ\www\cacti\poller.php

會出現下列錯誤訊息
-->Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20020429,debug=0, thread-safety=1
These options need to match
in Unknown on line 0
File 'c:\mysql\share\charsets\?.conf' not found <Errcode :22>
Character set '#33' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\index' file
X-Powered-By: PHP/4.4.7
Content-type: text/html

06/26/2009 05:35:46 PM - POLLER: Poller[0] WARNING: Scheduled Task is out ot sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Scheduled Task, but 336 seconds have passed since the last poll!

OK u:0.02 s:0.04 r:1.55
OK u:0.02 s:0.04 r:1.56
06/26/2009 05:35:49 PM - SYSTEM STATS: Time: 3.5677 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:4

OK u:0.02 s:0.04 r:2.56
OK u:0.02 s:0.04 r:2.56

而我所安裝的是Appserv v2.4.9的版本,作業系統為winxp professional, 現在的問題點是圖形有出現,但是數據卻都是呈現NA的值

煩請各位前輩指點
謝謝

shung0116
2009-07-02, 05:50 PM
mrtg的部份有進展了,但是它卻沒辦法自動排程更新曲線圖,我使用討論區的方式,如下列批次檔語法
-->

@echo off
c:
path c:\perl\bin
cd\mrtg\bin
wperl mrtg mrtg.cfg
exit

並搭配nnCron LIte工具,但是這樣執行後,C:\mrtg\bin下的mrtg.cfg並沒有更新,反而是裡頭的mrtg.ok檔案更新了,且如果我手動執行perl mrtg mrtg.cfg,它曲線圖反而會更新了 ,為什麼會有這種狀況呢?
謝謝

bx2aa
2009-07-02, 07:20 PM
圖檔內容的值要等執行兩次過後才會正常.
我的第一次產生圖檔都是 -1

RRDTool Default Font Path
我是設為 c:/windows/fonts/arial.ttf 沒設時, 圖裡面沒有字.

MRTG 的設定檔內 Global 加入

Interval: 5
RunAsDaemon: Yes

以前我是這麼用的.

CACTI 還能加裝 Plugin Weathermap 來畫圖
http://www.pczone.com.tw/attachment.php?attachmentid=18885&stc=1&d=1246705577

shung0116
2009-07-02, 09:32 PM
由於流量監視server,我是用win2008的hyperv來架設虛擬電腦,利用該電腦來安裝流量監視mrtg或cacti server,如果有hyper v能支援linux的作業系統安裝,我還是頃向用linux來安裝流量server,但可惜的是沒有支援,且現有的硬體資源不足,要用其它實體pc來安裝linux,目前也比較沒辦法
謝謝