net-snmp
net-snmpを使用してみようと調べ中
net-snmpのページから辿って「net-snmp-5.7.1」をダウンロード
以下configure
./configure --build=i386-linux --host=arm-linux --enable-mini-agent --with-endianness=little --disable-manuals --enable-as-needed --disable-embedded-perl --without-perl-modules --disable-snmptrapd-subagent --disable-applications --disable-scripts --disable-shared
組み込み機器に使用しようとしていたのでプログラムは小さい方がよいかなと思い「--enable-mini-agent」をつける…これがいけなかった
先人達を参考に、snmpwalkを使用してみる
snmpwalkで以下を取得
OID オブジェクト 1.3.6.1.2.1.1 System 1.3.6.1.2.1.11 SNMP
何か寂しい、snmpd.confを見比べても特にきになるところもなく
XXX-MIB.txtも問題ないように思える
わらからいまま数日 軽い気持ちで「--enable-mini-agent」を外してconfigure
./configure --build=i386-linux --host=arm-linux --with-endianness=little --disable-manuals --enable-as-needed --disable-embedded-perl --without-perl-modules --disable-snmptrapd-subagent --disable-applications --disable-scripts --disable-shared
長いコンパイルも終了し
snmpwalkで以下を取得
OID オブジェクト 1.3.6.1.2.1.1 System 1.3.6.1.2.1.2 Interface 1.3.6.1.2.1.3 Address Translation 1.3.6.1.2.1.4 IP 1.3.6.1.2.1.5 ICMP 1.3.6.1.2.1.6 TCP 1.3.6.1.2.1.7 UDP 1.3.6.1.2.1.11 SNMP 1.3.6.1.2.1.25 host 1.3.6.1.2.1.31 ifMIB 1.3.6.1.2.1.88 DISMAN-EVENT 1.3.6.1.2.1.92 notificationLogMIB
謎な情報も取得できたがとりあえず臭いものにはsnmpd.confで制限かけてしまえば外からはみられないからよしとしよう
configureをhelpをながめていると「--with-mib-modules」があったので使用してみた
./configure --build=i386-linux --host=arm-linux --enable-mini-agent --with-endianness=little --disable-manuals --enable-as-needed --disable-embedded-perl --without-perl-modules --disable-snmptrapd-subagent --disable-applications --disable-scripts --disable-shared --with-mib-modules="mibII"
snmpwalkで以下を取得
OID オブジェクト 1.3.6.1.2.1.1 System 1.3.6.1.2.1.2 Interface 1.3.6.1.2.1.3 Address Translation 1.3.6.1.2.1.4 IP 1.3.6.1.2.1.5 ICMP 1.3.6.1.2.1.6 TCP 1.3.6.1.2.1.7 UDP 1.3.6.1.2.1.11 SNMP 1.3.6.1.2.1.31 ifMIB
「--with-mib-modules」で必要そうなのを追加すればよさげであった
実践SNMP教科書―ネットワーク管理ツールの開発と活用 (IT TEXT)
- 作者: 山居正幸
- 出版社/メーカー: CQ出版
- 発売日: 2005/03
- メディア: 単行本
- 購入: 3人 クリック: 52回
- この商品を含むブログ (7件) を見る