PCZONE 討論區

PCZONE 討論區 (https://www.pczone.com.tw/vbb3/)
-   -- 網 路 技 術 版 (https://www.pczone.com.tw/vbb3/forum/29/)
-   -   SNMP Traffic Grapher STG and Online Device Monitoring (https://www.pczone.com.tw/vbb3/thread/29/144527/)

FYI 2008-11-24 06:27 AM

SNMP Traffic Grapher STG and Online Device Monitoring
 
以下介紹一個小巧免安裝的免費SNMP 流量監測軟體和一個提供免費即時監測服務的網站:[INDENT][URL="http://leonidvm.chat.ru"]SNMP Traffic Grapher STG[/URL]
[IMG]http://leonidvm.chat.ru/stg.gif[/IMG][/indent][indent][URL="http://www.odmon.com"]odmon.com - Online Device Montoring[/URL][/INDENT]使用免費即時監控, 請記得變更預設R/O 和R/W Community 密碼

[URL="http://www.pczone.com.tw/vbb3/thread/29/98462/"]【軟體】Paessler PRTG Traffic Grapher[/URL] (免費版可監控10 個介面)

FYI 2010-04-18 10:59 PM

覺得Cacti 太高深的話, 那就請試試STG, 此外, DD-WRT & OpenWrt 玩家更是應該仔細研究一下, 以下介紹幾篇文章供網友參考, 小弟自己也才剛接觸OpenWrt, 所以還不知道該如何運用, 不過對於想要學習管理網路的網友來說, 這條路是早晚要走的, 請先把STG 當作入門練習, 等熟悉後不妨先試試Paessler PRTG Traffic Grapher, 然後再考慮進階到Cacti

至於OpenWrt snmpd 套件, 建議安裝snmpd-static, 這套只需要安裝libelf, 所以檔案比較小, 而snmpd 則需要libnetsnmp

[URL="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2563"]DD-WRT Forum :: View topic - Super simple SNMP traffic graph - for dummies!!![/URL]
[URL="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=1054"]DD-WRT Forum :: View topic - SNMP OID for Active IP Connections?[/URL]
[URL="https://forum.openwrt.org/viewtopic.php?id=5728"]OpenWrt / How to find the number of Wifi Client through SNMP ??!![/URL]
[URL="http://www.wtcs.org/informant/stg.htm"]STG - SNMP Traffic Grapher - SNMP Informant[/URL] (含STG + GetIf 打包下載)
[URL="http://www.pczone.com.tw/vbb3/thread/82/146430/2/#post1087919"]Seednet FTTB 10M/2M DHCP取得IP 高雄 - PCZONE 討論區[/URL] #12 & #14

FYI 2010-04-19 09:30 AM

SNMP Traffic Grapher STG & Getif
 
剛入門的網友可能還是不知道該如何進行, 那就請看以下監看TECOM AR4031B/C 下載/上傳流量的步驟:

以瀏覽器登入TECOM AR4031B/C[LIST=1][*]點選Management -> [URL="http://192.168.1.1/snmpconfig.html"]SNMP Agent[/URL][LIST][*]SNMP Agent: Enable[*]Read Community: public[*]Trap Manager IP: 主控PC's IP[*]點擊Save/Apply[/LIST][*]Save/Reboot[/LIST]執行Getif[LIST=1][*]Parameters -> Host name 輸入Modem's IP, 例如192.168.1.1[*]點擊Start, 若SysName 並未顯示Modem 名稱, 則請回到前一步驟檢查Modem's SNMP Agent 設定[*]點擊Interfaces, 再點擊Start, 撥接用戶請檢查descr: ppp_0_33_1 或ppp_0_34_1 的int 編號, 通常為[COLOR="Red"][B]8[/B][/COLOR], 非撥接用戶請檢查descr: dsl0 的int 編號, 通常為[COLOR="Red"][B]4[/B][/COLOR], 以上就是WAN 的介面編號[*]點擊MBrowser, 再點擊Start, 數秒鐘後按Stop[LIST][*]第一行輸入 ".iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets", 再點擊Start, 於中間下方視窗找到 "interfaces.ifTable.ifEntry.ifInOctets.<介面編號>", 例如 "interfaces.ifTable.ifEntry.ifInOctets.8", 點擊一下, 則左下角出現的OID 編號代表下載流量[*]同上, 第一行輸入 ".iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets", 再點擊Start, 於中間下方視窗找到 "interfaces.ifTable.ifEntry.ifOutOctets.<介面編號>", 例如 "interfaces.ifTable.ifEntry.ifOutOctets.8", 點擊一下, 則左下角出現的OID 編號代表上傳流量[/LIST][/LIST]執行STG[LIST=1][*]點選View -> Settings[LIST][*]Target Address: 輸入Modem's IP, 例如192.168.1.1[*]Community: public[*]"Green" OID: 輸入代表下載 (In) 的OID, 例如 "1.3.6.1.2.1.2.2.1.10.[COLOR="Red"]8[/COLOR]" (通常為8 或4)[*]"Blue" OID: 輸入代表上傳 (Out) 的OID, 例如 "1.3.6.1.2.1.2.2.1.16.[COLOR="Red"]8[/COLOR]" (通常為8 或4)[*]OK[/LIST][*]點擊View -> Start 或功能鍵F7, 開始統計[*]點擊View -> Stop 或功能鍵F8, 停止統計[*]某些非增量的數值, Getif 會於MBrowser -> Type 標示為 "gauge", 例如下載頻寬 "ifSpeed (1.3.6.1.2.1.2.2.1.5.4)", 請於步驟2 對應的OID 勾選 "Gauge", 屬於增量的Type 則標示為 "counter", 請勿勾選 "Gauge", 請勿統計以上兩種以外型態的數值[*]請勿同時顯示兩種不同單位的OID, 否則其一可能很難觀察其變化[/LIST][URL="http://www.snmp4tpc.com/getif.htm"]SNMP4tPC - The Getif SNMP Utility[/URL]

FYI 2010-09-23 06:10 AM

只要懂得下指令, 就能夠透過SNMP 傳送任何數據

[URL="https://forum.openwrt.org/viewtopic.php?id=26549"]OpenWrt / Wireless Macaddress Forwarding[/URL]

FYI 2010-09-23 07:30 PM

Net-SNMP
 
如果你要找尋Windows 版的snmpwalk/snmpget/snmpgetnext, 請至 "[URL="http://net-snmp.sourceforge.net"]Net-SNMP[/URL]

RouterOS 2010-09-23 08:00 PM

回覆: SNMP Traffic Grapher STG and Online Device Monitoring
 
GOOD...........

FYI 2010-09-24 03:35 AM

少了 "小s"!?
 
小弟以Getif 讀取OpenWrt 的Parameters, 奇怪竟然會沒顯示系統資訊, 以Packetyzer 檢查, 起先完全看不懂錯誤訊息所代表的意義:
[CODE]Error Status: NO SUCH NAME (2)
Error Index: [B]7[/B]
Object identifier 1: 1.3.6.1.2.1.1.[B]1[/B].0 (SNMPv2-MIB::sysDescr.0)
Value: NULL
Object identifier 2: 1.3.6.1.2.1.1.[B]2[/B].0 (SNMPv2-MIB::sysObjectID.0)
...(43)
Object identifier 7: 1.3.6.1.2.1.1.[B]7[/B].0 (SNMPv2-MIB::sysServices.0)[/CODE]
可是執行snmpwalk 可以顯示很多訊息啊! 再比對snmpget 和snmpgetnext 的輸出, 差一點還讓小弟誤以為OpenWrt 的snmpd 套件不支援PDU type: GET (0):
[CODE]C:\usr\bin>snmpget -v1 -Cf -c public 192.168.1.254 system.sysUpTime system.sysContact.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-MIB::sysUpTime

C:\usr\bin>snmpgetnext -v1 -Cf -c public 192.168.1.254 system.sysUpTime system.sysContact.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (114090) 0:19:00.90
SNMPv2-MIB::sysName.0 = STRING: HeartOfGold[/CODE]
沒辦法只好開始翻閱文件, 從 "[URL="http://net-snmp.sourceforge.net/docs/man/snmpget.html"]Manpage of SNMPGET[/URL]" 看到 "[URL="http://net-snmp.sourceforge.net/docs/man/snmpcmd.html"]Manpage of SNMPCMD[/URL]", 最後在 "[URL="http://net-snmp.sourceforge.net/docs/man/snmpd.conf.html#lbAO"]Manpage of SNMPD.CONF[/URL] - [B]System Group[/B]" 一節, 比對小弟照抄 "[URL="https://dev.openwrt.org/browser/packages/net/net-snmp/files/snmpd.conf"]/packages/net/net-snmp/files/snmpd.conf – OpenWrt[/URL]" 的部份, 還是看不出問題為何, 但看了這三篇和先前所看過的 "[URL="http://net-snmp.sourceforge.net/docs/man/snmpwalk.html"]Manpage of SNMPWALK[/URL]" 和 "[URL="http://net-snmp.sourceforge.net/docs/man/snmpgetnext.html"]Manpage of SNMPGETNEXT[/URL]" 之後, 所謂 "臨陣磨槍, 不亮也光", 終於讓小弟有能力回頭檢視snmpget 錯誤訊息所代表的意義, 既然snmpget 會單獨挑出錯誤之處, 那麼Packetyzer 應該也會顯示才對啊! 於是再仔細研究封包內容, 是否 "Error Index: [B]7[/B]" 代表 "第[B]七[/B]個什麼東東" 有問題呢? 既然不知道答案為何, 那就把Getif 所送出的封包拆解成多個snmpget 指令, 最後才確定 "[B]sysServices.0[/B]" 有問題, 這也正是Getif 所詢問的 "第[B]七[/B]個" 參數, 接著檢視[B]/etc/conf/snmpd[/B]:
[CODE]config system
option sysLocation 'office'
option sysContact '[email protected]'
option sysName 'HeartOfGold'
# option sysServices 72
option sysDescr 'adult playground'
# option sysObjectID '1.2.3.4'[/CODE]
看起來很正常, 再檢查[B]/etc/init.d/snmpd[/B]:
[CODE]snmpd_system_add() {
local cfg="$1"
config_get syslocation "$cfg" sysLocation
[ -n "$syslocation" ] && echo "sysLocation $syslocation" >> $RUN_C
config_get syscontact "$cfg" sysContact
[ -n "$syscontact" ] && echo "sysContact $syscontact" >> $RUN_C
config_get sysname "$cfg" sysName
[ -n "$sysname" ] && echo "sysName $sysname" >> $RUN_C
config_get [B]sysservice[/B] "$cfg" [B]sysService[/B]
[ -n "[B]$sysservice[/B]" ] && echo "[B]sysService[/B] [B]$sysservice[/B]" >> $RUN_C
config_get sysdescr "$cfg" sysDescr
[ -n "$sysdescr" ] && echo "sysDescr $sysdescr" >> $RUN_C
config_get sysobjectid "$cfg" sysObjectID
[ -n "$sysobjectid" ] && echo "sysObjectID $sysobjectid" >> $RUN_C[/CODE]
這才發現 "[B]$sysservice[/B]" 和 "[B]sysService[/B]" 好像都少了 "[B][COLOR="Red"]s[/COLOR][/B]", 補上之後, 重新執行:
[CODE]/etc/init.d/snmpd restart[/CODE]
然後檢查[B]/etc/snmp/snmpd.conf[/B]:
[CODE][B]sysService[COLOR="Red"]s[/COLOR][/B] 72[/CODE]
終於有 "[B]小[COLOR="Red"]s[/COLOR][/B]" 了! 再執行:
[CODE]C:\usr\bin>snmpget -v1 -Cf -c public 192.168.1.254 sysServices.0
SNMPv2-MIB::sysServices.0 = INTEGER: 72[/CODE]
沒有錯誤訊息, 再以Getif 讀取OpenWrt 的Parameters, 至此總算完全正確

[URL="https://forum.openwrt.org/viewtopic.php?id=26678"]OpenWrt / Typo in /packages/net/net-snmp/files/snmpd.init[/URL]

FYI 2011-01-08 04:32 AM

SNMP Informant ™ Windows SNMP Extension Agents
 
感謝琥珀兄的提示, #3 [URL="http://www.snmp4tpc.com/getif.htm"]SNMP4tPC - The Getif SNMP Utility[/URL] 之中雖然有提到SNMP Informant, 不過由於目的不同, 所以當時並未引起小弟的注意, 小弟先前所提供的連結主要針對網路而言, 然而如果目標是Windows 效能統計, 那麼SNMP Informant-Standard 加上Getif 將會是不錯的組合, 記得還得下載MIBs 以供Getif 讀取[INDENT][URL="http://www.wtcs.org/informant/Free/Free-overview.htm"]SNMP Informant - Free Agents[/URL]
[QUOTE][B]SNMP Informant-Standard[/B] allows you to access data from the "Core Four" performance counters (logical disk, processor, memory and network interface), and allows you to begin monitoring them on any Windows 2000/XP/Vista/2003 system you want. As a bonus, we even threw in support for Object\Processes and Object\Threads! Click the button below for a tree listing that shows all the counters (objects and instances) you can access using SNMP Informant-Std.[/QUOTE]
[URL="http://www.wtcs.org/informant/Free/snmp-informant-std-tree.htm"]Display SNMP Informant-Std OID Tree[/URL][/INDENT][URL="http://www.snmplink.org/snmpsoftware/forenduser/"]SNMPLink.org - End-User SNMP Software[/URL]
[URL="http://www.oidview.com/mibs/detail.html"]ByteSphere's MIB Download Area[/URL]


所有時間均為 +8。現在的時間是 06:28 PM



 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。