MRTG and SNMP
  mrtg を動かすには
  snmpd の確認
  Links(mrtg)
  Links(ucd-snmp)
    /usr/local/share/snmp
    /etc/snmp/
  設置
    pkgsrc
    non pkgsrc
  OID
  snmpd.conf
    share/snmp/
  snmpd -h
  disk info

SNMPD & MRTG

snmpd.conf

pkgsr/net/ucd-snmp
で make したら、 /usr/pkg/share/examples/ucd-snmp/EXAMPLE.conf
を見る。
# An example configuration file for configuring the ucd-snmp snmpd agent.
# This file is intended to only be an example. If, however, you want
# to use it, it should be placed in /usr/pkg/share/snmp/snmpd.conf.
説明は man snmpd.conf で得られる。

share/snmp/

/usr/pkg/share/snmp/
ttyp5:root@harry  8:58:32/030625(...share/snmp)# ls -lag 
total 50
drwxr-xr-x   4 root  wheel    512 Jun 25 08:48 .
drwxr-xr-x  52 root  wheel   1024 Jun 25 08:48 ..
-rwxr-xr-x   1 root  wheel  10688 Jun 25 08:48 mib2c.conf
-rwxr-xr-x   1 root  wheel  26228 Jun 25 08:48 mib2c.storage.conf
-rwxr-xr-x   1 root  wheel   3568 Jun 25 08:48 mib2c.vartypes.conf
drwxr-xr-x   2 root  wheel   1536 Jun 25 08:48 mibs
drwxr-xr-x   5 root  wheel    512 Jun 25 08:48 snmpconf
cp /usr/pkg/share/examples/ucd-snmp/EXAMPLE.conf /usr/pkg/share/snmp/snmpd.conf
snmpd -H
あるいは
snmpd -H |& less
とすると、設定譜の解釈の様子を表示するので、 それを読んでいるかどうかを確認出来る。
com2sec は、 初期値としては次のように書かれている
##      sec.name  source          community
com2sec local     localhost       COMMUNITY
com2sec mynetwork NETWORK/24      COMMUNITY
このうち大文字の NETWORK は自分のネットワークに合せて、 また COMMUNITY の字は、自分で決めた名前にする。
もし変更しないでそのまま使うと、次のようになる。
/usr/pkg/share/snmp/snmpd.conf: line 61: Error: Example config COMMUNITY not properly configured
/usr/pkg/share/snmp/snmpd.conf: line 62: Error: Example config NETWORK not properly configured
Last Update: Sat, 04 May 2019 02:20:29 GMT 1.66 2008/03/08