iT邦幫忙

0

MRTG 監測 Fortinet 設備問題

小弟新架設了一台 MRTG Server 準備替換舊有的 MRTG 但是卻發生無法監測 Fortinet 防火牆
環境:
新版 MRTG 為 v2.17.4 ,舊版 v2.15.1
snmpd.conf 有加入
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.2.2.1.10
view systemview included .1.3.6.1.2.1.2.2.1.16

在舊版執行 cfgmaker public@192.168.1.1 > mrtg.cfg 時,沒有錯誤訊息。
在新版執行 /usr/local/mrtg-2/bin/cfgmaker public@192.168.1.1 > mrtg.cfg
有下述錯誤訊息
--base: Get Device Info on public@192.168.1.1:
SNMP Error:
no response received
SNMPv1_Session (remote host: "192.168.1.1" [192.168.1.1].161)
community: "public"
request ID: 103987905
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 651
SNMPWALK Problem for 1.3.6.1.2.1.1 on public@192.168.1.1::::::v4only
at /usr/local/mrtg-2/bin/cfgmaker line 951
WARNING: Skipping public@192.168.1.1: as no info could be retrieved

Use of uninitialized value $comment_sysdescr in substitution (s///) at /usr/local/mrtg-2/bin/cfgmaker line 379.
Use of uninitialized value $sysname in concatenation (.) or string at /usr/local/mrtg-2/bin/cfgmaker line 412.
Use of uninitialized value $comment_sysdescr in concatenation (.) or string at /usr/local/mrtg-2/bin/cfgmaker line 412.
Use of uninitialized value $syscontact in concatenation (.) or string at /usr/local/mrtg-2/bin/cfgmaker line 412.
Use of uninitialized value $syslocation in concatenation (.) or string at /usr/local/mrtg-2/bin/cfgmaker line 412.

請問有大大可以幫忙解決嗎?衷心感謝!!

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

8
cafebug
iT邦高手 1 級 ‧ 2013-04-16 12:03:51
最佳解答

Fortigate的MIB module是自己家特製的, 你要去Fortinet網站(support login)下載來安裝 ..

這篇針對Fortigate的OID解釋得很清楚, 你看一下:
http://www.oidview.com/mibs/12356/FORTINET-FORTIGATE-MIB.html

看更多先前的回應...收起先前的回應...

請問下載 MIB Module 是要裝在 Fortinet 設備上,還是裝在 MRTG Server 上?

cafebug iT邦高手 1 級 ‧ 2013-04-16 16:36:50 檢舉

MIB file要放在MRTG的server上, 要載入它讓他可以找到正確的OID...

http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html
https://lists.oetiker.ch/pipermail/mrtg/2007-July/032889.html

這邊使用廠商提供的 MIB 檔,執行
/usr/local/mrtg-2/bin/cfgmaker --global "Workdir: /var/www/html/mrtg" --global "Options[_]: growright, bits" --global "LoadMIBs: /usr/local/mrtg-2/lib/fortinet.mib" --ifref=name --output /etc/mrtg.cfg public@192.168.1.1
後,出現錯誤訊息
Use of uninitialized value $t in substitution (s///) at /usr/local/mrtg-2/bin/cfgmaker line 1375.
Use of uninitialized value $t in substitution (s///) at /usr/local/mrtg-2/bin/cfgmaker line 1376.
Use of uninitialized value $t in substitution (s///) at /usr/local/mrtg-2/bin/cfgmaker line 1377.
Use of uninitialized value $fs in pattern match (m//) at /usr/local/mrtg-2/bin/cfgmaker line 1382.
Use of uninitialized value $t in hash element at /usr/local/mrtg-2/bin/cfgmaker line 1383.
,請問這樣要怎麼解決呢?

cafebug iT邦高手 1 級 ‧ 2013-04-22 10:49:24 檢舉

不知道你的MRTG是幾版的? 我查到一個類似的問題是因為版本太舊有bug之類問題存在

http://oss.oetiker.ch/mrtg-trac/ticket/1

的確是 MRTG 版本的 BUG。
小弟原本裝 2.17.4 遇到這個問題,改裝 2.16.x 的版本就正常了。
謝謝您耐心指導。

我要發表回答

立即登入回答