FC2ブログ

スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

SNMPTT その1

1. SNMPTT とは

snmptrapd では format1 / format2 オプションでログのフォーマットを指定することができますが、全てのトラップに対して共通のフォーマットが適用されるため、一般的な NMS のようにトラップごとの細かい制御を行うことができません。

例えば、snmptrapd に以前紹介したフォーマットを適用してトラップを受信した際のログは以下のようになります。

2011/7/9 17:57:46
 hostname = "Router6"
 source = "UDP: [10.0.6.2]:57705"
 security = "TRAP2, SNMP v2c, community public"
 variable-bindings:
 + sysUpTimeInstance = 0:6:52:05.03
 + snmpTrapOID.0 = cHsrpStateChange
 + cHsrpGrpStandbyState.1.1 = initial

2011/7/9 17:57:48
 hostname = "Router6"
 source = "UDP: [10.0.6.2]:57705"
 security = "TRAP2, SNMP v2c, community public"
 variable-bindings:
 + sysUpTimeInstance = 0:6:52:07.98
 + snmpTrapOID.0 = linkDown
 + ifIndex.1 = 1
 + ifDescr.1 = FastEthernet1/0
 + ifType.1 = ethernetCsmacd
 + locIfReason.1 = "administratively down"

2011/7/9 17:57:56
 hostname = "Router6"
 source = "UDP: [10.0.6.2]:57705"
 security = "TRAP2, SNMP v2c, community public"
 variable-bindings:
 + sysUpTimeInstance = 0:6:52:15.99
 + snmpTrapOID.0 = linkUp
 + ifIndex.1 = 1
 + ifDescr.1 = FastEthernet1/0
 + ifType.1 = ethernetCsmacd
 + locIfReason.1 = "up"

2011/7/9 17:58:15
 hostname = "Router6"
 source = "UDP: [10.0.6.2]:57705"
 security = "TRAP2, SNMP v2c, community public"
 variable-bindings:
 + sysUpTimeInstance = 0:6:52:34.55
 + snmpTrapOID.0 = cHsrpStateChange
 + cHsrpGrpStandbyState.1.1 = active

一方、代表的な NMS の一つである HP 社の NNMi 9.1 では同様のトラップが以下のように表示されます。

snmptt_1-1.png

トラップ管理という観点から見た NNM と snmptrapd の機能差異として、大きく以下の 4 点が挙げられます。

① メッセージのフォーマットをトラップごとに指定できる。
② 受信したトラップの VarBind をメッセージの任意の場所に挿入できる。
③ 重要度、カテゴリなどの付加情報を指定できる。
④ イベント管理用のコンソール GUI を備えている。

これらのうち、snmptrapd に不足している①~③の機能を補うツールが SNMPTT です。④については Nagios や Splunk のような外部ツールに SNMPTT が出力するログを渡すことで実現すればよいでしょう。

上記のトラップを SNMPTT 経由でログに出力した場合、メッセージは以下のようになります。

Sat Jul  9 19:59:13 2011 cHsrpStateChange Warning "Status Events" Router6 - HSRP グループの 状態が変化しました。状態:initial
Sat Jul  9 19:59:16 2011 linkDown Critical "Status Events" Router6 - インターフェース FastEthernet1/0 が停止しました。ステータス:administratively down
Sat Jul  9 19:59:28 2011 linkUp Normal "Status Events" Router6 - インターフェース FastEthernet1/0 が動作を開始しました。ステータス:up
Sat Jul  9 19:59:46 2011 cHsrpStateChange Warning "Status Events" Router6 - HSRP グループの 状態が変化しました。状態:active

今回は、CentOS 6 に SNMPTT 1.3 をインストールし、一般トラップと幾つかの Cisco トラップを監視できるようセットアップを行うところまでを解説します。

2. 前提条件の確認

SNMPTT は snmptrapd の利用を前提とした Perl ベースのツールのため、インストールする前に Net-SNMP と Perl 本体、いくつかの Perl モジュールのインストールを済ませておく必要があります。

以下は、バージョン 1.3 の前提条件です。最新の情報についてはこちらでご確認ください。

必須モジュール:
Perl 5.6.1 以降
SNMPTT は 5.6.1 および 5.8.0 で開発されていますが、異なるバージョンの Perl でも動作するでしょう。
Net-SNMP
以前は UCD-SNMP という名称でした。特に snmptrapd が必要となります。
Text::ParseWords モジュール
多くのディストリビューションに標準で含まれています(ActivePerl を含む)。
Getopt::Long モジュール
多くのディストリビューションに標準で含まれています(ActivePerl を含む)。
Posix モジュール
多くのディストリビューションに標準で含まれています(ActivePerl などの一部のディストリビューションを除く)。
Config::IniFiles モジュール
Time::HiRes モジュール
SNMPTT をデーモンモードで動作させる際にのみ必要となります(snmptthandler によって使用されます)。
Sys::Hostname モジュール
多くのディストリビューションに標準で含まれています(ActivePerl などの一部のディストリビューションを除く)。
File::Basename モジュール
多くのディストリビューションに標準で含まれています(ActivePerl などの一部のディストリビューションを除く)。
Text::Balanced モジュール
多くのディストリビューションに標準で含まれています(ActivePerl などの一部のディストリビューションを除く)。

オプションモジュール:
Socket モジュール
多くのディストリビューションに標準で含まれています(ActivePerl などの一部のディストリビューションを除く)。
DNS による名前解決に必要となります。
Sys::Syslog モジュール
多くの UNIX ディストリビューションに含まれています。
Syslog サポートに必要となります。
DBI モジュール
DBD::MySQL, DBD::PgPP, DBD::ODBC サポートに必要となります。
DBD::mysql モジュール
MySQL サポートに必要となります。
DBD::PgPP もしくは DBD:Pg モジュール
PostgreSQL サポートに必要となります。
DBD::ODBC モジュール
Linux / Windows での ODBC アクセスに必要となります(DBD::ODBC を使用する場合には Win32::ODBC は不要です)。
Win32::ODBC モジュール
Windows での ODBC アクセスに必要となります(Win32::ODBC を使用する場合には DBD::ODBC は不要です)。
Net-SNMP Perl モジュール
数値形式の OID をシンボル名(文字列)に変換するために必要となります。
パッチ 722075 を適用した Net-SNMP 5.0.8 以降、もしくは Net-SNMP 5.1.1 以降の利用が推奨されます。
なお、本モジュールは CPAN からダウンロードできる Net::SNMP とは異なるものです。
threads 及び Thread モジュール
多くのディストリビューションに標準で含まれています(ActivePerl などの一部のディストリビューションを除く)。
EXEC ステートメントでのコマンド実行のために threads (マルチスレッド機能)を有効化する場合に必要となります。
Digest::MD5 モジュール
多くのディストリビューションに標準で含まれています(ActivePerl などの一部のディストリビューションを除く)。
トラップの重複検知機能を有効化する場合に必要となります。
snmptrapd の組み込み Perl サポート
snmptthandler-embedded を利用するには、Net-SNMP のコンパイル時に snmptrapd の組み込み Perl サポート ("--enable-embedded-perl" オプション)が有効化されている必要があります。


① Perl のセットアップ

今回は OS インストール時に Minimal を選択しているため、上記前提モジュールが殆どインストールされていない状態ですので、まずは Perl 本体のインストールから行っていきます。また、あわせて CPAN モジュール及び yum からインストール可能な必須モジュールについてもインストールしてしまいます。

[root@centos6 ~]# yum install perl perl-CPAN perl-YAML perl-Module-Build perl-Time-HiRes
~省略~
==========================================================================================
 Package                        Arch          Version                   Repository   Size
==========================================================================================
Installing:
 perl                           x86_64        4:5.10.1-115.el6          base         10 M
 perl-CPAN                      x86_64        1.9402-115.el6            base        243 k
 perl-Module-Build              x86_64        1:0.3500-115.el6          base        226 k
 perl-Time-HiRes                x86_64        4:1.9721-115.el6          base         45 k
 perl-YAML                      noarch        0.70-4.el6                base         81 k
Installing for dependencies:
 perl-Archive-Tar               x86_64        1.58-115.el6              base         69 k
 perl-Compress-Raw-Zlib         x86_64        2.023-115.el6             base         66 k
 perl-Compress-Zlib             x86_64        2.020-115.el6             base         42 k
 perl-ExtUtils-CBuilder         x86_64        1:0.27-115.el6            base         44 k
 perl-ExtUtils-MakeMaker        x86_64        6.55-115.el6              base        289 k
 perl-ExtUtils-ParseXS          x86_64        1:2.2003.0-115.el6        base         41 k
 perl-IO-Compress-Base          x86_64        2.020-115.el6             base         65 k
 perl-IO-Compress-Zlib          x86_64        2.020-115.el6             base        132 k
 perl-IO-Zlib                   x86_64        1:1.09-115.el6            base         29 k
 perl-Module-Pluggable          x86_64        1:3.90-115.el6            base         36 k
 perl-Package-Constants         x86_64        1:0.02-115.el6            base         23 k
 perl-Pod-Escapes               x86_64        1:1.04-115.el6            base         29 k
 perl-Pod-Simple                x86_64        1:3.13-115.el6            base        208 k
 perl-Test-Harness              x86_64        3.17-115.el6              base        228 k
 perl-devel                     x86_64        4:5.10.1-115.el6          base        419 k
 perl-libs                      x86_64        4:5.10.1-115.el6          base        576 k
 perl-version                   x86_64        3:0.77-115.el6            base         48 k

Transaction Summary
==========================================================================================
Install      22 Package(s)
Upgrade       0 Package(s)

Total download size: 13 M
Installed size: 41 M
Is this ok [y/N]: y
~省略~
Installed:
  perl.x86_64 4:5.10.1-115.el6                 perl-CPAN.x86_64 0:1.9402-115.el6
  perl-Module-Build.x86_64 1:0.3500-115.el6    perl-Time-HiRes.x86_64 4:1.9721-115.el6
  perl-YAML.noarch 0:0.70-4.el6

Dependency Installed:
  perl-Archive-Tar.x86_64 0:1.58-115.el6
  perl-Compress-Raw-Zlib.x86_64 0:2.023-115.el6
  perl-Compress-Zlib.x86_64 0:2.020-115.el6
  perl-ExtUtils-CBuilder.x86_64 1:0.27-115.el6
  perl-ExtUtils-MakeMaker.x86_64 0:6.55-115.el6
  perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-115.el6
  perl-IO-Compress-Base.x86_64 0:2.020-115.el6
  perl-IO-Compress-Zlib.x86_64 0:2.020-115.el6
  perl-IO-Zlib.x86_64 1:1.09-115.el6
  perl-Module-Pluggable.x86_64 1:3.90-115.el6
  perl-Package-Constants.x86_64 1:0.02-115.el6
  perl-Pod-Escapes.x86_64 1:1.04-115.el6
  perl-Pod-Simple.x86_64 1:3.13-115.el6
  perl-Test-Harness.x86_64 0:3.17-115.el6
  perl-devel.x86_64 4:5.10.1-115.el6
  perl-libs.x86_64 4:5.10.1-115.el6
  perl-version.x86_64 3:0.77-115.el6

Complete!

インストール済みのモジュールを確認します。

[root@centos6 ~]# find `perl -e 'print "@INC"'` -name '*.pm' -print | egrep "(Text/ParseWords|Getopt/Long|Posix|Config/IniFiles|Time/HiRes|Sys/Hostname|File/Basename|Text/Balanced|Socket|Sys/Syslog|DBI|DBD/mysql|DBD/PgPP|DBD/Pg|DBD/ODBC|Win32/ODBC|threads|Thread)\.pm"
/usr/lib64/perl5/threads.pm
/usr/lib64/perl5/Time/HiRes.pm
/usr/lib64/perl5/Sys/Syslog.pm
/usr/lib64/perl5/Sys/Hostname.pm
/usr/lib64/perl5/Socket.pm
/usr/lib64/perl5/IO/Socket.pm
/usr/share/perl5/File/Basename.pm
/usr/share/perl5/Text/Balanced.pm
/usr/share/perl5/Text/ParseWords.pm
/usr/share/perl5/Thread.pm
/usr/share/perl5/Getopt/Long.pm

必須モジュールの Config::IniFiles が不足しているため、CPAN からインストールを行います。

CPAN を起動する前に、CPAN によって使用されるパッケージをいくつかインストールしておきます。

ここでは標準のレポジトリからダウンロード可能なコマンドのみをインストールしていますが、ncftp 等もインストールしたい場合は EPEL を有効にするとよいでしょう。

[root@centos6 ~]# which bzip2 gzip tar unzip make curl lynx wget ftp gpg patch gcc
/usr/bin/bzip2
/bin/gzip
/bin/tar
/usr/bin/which: no unzip in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
/usr/bin/which: no make in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
/usr/bin/curl
/usr/bin/which: no lynx in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
/usr/bin/which: no wget in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
/usr/bin/which: no ftp in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
/usr/bin/gpg
/usr/bin/which: no patch in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
/usr/bin/which: no gcc in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@centos6 ~]# yum install unzip make lynx wget ftp patch gcc
~省略~
==========================================================================================
 Package                  Arch           Version                    Repository       Size
==========================================================================================
Installing:
 ftp                      x86_64         0.17-51.1.el6              base             57 k
 gcc                      x86_64         4.4.4-13.el6               base             10 M
 lynx                     x86_64         2.8.6-27.el6               base            1.3 M
 make                     x86_64         1:3.81-19.el6              base            389 k
 patch                    x86_64         2.6-6.el6                  base             90 k
 unzip                    x86_64         6.0-1.el6                  base            149 k
 wget                     x86_64         1.12-1.4.el6               base            481 k
Installing for dependencies:
 centos-indexhtml         noarch         6-1.el6.centos             base             70 k
 cloog-ppl                x86_64         0.15.7-1.2.el6             base             93 k
 cpp                      x86_64         4.4.4-13.el6               base            3.7 M
 glibc-devel              x86_64         2.12-1.7.el6_0.5           updates         961 k
 glibc-headers            x86_64         2.12-1.7.el6_0.5           updates         592 k
 kernel-headers           x86_64         2.6.32-71.29.1.el6         updates         991 k
 libgomp                  x86_64         4.4.4-13.el6               base            108 k
 mpfr                     x86_64         2.4.1-6.el6                base            157 k
 ppl                      x86_64         0.10.2-11.el6              base            1.3 M
Updating for dependencies:
 glibc                    x86_64         2.12-1.7.el6_0.5           updates         3.7 M
 glibc-common             x86_64         2.12-1.7.el6_0.5           updates          14 M

Transaction Summary
==========================================================================================
Install      16 Package(s)
Upgrade       2 Package(s)

Total download size: 38 M
Is this ok [y/N]: y
~省略~
Installed:
  ftp.x86_64 0:0.17-51.1.el6    gcc.x86_64 0:4.4.4-13.el6    lynx.x86_64 0:2.8.6-27.el6
  make.x86_64 1:3.81-19.el6     patch.x86_64 0:2.6-6.el6     unzip.x86_64 0:6.0-1.el6
  wget.x86_64 0:1.12-1.4.el6

Dependency Installed:
  centos-indexhtml.noarch 0:6-1.el6.centos   cloog-ppl.x86_64 0:0.15.7-1.2.el6
  cpp.x86_64 0:4.4.4-13.el6                  glibc-devel.x86_64 0:2.12-1.7.el6_0.5
  glibc-headers.x86_64 0:2.12-1.7.el6_0.5    kernel-headers.x86_64 0:2.6.32-71.29.1.el6
  libgomp.x86_64 0:4.4.4-13.el6              mpfr.x86_64 0:2.4.1-6.el6
  ppl.x86_64 0:0.10.2-11.el6

Dependency Updated:
  glibc.x86_64 0:2.12-1.7.el6_0.5          glibc-common.x86_64 0:2.12-1.7.el6_0.5

Complete!
[root@centos6 ~]# which bzip2 gzip tar unzip make curl lynx wget ftp gpg patch gcc
/usr/bin/bzip2
/bin/gzip
/bin/tar
/usr/bin/unzip
/usr/bin/make
/usr/bin/curl
/usr/bin/lynx
/usr/bin/wget
/usr/bin/ftp
/usr/bin/gpg
/usr/bin/patch
/usr/bin/gcc

CPAN を起動して初期セットアップを行います。ここではマニュアルで各種パラメータの指定を行っていますが、面倒な場合は最初の質問に yes と答えて自動設定に任せてもよいでしょう。

[root@centos6 ~]# cpan


CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.

If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)
Would you like me to configure as much as possible automatically? [yes] no


The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.



First of all, I'd like to create this directory. Where?

 
CPAN build and cache directory? [/root/.cpan]

Unless you are accessing the CPAN on your filesystem via a file: URL,
CPAN.pm needs to keep the source files it downloads somewhere. Please
supply a directory where the downloaded files are to be kept.

 
Download target directory? [/root/.cpan/sources]

 
Directory where the build process takes place? [/root/.cpan/build]

Until version 1.88 CPAN.pm never trusted the contents of the build_dir
directory between sessions. Since 1.88_58 CPAN.pm has a YAML-based
mechanism that makes it possible to share the contents of the
build_dir/ directory between different sessions with the same version
of perl. People who prefer to test things several days before
installing will like this feature because it safes a lot of time.

If you say yes to the following question, CPAN will try to store
enough information about the build process so that it can pick up in
future sessions at the same state of affairs as it left a previous
session.

 
Store and re-use state information about distributions between
CPAN.pm sessions? [no]

CPAN.pm can store customized build environments based on regular
expressions for distribution names. These are YAML files where the
default options for CPAN.pm and the environment can be overridden and
dialog sequences can be stored that can later be executed by an
Expect.pm object. The CPAN.pm distribution comes with some prefab YAML
files that cover sample distributions that can be used as blueprints
to store one own prefs. Please check out the distroprefs/ directory of
the CPAN.pm distribution to get a quick start into the prefs system.

 
Directory where to store default options/environment/dialogs for
building modules that need some customization? [/root/.cpan/prefs]

Normally CPAN.pm keeps config variables in memory and changes need to
be saved in a separate 'o conf commit' command to make them permanent
between sessions. If you set the 'auto_commit' option to true, changes
to a config variable are always automatically committed to disk.

 
Always commit changes to config variables to disk? [no] yes

CPAN.pm can limit the size of the disk area for keeping the build
directories with all the intermediate files.

 
Cache size for build directory (in MB)? [100]

The CPAN indexes are usually rebuilt once or twice per hour, but the
typical CPAN mirror mirrors only once or twice per day. Depending on
the quality of your mirror and your desire to be on the bleeding edge,
you may want to set the following value to more or less than one day
(which is the default). It determines after how many days CPAN.pm
downloads new indexes.

 
Let the index expire after how many days? [1]

By default, each time the CPAN module is started, cache scanning is
performed to keep the cache size in sync. To prevent this, answer
'never'.

 
Perform cache scanning (atstart or never)? [atstart]

To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable is
not available, the normal index mechanism will be used.

Note: this mechanism is not used when use_sqlite is on and SQLLite is
running.

 
Cache metadata (yes/no)? [yes]

CPAN::SQLite is a layer between the index files that are downloaded
from the CPAN and CPAN.pm that speeds up metadata queries and reduces
memory consumption of CPAN.pm considerably.

 
Use CPAN::SQLite if available? (yes/no)? [no]

The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.

 
Policy on building prerequisites (follow, ask or ignore)? [ask]

When a module declares another one as a 'build_requires' prerequisite
this means that the other module is only needed for building or
testing the module but need not be installed permanently. In this case
you may wish to install that other module nonetheless or just keep it
in the 'build_dir' directory to have it available only temporarily.
Installing saves time on future installations but makes the perl
installation bigger.

You can choose if you want to always install (yes), never install (no)
or be always asked. In the latter case you can set the default answer
for the question to yes (ask/yes) or no (ask/no).

 
Policy on installing 'build_requires' modules (yes, no, ask/yes,
ask/no)? [ask/yes]

CPAN packages can be digitally signed by authors and thus verified
with the security provided by strong cryptography. The exact mechanism
is defined in the Module::Signature module. While this is generally
considered a good thing, it is not always convenient to the end user
to install modules that are signed incorrectly or where the key of the
author is not available or where some prerequisite for
Module::Signature has a bug and so on.

With the check_sigs parameter you can turn signature checking on and
off. The default is off for now because the whole tool chain for the
functionality is not yet considered mature by some. The author of
CPAN.pm would recommend setting it to true most of the time and
turning it off only if it turns out to be annoying.

Note that if you do not have Module::Signature installed, no signature
checks will be performed at all.

 
Always try to check and verify signatures if a SIGNATURE file is in
the package and Module::Signature is installed (yes/no)? [no]

The goal of the CPAN Testers project (http://testers.cpan.org/) is to
test as many CPAN packages as possible on as many platforms as
possible.  This provides valuable feedback to module authors and
potential users to identify bugs or platform compatibility issues and
improves the overall quality and value of CPAN.

One way you can contribute is to send test results for each module
that you install.  If you install the CPAN::Reporter module, you have
the option to automatically generate and email test reports to CPAN
Testers whenever you run tests on a CPAN package.

See the CPAN::Reporter documentation for additional details and
configuration settings.  If your firewall blocks outgoing email,
you will need to configure CPAN::Reporter before sending reports.

 
Email test reports if CPAN::Reporter is installed (yes/no)? [no]

When a distribution has already been tested by CPAN::Reporter on
this machine, CPAN can skip the test phase and just rely on the
test report history instead.

Note that this will not apply to distributions that failed tests
because of missing dependencies.  Also, tests can be run
regardless of the history using "force".

 
Do you want to rely on the test report history (yes/no)? [no]

At the time of this writing (2009-03) there are three YAML
implementations working: YAML, YAML::Syck, and YAML::XS. The latter
two are faster but need a C compiler installed on your system. There
may be more alternative YAML conforming modules. When I tried two
other players, YAML::Tiny and YAML::Perl, they seemed not powerful
enough to work with CPAN.pm. This may have changed in the meantime.

 
Which YAML implementation would you prefer? [YAML]

Warning (maybe harmless): 'YAML' not installed.
Both YAML.pm and YAML::Syck are capable of deserialising code. As this
requires a string eval, which might be a security risk, you can use
this option to enable or disable the deserialisation of code via
CPAN::DeferredCode. (Note: This does not work under perl 5.6)

 
Do you want to enable code deserialisation (yes/no)? [no]



The CPAN module will need a few external programs to work properly.
Please correct me, if I guess the wrong path for a program. Don't
panic if you do not have some of them, just press ENTER for those. To
disable the use of a program, you can type a space followed by ENTER.

 
Where is your bzip2 program? [/usr/bin/bzip2]

 
Where is your gzip program? [/bin/gzip]

 
Where is your tar program? [/bin/tar]

 
Where is your unzip program? [/usr/bin/unzip]

 
Where is your make program? [/usr/bin/make]

 
Where is your curl program? [/usr/bin/curl]

 
Where is your lynx program? [/usr/bin/lynx]

 
Where is your wget program? [/usr/bin/wget]

Warning: ncftpget not found in PATH[/usr/local/sbin;/usr/local/bin;/sbin;/bin;/usr/sbin;/sr/bin;/root/bin]
 
Where is your ncftpget program? []

Warning: ncftp not found in PATH[/usr/local/sbin;/usr/local/bin;/sbin;/bin;/usr/sbin;/usrbin;/root/bin]
 
Where is your ncftp program? []

 
Where is your ftp program? [/usr/bin/ftp]

 
Where is your gpg program? [/usr/bin/gpg]

 
Where is your patch program? [/usr/bin/patch]

Warning: applypatch not found in PATH[/usr/local/sbin;/usr/local/bin;/sbin;/bin;/usr/sbin/usr/bin;/root/bin]
 
Where is your applypatch program? []

 
What is your favorite pager program? [/usr/bin/less]

 
What is your favorite shell? [/bin/bash]

When CPAN.pm uses the tar command, which switch for the verbosity
shall be used? Choose 'none' for quiet operation, 'v' for file
name listing, 'vv' for full listing.

 
Tar command verbosity level (none or v or vv)? [v]

When CPAN.pm loads a module it needs for some optional feature, it
usually reports about module name and version. Choose 'v' to get this
message, 'none' to suppress it.

 
Verbosity level for loading modules (none or v)? [v]

When CPAN.pm extends @INC via PERL5LIB, it prints a list of
directories added (or a summary of how many directories are
added).  Choose 'v' to get this message, 'none' to suppress it.

 
Verbosity level for PERL5LIB changes (none or v)? [v]

When the CPAN shell is started it normally displays a greeting message
that contains the running version and the status of readline support.

 
Do you want to turn this message off? [no]

When you have Module::Build installed and a module comes with both a
Makefile.PL and a Build.PL, which shall have precedence?

The main two standard installer modules are the old and well
established ExtUtils::MakeMaker (for short: EUMM) which uses the
Makefile.PL. And the next generation installer Module::Build (MB)
which works with the Build.PL (and often comes with a Makefile.PL
too). If a module comes only with one of the two we will use that one
but if both are supplied then a decision must be made between EUMM and
MB. See also http://rt.cpan.org/Ticket/Display.html?id=29235 for a
discussion about the right default.

Or, as a third option you can choose RAND which will make a random
decision (something regular CPAN testers will enjoy).

 
In case you can choose between running a Makefile.PL or a Build.PL,
which installer would you prefer (EUMM or MB or RAND)? [MB]

Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in separate processes. If you have
any parameters (e.g. PREFIX, UNINST or the like) you want to
pass to the calls, please specify them here.

If you don't understand this question, just press ENTER.

Typical frequently used settings:

    PREFIX=~/perl    # non-root users (please see manual for more hints)

 
Parameters for the 'perl Makefile.PL' command? [INSTALLDIRS=site]

Parameters for the 'make' command? Typical frequently used setting:

    -j3              # dual processor system (on GNU make)

 
Your choice: []

Do you want to use a different make command for 'make install'?
Cautious people will probably prefer:

    su root -c make
 or
    sudo make
 or
    /path1/to/sudo -u admin_account /path2/to/make

 
or some such. Your choice: [/usr/bin/make]

Parameters for the 'make install' command?
Typical frequently used setting:

    UNINST=1         # to always uninstall potentially conflicting files

 
Your choice: [] UNINST=1

A Build.PL is run by perl in a separate process. Likewise we run
'./Build' and './Build install' in separate processes. If you have any
parameters you want to pass to the calls, please specify them here.

Typical frequently used settings:

    --install_base /home/xxx             # different installation directory

 
Parameters for the 'perl Build.PL' command? [--installdirs site]

Parameters for the './Build' command? Setting might be:

    --extra_linker_flags -L/usr/foo/lib  # non-standard library location

 
Your choice: []

Do you want to use a different command for './Build install'? Sudo
users will probably prefer:

    su root -c ./Build
 or
    sudo ./Build
 or
    /path1/to/sudo -u admin_account ./Build

 
or some such. Your choice: [./Build]

Parameters for the './Build install' command? Typical frequently used
setting:

    --uninst 1                           # uninstall conflicting files

 
Your choice: [] --uninst 1

Sometimes you may wish to leave the processes run by CPAN alone
without caring about them. Because the Makefile.PL or the Build.PL
sometimes contains question you're expected to answer, you can set a
timer that will kill a 'perl Makefile.PL' process after the specified
time in seconds.

If you set this value to 0, these processes will wait forever. This is
the default and recommended setting.

 
Timeout for inactivity during {Makefile,Build}.PL? [0]

Normaly, CPAN.pm continues processing the full list of targets and
dependencies, even if one of them fails.  However, you can specify
that CPAN should halt after the first failure.

 
Do you want to halt on failure (yes/no)? [no]



If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

 
Your ftp_proxy? []

 
Your http_proxy? []

 
Your no_proxy? []

 
Shall we always set the FTP_PASSIVE environment variable when dealing
with ftp download (yes/no)? [yes]

CPAN.pm changes the current working directory often and needs to
determine its own current working directory. Per default it uses
Cwd::cwd but if this doesn't work on your system for some reason,
alternatives can be configured according to the following table:

    cwd         Cwd::cwd
    getcwd      Cwd::getcwd
    fastcwd     Cwd::fastcwd
    backtickcwd external command cwd

 
Preferred method for determining the current working directory? [cwd]

The prompt of the cpan shell can contain the current command number
for easier tracking of the session or be a plain string.

 
Do you want the command number in the prompt (yes/no)? [yes]

When using Term::ReadLine, you can turn ornaments on so that your
input stands out against the output from CPAN.pm.

 
Do you want to turn ornaments on? [yes]

The next option deals with the charset (aka character set) your
terminal supports. In general, CPAN is English speaking territory, so
the charset does not matter much but some CPAN have names that are
outside the ASCII range. If your terminal supports UTF-8, you should
say no to the next question. If it expects ISO-8859-1 (also known as
LATIN1) then you should say yes. If it supports neither, your answer
does not matter because you will not be able to read the names of some
authors anyway. If you answer no, names will be output in UTF-8.

 
Your terminal expects ISO-8859-1 (yes/no)? [yes] no

If you have one of the readline packages (Term::ReadLine::Perl,
Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
shell will have history support. The next two questions deal with the
filename of the history file and with its size. If you do not want to
set this variable, please hit SPACE RETURN to the following question.

If you have one of the readline packages (Term::ReadLine::Perl,
Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
shell will have history support. The next two questions deal with the
filename of the history file and with its size. If you do not want to
set this variable, please hit SPACE RETURN to the following question.

 
File to save your history? [/root/.cpan/histfile]

 
Number of lines to save? [100]

The 'd' and the 'm' command normally only show you information they
have in their in-memory database and thus will never connect to the
internet. If you set the 'show_upload_date' variable to true, 'm' and
'd' will additionally show you the upload date of the module or
distribution. Per default this feature is off because it may require a
net connection to get at the upload date.

 
Always try to show upload date with 'd' and 'm' command (yes/no)? [no]

During the 'r' command CPAN.pm finds modules without version number.
When the command finishes, it prints a report about this. If you
want this report to be very verbose, say yes to the following
variable.

 
Show all individual modules that have no $VERSION? [no]

During the 'r' command CPAN.pm finds modules with a version number of
zero. When the command finishes, it prints a report about this. If you
want this report to be very verbose, say yes to the following
variable.

 
Show all individual modules that have a $VERSION of zero? [no]

If you have never defined your own C in your configuration
then C will be hesitant to use the built in default sites for
downloading. It will ask you once per session if a connection to the
internet is OK and only if you say yes, it will try to connect. But to
avoid this question, you can choose your favorite download sites once
and get away with it. Or, if you have no favorite download sites
answer yes to the following question.

 
If no urllist has been chosen yet, would you prefer CPAN.pm to connect
to the built-in default sites without asking? (yes/no)? [no] yes

You have no /root/.cpan/sources/MIRRORED.BY
  I'm trying to fetch one
Warning: no success downloading '/root/.cpan/sources/MIRRORED.BY.tmp2220'. Giving up on i. at /usr/share/perl5/CPAN/FirstTime.pm line 1424
  LWP not available

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
    "http://www.perl.org/CPAN/MIRRORED.BY"


Now we need to know where your favorite CPAN sites are located. Push
a few sites onto the array (just in case the first on the array won't
work). If you are mirroring CPAN to your local workstation, specify a
file: URL.

First, pick a nearby continent and country by typing in the number(s)
in front of the item(s) you want to select. You can pick several of
each, separated by spaces. Then, you will be presented with a list of
URLs of CPAN mirrors in the countries you selected, along with
previously selected URLs. Select some of those URLs, or just keep the
old list. Finally, you will be prompted for any extra URLs -- file:,
ftp:, or http: -- that host a CPAN mirror.

(1) Africa
(2) Asia
(3) Central America
(4) Europe
(5) North America
(6) Oceania
(7) South America
Select your continent (or several nearby continents) [] 2

(1) Bangladesh
(2) China
(3) Hong Kong
(4) India
(5) Indonesia
(6) Israel
(7) Japan
(8) Kazakhstan
(9) Pakistan
(10) Republic of Korea
(11) Russia
(12) Saudi Arabia
(13) Singapore
(14) Taiwan
(15) Thailand
(16) Turkey
Select your country (or several nearby countries) [] 7

(1) ftp://ftp.dti.ad.jp/pub/lang/CPAN/
(2) ftp://ftp.jaist.ac.jp/pub/CPAN/
(3) ftp://ftp.kddilabs.jp/CPAN/
(4) ftp://ftp.nara.wide.ad.jp/pub/CPAN/
(5) ftp://ftp.riken.jp/lang/CPAN/
(6) ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/
(7) ftp://ftp.u-aizu.ac.jp/pub/CPAN/
(8) ftp://ftp.yz.yamagata-u.ac.jp/pub/lang/cpan/
Select as many URLs as you like (by number),
put them on one line, separated by blanks, hyphenated ranges allowed
 e.g. '1 4 5' or '7 1-4 8' [] 5 3 1

Enter another URL or RETURN to quit: []
New urllist
  ftp://ftp.riken.jp/lang/CPAN/
  ftp://ftp.kddilabs.jp/CPAN/
  ftp://ftp.dti.ad.jp/pub/lang/CPAN/


commit: wrote '/usr/share/perl5/CPAN/Config.pm'
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.


cpan[1]>

Config::IniFiles モジュールをインストールします。前提モジュールのインストールを行うか確認するプロンプトが何度か表示されますが、全て yes で応答します。

cpan[1]> install Config::IniFiles
~省略~
Building Config-IniFiles
Installing /usr/local/share/perl5/Config/IniFiles.pm
Installing /usr/local/share/man/man3/Config::IniFiles.3pm
  SHLOMIF/Config-IniFiles-2.68.tar.gz
  ./Build install --uninst 1 -- OK

cpan[2]>

② Net-SNMP のセットアップ

net-snmp および net-snmp-perl をインストールします。net-snmp-utils については必須ではありませんが、動作確認に使用するので、ここでインストールしておきましょう。

[root@centos6 ~]# yum install net-snmp net-snmp-utils net-snmp-perl
~省略~
==========================================================================================
 Package                 Arch           Version                     Repository       Size
==========================================================================================
Installing:
 net-snmp                x86_64         1:5.5-27.el6_0.1            updates         297 k
 net-snmp-perl           x86_64         1:5.5-27.el6_0.1            updates         312 k
 net-snmp-utils          x86_64         1:5.5-27.el6_0.1            updates         166 k
Installing for dependencies:
 lm_sensors-libs         x86_64         3.1.1-10.el6                base             37 k
 net-snmp-libs           x86_64         1:5.5-27.el6_0.1            updates         1.5 M

Transaction Summary
==========================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

Total download size: 2.3 M
Installed size: 7.6 M
Is this ok [y/N]: y
~省略~
Installed:
  net-snmp.x86_64 1:5.5-27.el6_0.1             net-snmp-perl.x86_64 1:5.5-27.el6_0.1
  net-snmp-utils.x86_64 1:5.5-27.el6_0.1

Dependency Installed:
  lm_sensors-libs.x86_64 0:3.1.1-10.el6       net-snmp-libs.x86_64 1:5.5-27.el6_0.1

Complete!

MIB ディレクトリ(CentOS での RPM インストール時は /usr/share/snmp/mibs)に以下の MIB ファイルを配置します。これらの MIB ファイルは、Cisco の FTP サイトからダウンロードできます。

CISCO-CONFIG-MAN-MIB.my
CISCO-GENERAL-TRAPS.my
CISCO-ENVMON-MIB.my
CISCO-HSRP-MIB.my
CISCO-PROCESS-MIB.my
CISCO-SMI.my
CISCO-SYSLOG-MIB.my
CISCO-TC.my
OLD-CISCO-INTERFACES-MIB.my
OLD-CISCO-SYSTEM-MIB.my
OLD-CISCO-TCP-MIB.my
OLD-CISCO-TS-MIB.my

ちなみに、ロード対象の MIB ファイルに記述漏れや誤りがあった場合、snmptrapd や snmptt 等のデーモンプロセスの起動時や snmptrap や snmpttconvertmib 等のコマンドの実行時にエラーメッセージが出力されることがあります。

例えば、上記のファイルの中では、CISCO-GENERAL-TRAPS.my をロードする際に以下のようなメッセージが表示されます。

[root@centos6 ~]# /etc/init.d/snmptt start
snmptt を起動中: Unlinked OID in CISCOTRAP-MIB: snmp# ::= { snmp 0 }
Undefined identifier: snmp near line 74 of /usr/share/snmp/mibs/CISCO-GENERAL-TRAPS.my
Unlinked OID in CISCOTRAP-MIB: snmp# ::= { snmp 0 }
Undefined identifier: snmp near line 64 of /usr/share/snmp/mibs/CISCO-GENERAL-TRAPS.my
Unlinked OID in CISCOTRAP-MIB: snmp# ::= { snmp 0 }
Undefined identifier: snmp near line 50 of /usr/share/snmp/mibs/CISCO-GENERAL-TRAPS.my
Unlinked OID in CISCOTRAP-MIB: snmp# ::= { snmp 0 }
Undefined identifier: snmp near line 40 of /usr/share/snmp/mibs/CISCO-GENERAL-TRAPS.my
Unlinked OID in CISCOTRAP-MIB: snmp# ::= { snmp 0 }
Undefined identifier: snmp near line 30 of /usr/share/snmp/mibs/CISCO-GENERAL-TRAPS.my
                                                           [  OK  ]

このメッセージは、IMPORTS ブロックに記述がない外部オブジェクト(ここでは SNMPv2-MIB で定義されている snmp)が MIB ファイル内で使用されていることを示すもので、IMPORTS ブロックの適切な箇所に記述を追加することで出力を止めることができます(「一般トラップのエンタープライズなのだから、本来は snmpTraps じゃないの?」という指摘は脇に置くとして…)。

    CISCOTRAP-MIB DEFINITIONS ::= BEGIN

          IMPORTS
              snmpTraps
                   FROM SNMPv2-MIB
              sysUpTime, ifIndex, ifDescr, ifType, egpNeighAddr, 
              tcpConnState
                   FROM RFC1213-MIB
              cisco
                   FROM CISCO-SMI
              whyReload, authAddr
                   FROM OLD-CISCO-SYSTEM-MIB
              locIfReason
                   FROM OLD-CISCO-INTERFACES-MIB
              tslineSesType, tsLineUser
                   FROM OLD-CISCO-TS-MIB
              loctcpConnElapsed, loctcpConnInBytes, loctcpConnOutBytes
                   FROM OLD-CISCO-TCP-MIB
              TRAP-TYPE
                   FROM RFC-1215;
~省略~

なお、よく似たメッセージに以下のものがありますが、こちらは依存関係のある MIB モジュール(ここでは CISCO-QOS-PIB-MIB)がロードされていないことを示すもので、通常は MIB ファイル自体の誤りではありません。この場合の対処は、CISCO-QOS-PIB-MIB を MIB ディレクトリに配置し、ロード対象モジュールに含める、といったものになります。

Cannot find module (CISCO-QOS-PIB-MIB): At line 15 in /usr/share/snmp/mibs/CISCO-MEMORY-POOL-MIB-V1SMI.my
Did not find 'Percent' in module #-1 (/usr/share/snmp/mibs/CISCO-MEMORY-POOL-MIB-V1SMI.my)

ちなみに、CISCOTRAP-MIB モジュールについては上記のエラーの他にも snmpttconvertmib 実行時に注意が必要となるのですが、そちらについてはまた別の機会に説明したいと思います。

③ Firewall の受信許可設定

Firewall を有効にしている場合は、162/udp の受信を許可するルールを追加します。方法としては、コマンドで追加する方法とファイルを直接編集する方法がありますが、今回はファイルの編集を行います。

/etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -p udp --dport 162 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

ファイルの編集が完了したら、iptables を再起動します。

[root@centos6 snmptt_1.3]# service iptables restart
iptables: ファイアウォールルールを消去中:                  [  OK  ]
iptables: チェインをポリシー ACCEPT へ設定中filter         [  OK  ]
iptables: モジュールを取り外し中:                          [  OK  ]
iptables: ファイアウォールルールを適用中:                  [  OK  ]

以上で準備は完了です。引き続き、SNMPTT のインストールを行っていきます。

3. SNMPTT のインストール

① SNMPTT のダウンロード

SourceForge の ダウンロードサイトから SNMPTT をダウンロードします。2011/7/10 時点の最新バージョンは 1.3 です。

[root@centos6 src]# wget http://downloads.sourceforge.net/project/snmptt/snmptt/snmptt_1.3/snmptt_1.3.tgz
~省略~
100%[================================================>] 146,314     83.9K/s 時間 1.7s

2011-07-10 15:03:23 (83.9 KB/s) - `snmptt_1.3.tgz' へ保存完了 [146314/146314]

[root@centos6 src]# tar zxvf snmptt_1.3.tgz
snmptt_1.3/
~省略~
[root@centos6 src]# cd snmptt_1.3
[root@centos6 snmptt_1.3]# ls -la
合計 420
drwxrwxr-x. 6 mockbuild mockbuild   4096 11月 15 22:36 2009 .
drwxr-xr-x. 3 root      root        4096  7月 18 01:02 2011 ..
-rw-rw-r--. 1 root      root           1  2月 22 05:01 2003 BUGS
-rw-rw-r--. 1 root      root       18009  4月 19 23:16 2002 COPYING
-rw-rw-r--. 1 root      root       43359 11月 15 22:31 2009 ChangeLog
-rw-rw-r--. 1 root      root         135  4月 16 13:17 2005 INSTALL
-rw-rw-r--. 1 root      root         135  4月 16 13:17 2005 README
drwxrwxr-x. 2 root      root        4096 11月 15 22:36 2009 bin
drwxrwxr-x. 2 root      root        4096 11月 15 22:36 2009 contrib
drwxrwxr-x. 2 root      root        4096 11月 15 22:36 2009 docs
drwxrwxr-x. 2 root      root        4096 11月 15 22:36 2009 examples
-rw-rw-r--. 1 root      root         384  1月  7 03:34 2003 sample-trap
-rw-rw-r--. 1 root      root         395  8月 17 03:12 2004 sample-trap-daemon
-rw-rw-r--. 1 root      root         321  8月 17 03:12 2004 sample-unknown-trap
-rw-rw-r--. 1 root      root         332  8月 17 03:12 2004 sample-unknown-trap-daemon
-rwxrwxr-x. 1 root      root      174107 11月 15 22:31 2009 snmptt
-rw-rw-r--. 1 root      root        2603  3月  1 01:30 2003 snmptt-eventlog.mc
-rwxrwxr-x. 1 root      root        1702  5月 18 00:56 2009 snmptt-init.d
-rwxrwxr-x. 1 root      root        7507 10月 13 08:39 2007 snmptt-net-snmp-test
-rw-rw-r--. 1 root      root       25952 11月 15 22:31 2009 snmptt.ini
-rw-rw-r--. 1 root      root       25444 11月 15 22:31 2009 snmptt.ini-nt
-rw-rw-r--. 1 root      root         276  5月 19 21:49 2009 snmptt.logrotate
-rwxrwxr-x. 1 root      root        3291 11月 15 22:31 2009 snmpttconvert
-rwxrwxr-x. 1 root      root       30438 11月 15 22:31 2009 snmpttconvertmib
-rwxrwxr-x. 1 root      root        6488 11月 15 22:31 2009 snmptthandler
-rw-rw-r--. 1 root      root        9038 11月 15 22:31 2009 snmptthandler-embedded

② セットアップ

SNMPTT のセットアップを行います。今回インストールする v1.3 の場合、 snmptt プロセスの動作モードとして、snmptrapd から直接呼びだされるコマンドとして動作するスタンドアロンモードと、システムに常駐して spool に出力されたログを定期的に処理するデーモンモードの 2 種類が選択可能です。また、デーモンモードでの利用時には、使用するハンドラーを snmptthandler(標準ハンドラー)と snmptthandler-embedded(組み込みハンドラー)の 2 種類から選べるため、合計で 3 種類の動作モードが存在します。

それぞれの動作モードにはメリット、デメリットがありますが、今回は設定が最も容易なスタンドアロンモードで設定を行います。

まずは必要なファイルを適切なディレクトリに配置し、パーミッションを設定します。

[root@centos6 snmptt_1.3]# cp -p snmptt /usr/sbin
[root@centos6 snmptt_1.3]# cp -p snmpttconvertmib /usr/sbin
[root@centos6 snmptt_1.3]# cp -p snmptt.ini /etc/snmp
[root@centos6 snmptt_1.3]# cp -p snmptt.logrotate /etc/logrotate.d/snmptt
[root@centos6 snmptt_1.3]# chmod 755 /usr/sbin/snmptt
[root@centos6 snmptt_1.3]# chmod 755 /usr/sbin/snmpttconvertmib
[root@centos6 snmptt_1.3]# chmod 644 /etc/snmp/snmptt.ini
[root@centos6 snmptt_1.3]# chmod 644 /etc/logrotate.d/snmptt

snmptt の動作に必要となるログディレクトリを作成します。

[root@centos6 snmptt_1.3]# mkdir /var/log/snmptt
root@centos6 snmptt_1.3]# chmod 644 /var/log/snmptt

snmptrapd の自動起動の設定を行います。

[root@centos6 snmptt_1.3]# chkconfig --level 2345 snmptrapd on
[root@centos6 snmptt_1.3]# chkconfig --list snmptrapd
snmptrapd       0:off   1:off   2:on    3:on    4:on    5:on    6:off

snmptrapd の起動スクリプトを編集し、起動オプションを変更します。

/etc/init.d/snmptrapd
#!/bin/bash

# ucd-snmp init file for snmptrapd
#
# chkconfig: - 50 50
# description: Simple Network Management Protocol (SNMP) Trap Daemon
#
# processname: /usr/sbin/snmptrapd
# config: /etc/snmp/snmptrapd.conf
# config: /usr/share/snmp/snmptrapd.conf
# pidfile: /var/run/snmptrapd.pid


### BEGIN INIT INFO
# Provides: snmptrapd
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: start and stop Net-SNMP trap daemon
# Description: Simple Network Management Protocol (SNMP) trap daemon
### END INIT INFO

# source function library
. /etc/init.d/functions

#OPTIONS="-Lsd -p /var/run/snmptrapd.pid"
OPTIONS="-m +ALL -Lsd -On -p /var/run/snmptrapd.pid"
if [ -e /etc/sysconfig/snmptrapd ]; then
  . /etc/sysconfig/snmptrapd
fi

RETVAL=0
prog="snmptrapd"
binary=/usr/sbin/snmptrapd
pidfile=/var/run/snmptrapd.pid

start() {
        [ -x $binary ] || exit 5
        echo -n $"Starting $prog: "
        daemon --pidfile=$pidfile /usr/sbin/snmptrapd $OPTIONS
        RETVAL=$?
        echo
        touch /var/lock/subsys/snmptrapd
        return $RETVAL
}

stop() {
        echo -n $"Stopping $prog: "
        killproc -p $pidfile /usr/sbin/snmptrapd
        RETVAL=$?
        echo
        rm -f /var/lock/subsys/snmptrapd
        return $RETVAL
}

reload(){
        stop
        start
}

restart(){
        stop
        start
}

condrestart(){
    [ -e /var/lock/subsys/snmptrapd ] && restart
    return 0
}

case "$1" in
  start)
        start
        RETVAL=$?
        ;;
  stop)
        stop
        RETVAL=$?
        ;;
  restart)
        restart
        RETVAL=$?
        ;;
  reload|force-reload)
        reload
        RETVAL=$?
        ;;
  condrestart|try-restart)
        condrestart
        RETVAL=$?
        ;;
  status)
        status snmptrapd
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
        RETVAL=2
esac

exit $RETVAL

snmptrapd の設定ファイルを編集し、snmptt と連携するための設定を追記します。

/etc/snmp/snmptrapd.conf
# Example configuration file for snmptrapd
#
# No traps are handled by default, you must edit this file!
#
# authCommunity   log,execute,net public
# traphandle SNMPv2-MIB::coldStart    /usr/bin/bin/my_great_script cold

authCommunity execute public
traphandle default /usr/sbin/snmptt

SNMPTT の設定ファイルを編集します。

/etc/snmp/snmptt.ini
#
# SNMPTT v1.3 Configuration File
#
# Linux / Unix
#

[General]
# Name of this system for $H variable.  If blank, system name will be the computer's
# hostname via Sys::Hostname.
snmptt_system_name = 

# Set to either 'standalone' or 'daemon'
# standalone: snmptt called from snmptrapd.conf
# daemon: snmptrapd.conf calls snmptthandler
# Ignored by Windows.  See documentation
mode = standalone

# Set to 1 to allow multiple trap definitions to be executed for the same trap.
# Set to 0 to have it stop after the first match.
# This option should normally be set to 1.  See the section 'SNMPTT.CONF Configuration 
# file Notes' in the SNMPTT documentation for more information.
# Note: Wildcard matches are only matched if there are NO exact matches.  This takes
# 	into consideration the NODES list.  Therefore, if there is a matching trap, but
#	the NODES list prevents it from being considered a match, the wildcard entry will
#	only be used if there are no other exact matches.
multiple_event = 0

# SNMPTRAPD passes the IP address of device sending the trap, and the IP address of the
# actual SNMP agent.  These addresses could differ if the trap was sent on behalf of another
# device (relay, proxy etc).
# If DNS is enabled, the agent IP address is converted to a host name using a DNS lookup
# (which includes the local hosts file, depending on how the OS is configured).  This name
# will be used for: NODES entry matches, hostname field in logged traps (file / database), 
# and the $A variable.  Host names on the NODES line will be resolved and the IP address 
# will then be used for comparing.
# Set to 0 to disable DNS resolution
# Set to 1 to enable DNS resolution
dns_enable = 1

# Set to 0 to enable the use of FQDN (Fully Qualified Domain Names).  If a host name is
# passed to SNMPTT that contains a domain name, it will not be altered in any way by
# SNMPTT.  This also affects resolve_value_ip_addresses.
# Set to 1 to have SNMPTT strip the domain name from the host name passed to it.  For 
# example, server01.domain.com would be changed to server01
# Set to 2 to have SNMPTT strip the domain name from the host name passed to it
# based on the list of domains in strip_domain_list
strip_domain = 0

# List of domain names that should be stripped when strip_domain is set to 2.
# List can contain one or more domains.  For example, if the FQDN of a host is
# server01.city.domain.com and the list contains domain.com, the 'host' will be
# set as server01.city.
strip_domain_list = <<END
domain.com
END

# Configures how IP addresses contained in the VALUE of the variable bindings are handled.
# This only applies to the values for $n, $+n, $-n, $vn, $+*, $-*.
# Set to 0 to disable resolving ip address to host names
# Set to 1 to enable resolving ip address to host names
# Note: net_snmp_perl_enable *must* be enabled.  The strip_domain settings influence the
# format of the resolved host name.  DNS must be enabled (dns_enable)
resolve_value_ip_addresses = 0

# Set to 1 to enable the use of the Perl module from the UCD-SNMP / NET-SNMP package.
# This is required for $v variable substitution to work, and also for some other options
# that are enabled in this .ini file.
# Set to 0 to disable the use of the Perl module from the UCD-SNMP / NET-SNMP package.
# Note: Enabling this with stand-alone mode can cause SNMPTT to run very slowly due to
#       the loading of the MIBS at startup.
net_snmp_perl_enable = 1

# This sets the best_guess parameter used by the UCD-SNMP / NET-SNMP Perl module for 
# translating symbolic nams to OIDs and vice versa.
# For UCD-SNMP, and Net-SNMP 5.0.8 and previous versions, set this value to 0.
# For Net-SNMP 5.0.9, or any Net-SNMP with patch 722075 applied, set this value to 2.
# A value of 2 is equivalent to -IR on Net-SNMP command line utilities.
# UCD-SNMP and Net-SNMP 5.0.8 and previous may not be able to translate certain formats of
# symbolic names such as RFC1213-MIB::sysDescr.  Net-SNMP 5.0.9 or patch 722075 will allow
# all possibilities to be translated.  See the FAQ section in the README for more info
net_snmp_perl_best_guess = 2

# Configures how the OID of the received trap is handled when outputting to a log file /
# database.  It does NOT apply to the $O variable.
# Set to 0 to use the default of numerical OID
# Set to 1 to translate the trap OID to short text (symbolic form) (eg: linkUp)
# Set to 2 to translate the trap OID to short text with module name (eg: IF-MIB::linkUp)
# Set to 3 to translate the trap OID to long text (eg: iso...snmpTraps.linkUp)
# Set to 4 to translate the trap OID to long text with module name (eg: 
# IF-MIB::iso...snmpTraps.linkUp)
# Note: -The output of the long format will vary depending on the version of Net-SNMP you
#        are using.
#       -net_snmp_perl_enable *must* be enabled
#       -If using database logging, ensure the trapoid column is large enough to hold the
#        entire line
translate_log_trap_oid = 1

# Configures how OIDs contained in the VALUE of the variable bindings are handled.
# This only applies to the values for $n, $+n, $-n, $vn, $+*, $-*.  For substitutions
# that include variable NAMES ($+n etc), only the variable VALUE is affected.
# Set to 0 to disable translating OID values to text (symbolic form)
# Set to 1 to translate OID values to short text (symbolic form) (eg: BuildingAlarm)
# Set to 2 to translate OID values to short text with module name (eg: UPS-MIB::BuildingAlarm)
# Set to 3 to translate OID values to long text (eg: iso...upsAlarm.BuildingAlarm)
# Set to 4 to translate OID values to long text with module name (eg: 
# UPS-MIB::iso...upsAlarm.BuildingAlarm)
# For example, if the value contained: 'A UPS Alarm (.1.3.6.1.4.1.534.1.7.12) has cleared.',
# it could be translated to: 'A UPS Alarm (UPS-MIB::BuildingAlarm) has cleared.'
# Note: net_snmp_perl_enable *must* be enabled
translate_value_oids = 1

# Configures how the symbolic enterprise OID will be displayed for $E.
# Set to 1, 2, 3 or 4.  See translate_value_oids options 1,2,3 and 4. 
# Note: net_snmp_perl_enable *must* be enabled
translate_enterprise_oid_format = 1

# Configures how the symbolic trap OID will be displayed for $O.
# Set to 1, 2, 3 or 4.  See translate_value_oids options 1,2,3 and 4. 
# Note: net_snmp_perl_enable *must* be enabled
translate_trap_oid_format = 1

# Configures how the symbolic trap OID will be displayed for $v, $-n, $+n, $-* and $+*.
# Set to 1, 2, 3 or 4.  See translate_value_oids options 1,2,3 and 4. 
# Note: net_snmp_perl_enable *must* be enabled
translate_varname_oid_format = 1

# Set to 0 to disable converting INTEGER values to enumeration tags as defined in the 
# MIB files
# Set to 1 to enable converting INTEGER values to enumeration tags as defined in the 
# MIB files
# Example: moverDoorState:open instead of moverDoorState:2
# Note: net_snmp_perl_enable *must* be enabled
translate_integers = 1

# Allows you to set the MIBS environment variable used by SNMPTT
# Leave blank or comment out to have the systems enviroment settings used
# To have all MIBS processed, set to ALL
# See the snmp.conf manual page for more info
#mibs_environment = ALL

# Set what is used to separate variables when wildcards are expanded on the FORMAT /
# EXEC line.  Defaults to a space.  Value MUST be within quotes.  Can contain 1 or 
# more characters
wildcard_expansion_separator = " "

# Set to 1 to allow unsafe REGEX code to be executed.
# Set to 0 to prevent unsafe REGEX code from being executed (default).
# Enabling unsafe REGEX code will allow variable interopolation and the use of the e
# modifier to allow statements such as substitution with captures such
# as:            (one (two) three)(five $1 six)
# which outputs: five two six
# or:            (one (two) three)("five ".length($1)." six")e
# which outputs: five 3 six
#
# This is considered unsafe because the contents of the regular expression 
# (right) is executed (eval) by Perl which *could contain unsafe code*.
# BE SURE THAT THE SNMPTT CONFIGURATION FILES ARE SECURE!
allow_unsafe_regex = 0

# Set to 1 to have the backslash (escape) removed from quotes passed from
# snmptrapd.  For example, \" would be changed to just "
# Set to 0 to disable
remove_backslash_from_quotes = 0

# Set to 1 to have NODES files loaded each time a trap is processed.
# Set to 0 to have all NODES files loaded when the snmptt.conf files are loaded.
# If NODES files are used (files that contain lists of NODES), then setting to 1
# will cause the list to be loaded each time an EVENT is processed that uses
# NODES files.  This will allow the NODES file to be modified while SNMPTT is 
# running but can result in many file reads depending on the number of traps
# received.  Defaults to 0
dynamic_nodes = 0

# This option allows you to use the $D substitution variable to include the
# description text from the SNMPTT.CONF or MIB files.
# Set to 0 to disable the $D substitution variable.  If $D is used, nothing
#  will be outputted.
# Set to 1 to enable the $D substitution variable and have it use the
#  descriptions stored in the SNMPTT .conf files.  Enabling this option can
#  greatly increase the amount of memory used by SNMPTT.
# Set to 2 to enable the $D substitution variable and have it use the
#  description from the MIB files.  This enables the UCD-SNMP / NET-SNMP Perl 
#  module save_descriptions variable.  Enabling this option can greatly 
#  increase the amount of memory used by the Net-SNMP SNMP Perl module, which 
#  will result in an increase of memory usage by SNMPTT.
description_mode = 0

# Set to 1 to remove any white space at the start of each line from the MIB
# or SNMPTT.CONF description when description_mode is set to 1 or 2.
description_clean = 1

# Warning: Experimental.  Not recommended for production environments.
#          When threads are enabled, SNMPTT may quit unexpectedly.
# Set to 1 to enable threads (ithreads) in Perl 5.6.0 or higher.  If enabled,
# EXEC will launch in a thread to allow SNMPTT to continue processing other
# traps.  See also threads_max.
# Set to 0 to disable threads (ithreads).
# Defaults to 0
threads_enable = 0

# Warning: Experimental.  Not recommended for production environments.
#          When threads are enabled, SNMPTT may quit unexpectedly.
# This option allows you to set the maximum number of threads that will 
# execute at once.  Defaults to 10
threads_max = 10

# The date format for $x in strftime() format.  If not defined, defaults 
# to %a %b %e %Y.
#date_format = %a %b %e %Y

# The time format for $X in strftime() format.  If not defined, defaults 
# to %H:%M:%S.
#time_format = %H:%M:%S 

# The date time format in strftime() format for the date/time when logging 
# to standard output, snmptt log files (log_file) and the unknown log file 
# (unknown_trap_log_file).  Defaults to localtime().  For SQL, see 
# date_time_format_sql.
# Example:  %a %b %e %Y %H:%M:%S
#date_time_format = 

[DaemonMode]
# Set to 1 to have snmptt fork to the background when run in daemon mode
# Ignored by Windows.  See documentation
daemon_fork = 1

# Set to the numerical user id (eg: 500) or textual user id (eg: snmptt)
# that snmptt should change to when running in daemon mode.  Leave blank
# to disable.  The user used should have read/write access to all log
# files, the spool folder, and read access to the configuration files.
# Only use this if you are starting snmptt as root.
# A second (child) process will be started as the daemon_uid user so
# there will be two snmptt processes running.  The first process will 
# continue to run as the user that ran snmptt (root), waiting for the
# child to quit.  After the child quits, the parent process will remove 
# the snmptt.pid file and exit. 
daemon_uid = snmptt

# Complete path of file to store process ID when running in daemon mode.
pid_file = /var/run/snmptt.pid

# Directory to read received traps from.  Ex: /var/spool/snmptt/
# Don't forget the trailing slash!
spool_directory = /var/spool/snmptt/

# Amount of time in seconds to sleep between processing spool files
sleep = 5

# Set to 1 to have SNMPTT use the time that the trap was processed by SNMPTTHANDLER
# Set to 0 to have SNMPTT use the time the trap was processed.  Note:  Using 0 can
# result in the time being off by the number of seconds used for 'sleep'
use_trap_time = 1

# Set to 0 to have SNMPTT erase the spooled trap file after it attempts to process
# the trap even if it did not successfully log the trap to any of the log systems.
# Set to 1 to have SNMPTT erase the spooled trap file only after it successfully
# logs to at least ONE log system.
# Set to 2 to have SNMPTT erase the spooled trap file only after it successfully
# logs to ALL of the enabled log systems.  Warning:  If multiple log systems are
# enabled and only one fails, the other log system will continuously be logged to
# until ALL of the log systems function.
# The recommended setting is 1 with only one log system enabled.
keep_unlogged_traps = 1

# How often duplicate traps will be processed.  An MD5 hash of all incoming traps
# is stored in memory and is used to check for duplicates.  All variables except for
# the uptime variable are used when calculating the MD5.  The larger this variable,
# the more memory snmptt will require.
# Note:  In most cases it may be a good idea to enable this but sometimes it can have a 
#        negative effect.  For example, if you are trying to troubleshoot a wireless device
#        that keeps losing it's connection you may want to disable this so that you see
#        all the associations and disassociations.
# 5 minutes = 300
# 10 minutes = 600
# 15 minutes = 900
duplicate_trap_window = 0

[Logging]
# Set to 1 to enable messages to be sent to standard output, or 0 to disable.
# Would normally be disabled unless you are piping this program to another
stdout_enable = 0

# Set to 1 to enable text logging of *TRAPS*.  Make sure you specify a log_file 
# location
log_enable = 1

# Log file location.  The COMPLETE path and filename.  Ex: '/var/log/snmptt/snmptt.log'
log_file = /var/log/snmptt/snmptt.log

# Set to 1 to enable text logging of *SNMPTT system errors*.  Make sure you 
# specify a log_system_file location
log_system_enable = 1

# Log file location.  The COMPLETE path and filename.  
# Ex: '/var/log/snmptt/snmpttsystem.log'
log_system_file = /var/log/snmptt/snmpttsystem.log

# Set to 1 to enable logging of unknown traps.  This should normally be left off
# as the file could grow large quickly.  Used primarily for troubleshooting.  If
# you have defined a trap in snmptt.conf, but it is not executing, enable this to
# see if it is being considered an unknown trap due to an incorrect entry or 
# simply missing from the snmptt.conf file.
# Unknown traps can be logged either a text file, a SQL table or both.
# See SQL section to define a SQL table to log unknown traps to.
unknown_trap_log_enable = 1

# Unknown trap log file location.  The COMPLETE path and filename.  
# Ex: '/var/log/snmptt/snmpttunknown.log'
# Leave blank to disable logging to text file if logging to SQL is enabled
# for unknown traps
unknown_trap_log_file = /var/log/snmptt/snmpttunknown.log

# How often in seconds statistics should be logged to syslog or the event log.
# Set to 0 to disable
# 1 hour = 216000
# 12 hours = 2592000
# 24 hours = 5184000
statistics_interval = 0

# Set to 1 to enable logging of *TRAPS* to syslog.  If you do not have the Sys::Syslog
# module then disable this.  Windows users should disable this.
syslog_enable = 0

# Syslog facility to use for logging of *TRAPS*.  For example: 'local0'
syslog_facility = local0

# Set the syslog level for *TRAPS* based on the severity level of the trap
# as defined in the snmptt.conf file.  Values must be one per line between 
# the syslog_level_* and END lines, and are not case sensitive.  For example:
#   Warning
#   Critical
# Duplicate definitions will use the definition with the higher severity.
syslog_level_debug = <<END
END
syslog_level_info = <<END
END
syslog_level_notice = <<END
END
syslog_level_warning = <<END
END
syslog_level_err = <<END
END
syslog_level_crit = <<END
END
syslog_level_alert = <<END
END

# Syslog default level to use for logging of *TRAPS*.  For example: warning
# Valid values: emerg, alert, crit, err, warning, notice, info, debug 
syslog_level = warning

# Set to 1 to enable logging of *SNMPTT system errors* to syslog.  If you do not have the 
# Sys::Syslog module then disable this.  Windows users should disable this.
syslog_system_enable = 0

# Syslog facility to use for logging of *SNMPTT system errors*.  For example: 'local0'
syslog_system_facility = local0

# Syslog level to use for logging of *SNMPTT system errors*..  For example: 'warning'
# Valid values: emerg, alert, crit, err, warning, notice, info, debug 
syslog_system_level = warning

[SQL]
# Determines if the enterprise column contains the numeric OID or symbolic OID
# Set to 0 for numeric OID
# Set to 1 for symbolic OID
# Uses translate_enterprise_oid_format to determine format
# Note: net_snmp_perl_enable *must* be enabled
db_translate_enterprise = 0

# FORMAT line to use for unknown traps.  If not defined, defaults to $-*.
db_unknown_trap_format = '$-*'

# List of custom SQL column names and values for the table of received traps
# (defined by *_table below).  The format is
#   column name
#   value
#
# For example:
#
#   binding_count
#   $#
#   uptime2
#   The agent has been up for $T.
sql_custom_columns = <<END
END

# List of custom SQL column names and values for the table of unknown traps
# (defined by *_table_unknown below).  See sql_custom_columns for the format.
sql_custom_columns_unknown = <<END
END

# MySQL: Set to 1 to enable logging to a MySQL database via DBI (Linux / Windows)
# This requires DBI:: and DBD::mysql
mysql_dbi_enable = 0

# MySQL: Hostname of database server (optional - default localhost)
mysql_dbi_host = localhost

# MySQL: Port number of database server (optional - default 3306)
mysql_dbi_port = 3306

# MySQL: Database to use
mysql_dbi_database = snmptt

# MySQL: Table to use
mysql_dbi_table = snmptt

# MySQL: Table to use for unknown traps
# Leave blank to disable logging of unknown traps to MySQL
# Note: unknown_trap_log_enable must be enabled.
mysql_dbi_table_unknown = snmptt_unknown

# MySQL: Table to use for statistics
# Note: statistics_interval must be set.  See also stat_time_format_sql.
#mysql_dbi_table_statistics = snmptt_statistics
mysql_dbi_table_statistics = 

# MySQL: Username to use
mysql_dbi_username = snmpttuser

# MySQL: Password to use
mysql_dbi_password = password

# MySQL: Whether or not to 'ping' the database before attempting an INSERT
# to ensure the connection is still valid.  If *any* error is generate by 
# the ping such as 'Unable to connect to database', it will attempt to 
# re-create the database connection.
# Set to 0 to disable
# Set to 1 to enable
# Note:  This has no effect on mysql_ping_interval.
mysql_ping_on_insert = 1

# MySQL: How often in seconds the database should be 'pinged' to ensure the
# connection is still valid.  If *any* error is generate by the ping such as 
# 'Unable to connect to database', it will attempt to re-create the database
# connection.  Set to 0 to disable pinging.
# Note:  This has no effect on mysql_ping_on_insert.
# disabled = 0
# 5 minutes = 300
# 15 minutes = 900
# 30 minutes = 1800
mysql_ping_interval = 300

# PostgreSQL: Set to 1 to enable logging to a PostgreSQL database via DBI (Linux / Windows)
# This requires DBI:: and DBD::PgPP
postgresql_dbi_enable = 0

# Set to 0 to use the DBD::PgPP module
# Set to 1 to use the DBD::Pg module
postgresql_dbi_module = 0

# Set to 0 to disable host and port network support
# Set to 1 to enable host and port network support
# If set to 1, ensure PostgreSQL is configured to allow connections via TCPIP by setting 
# tcpip_socket = true in the $PGDATA/postgresql.conf file, and adding the ip address of 
# the SNMPTT server to $PGDATApg_hba.conf.  The common location for the config files for
# RPM installations of PostgreSQL is /var/lib/pgsql/data.  
postgresql_dbi_hostport_enable = 0

# PostgreSQL: Hostname of database server (optional - default localhost)
postgresql_dbi_host = localhost

# PostgreSQL: Port number of database server (optional - default 5432)
postgresql_dbi_port = 5432

# PostgreSQL: Database to use
postgresql_dbi_database = snmptt

# PostgreSQL: Table to use for unknown traps
# Leave blank to disable logging of unknown traps to PostgreSQL
# Note: unknown_trap_log_enable must be enabled.
postgresql_dbi_table_unknown = snmptt_unknown

# PostgreSQL: Table to use for statistics
# Note: statistics_interval must be set.  See also stat_time_format_sql.
#postgresql_dbi_table_statistics = snmptt_statistics
postgresql_dbi_table_statistics = 

# PostgreSQL: Table to use
postgresql_dbi_table = snmptt

# PostgreSQL: Username to use
postgresql_dbi_username = snmpttuser

# PostgreSQL: Password to use
postgresql_dbi_password = password

# PostgreSQL: Whether or not to 'ping' the database before attempting an INSERT
# to ensure the connection is still valid.  If *any* error is generate by 
# the ping such as 'Unable to connect to database', it will attempt to 
# re-create the database connection.
# Set to 0 to disable
# Set to 1 to enable
# Note:  This has no effect on postgresqll_ping_interval.
postgresql_ping_on_insert = 1

# PostgreSQL: How often in seconds the database should be 'pinged' to ensure the
# connection is still valid.  If *any* error is generate by the ping such as 
# 'Unable to connect to database', it will attempt to re-create the database
# connection.  Set to 0 to disable pinging.
# Note:  This has no effect on postgresql_ping_on_insert.
# disabled = 0
# 5 minutes = 300
# 15 minutes = 900
# 30 minutes = 1800
postgresql_ping_interval = 300

# ODBC: Set to 1 to enable logging to a database via ODBC using DBD::ODBC.  
# This requires both DBI:: and DBD::ODBC
dbd_odbc_enable = 0

# DBD:ODBC: Database to use
dbd_odbc_dsn = snmptt

# DBD:ODBC: Table to use
dbd_odbc_table = snmptt

# DBD:ODBC: Table to use for unknown traps
# Leave blank to disable logging of unknown traps to DBD:ODBC
# Note: unknown_trap_log_enable must be enabled.
dbd_odbc_table_unknown = snmptt_unknown

# DBD:ODBC: Table to use for statistics
# Note: statistics_interval must be set.  See also stat_time_format_sql.
#dbd_odbc_table_statistics = snmptt_statistics
dbd_odbc_table_statistics = 

# DBD:ODBC: Username to use
dbd_odbc_username = snmptt

# DBD:DBC:: Password to use
dbd_odbc_password = password


# DBD:ODBC: Whether or not to 'ping' the database before attempting an INSERT
# to ensure the connection is still valid.  If *any* error is generate by 
# the ping such as 'Unable to connect to database', it will attempt to 
# re-create the database connection.
# Set to 0 to disable
# Set to 1 to enable
# Note:  This has no effect on dbd_odbc_ping_interval.
dbd_odbc_ping_on_insert = 1

# DBD:ODBC:: How often in seconds the database should be 'pinged' to ensure the
# connection is still valid.  If *any* error is generate by the ping such as 
# 'Unable to connect to database', it will attempt to re-create the database
# connection.  Set to 0 to disable pinging.
# Note:  This has no effect on dbd_odbc_ping_on_insert.
# disabled = 0
# 5 minutes = 300
# 15 minutes = 900
# 30 minutes = 1800
dbd_odbc_ping_interval = 300

# The date time format for the traptime column in SQL.  Defaults to 
# localtime().  When a date/time field is used in SQL, this should
# be changed to follow a standard that is supported by the SQL server.
# Example:  For a MySQL DATETIME, use %Y-%m-%d %H:%M:%S.
#date_time_format_sql = 

# The date time format for the stat_time column in SQL.  Defaults to 
# localtime().  When a date/time field is used in SQL, this should
# be changed to follow a standard that is supported by the SQL server.
# Example:  For a MySQL DATETIME, use %Y-%m-%d %H:%M:%S.
#stat_time_format_sql = 

[Exec]

# Set to 1 to allow EXEC statements to execute.  Should normally be left on unless you
# want to temporarily disable all EXEC commands
exec_enable = 1

# Set to 1 to allow PREEXEC statements to execute.  Should normally be left on unless you
# want to temporarily disable all PREEXEC commands
pre_exec_enable = 1

# If defined, the following command will be executed for ALL unknown traps.  Passed to the
# command will be all standard and enterprise variables, similar to unknown_trap_log_file
# but without the newlines.
unknown_trap_exec = 

# FORMAT line that is passed to the unknown_trap_exec command.  If not defined, it
# defaults to what is described in the unknown_trap_exec setting.  The following
# would be *similar* to the default described in the unknown_trap_exec setting
# (all on one line):
# $x !! $X: Unknown trap ($o) received from $A at: Value 0: $A Value 1: $aR 
# Value 2: $T Value 3: $o Value 4: $aA Value 5: $C Value 6: $e Ent Values: $+*
unknown_trap_exec_format = 

# Set to 1 to escape wildards (* and ?) in EXEC, PREEXEC and the unknown_trap_exec
# commands.  Enable this to prevent the shell from expanding the wildcard 
# characters.  The default is 1.
exec_escape = 1

[Debugging]
# 0 - do not output messages
# 1 - output some basic messages
# 2 - out all messages
DEBUGGING = 0

# Debugging file - SNMPTT
# Location of debugging output file.  Leave blank to default to STDOUT (good for
# standalone mode, or daemon mode without forking)
DEBUGGING_FILE = 
# DEBUGGING_FILE = /var/log/snmptt/snmptt.debug

# Debugging file - SNMPTTHANDLER
# Location of debugging output file.  Leave blank to default to STDOUT
DEBUGGING_FILE_HANDLER = 
# DEBUGGING_FILE_HANDLER = /var/log/snmptt/snmptthandler.debug

[TrapFiles]
# A list of snmptt.conf files (this is NOT the snmptrapd.conf file).  The COMPLETE path 
# and filename.  Ex: '/etc/snmp/snmptt.conf'
snmptt_conf_files = <<END
/etc/snmp/snmptt-cisco.conf
/etc/snmp/snmptt-standard.conf
END

SNMPTT のトラップ定義ファイルを作成します。ファイルの書式は 7.x 以前のバージョンの NNM の trapd.conf と同じなので、過去に NNM を使用したことがある方はその時の trapd.conf を転用してもよいでしょう。

まずは標準トラップ用のトラップ定義ファイルを作成します。

/etc/snmp/snmptt-standard.conf
##########################################################################################
#
# SNMPv2-MIB
#
##########################################################################################
EVENT coldStart .1.3.6.1.6.3.1.1.5.1 "Status Events" Normal
FORMAT エージェントが再起動しました。種別:coldStart
SDESC
A coldStart trap signifies that the SNMPv2 entity, acting
in an agent role, is reinitializing itself and that its
configuration may have been altered.
EDESC
#
#
#
EVENT warmStart .1.3.6.1.6.3.1.1.5.2 "Status Events" Normal
FORMAT エージェントが再起動しました。種別:warmStart
SDESC
A warmStart trap signifies that the SNMPv2 entity, acting
in an agent role, is reinitializing itself such that its
configuration is unaltered.
EDESC
#
#
#
EVENT authenticationFailure .1.3.6.1.6.3.1.1.5.5 "Status Events" Warning
FORMAT コミュニティ名が不正です。
SDESC
An authenticationFailure trap signifies that the SNMP
entity has received a protocol message that is not
properly authenticated.  While all implementations
of SNMP entities MAY be capable of generating this
trap, the snmpEnableAuthenTraps object indicates
whether this trap will be generated.
EDESC
##########################################################################################
#
# IF-MIB
#
##########################################################################################
EVENT linkDown .1.3.6.1.6.3.1.1.5.3 "Status Events" Critical
FORMAT インターフェース $1 が停止しました。状態:$2/$3
SDESC
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.
Variables:
  1: ifIndex
     Syntax="INTEGER32"
     Descr="A unique value, greater than zero, for each interface.  It
            is recommended that values are assigned contiguously
            starting from 1.  The value for each interface sub-layer
            must remain constant at least from one re-initialization of
            the entity's network management system to the next re-
            initialization."
  2: ifAdminStatus
     Syntax="INTEGER"
       1: up
       2: down
       3: testing
     Descr="The desired state of the interface.  The testing(3) state
            indicates that no operational packets can be passed.  When a
            managed system initializes, all interfaces start with
            ifAdminStatus in the down(2) state.  As a result of either
            explicit management action or per configuration information
            retained by the managed system, ifAdminStatus is then
            changed to either the up(1) or testing(3) states (or remains
            in the down(2) state)."
  3: ifOperStatus
     Syntax="INTEGER"
       1: up
       2: down
       3: testing
       4: unknown
       5: dormant
       6: notPresent
       7: lowerLayerDown
     Descr="The current operational state of the interface.  The
            testing(3) state indicates that no operational packets can
            be passed.  If ifAdminStatus is down(2) then ifOperStatus
            should be down(2).  If ifAdminStatus is changed to up(1)
            then ifOperStatus should change to up(1) if the interface is
            ready to transmit and receive network traffic; it should
            change to dormant(5) if the interface is waiting for
            external actions (such as a serial line waiting for an
            incoming connection); it should remain in the down(2) state
            if and only if there is a fault that prevents it from going
            to the up(1) state; it should remain in the notPresent(6)
            state if the interface has missing (typically, hardware)
            components."
EDESC
#
#
#
EVENT linkUp .1.3.6.1.6.3.1.1.5.4 "Status Events" Normal
FORMAT インターフェース $1 が動作を開始しました。状態:$2/$3
SDESC
A linkUp trap signifies that the SNMP entity, acting in an
agent role, has detected that the ifOperStatus object for
one of its communication links left the down state and
transitioned into some other state (but not into the
notPresent state).  This other state is indicated by the
included value of ifOperStatus.
Variables:
  1: ifIndex
     Syntax="INTEGER"
     Descr="A unique value, greater than zero, for each interface.  It
        is recommended that values are assigned contiguously
        starting from 1.  The value for each interface sub-layer
        must remain constant at least from one re-initialization of
        the entity's network management system to the next re-
        initialization."
  2: ifAdminStatus
     Syntax="INTEGER"
       1: up
       2: down
       3: testing
     Descr="The desired state of the interface.  The testing(3) state
        indicates that no operational packets can be passed.  When a
        managed system initializes, all interfaces start with
        ifAdminStatus in the down(2) state.  As a result of either
        explicit management action or per configuration information
        retained by the managed system, ifAdminStatus is then
        changed to either the up(1) or testing(3) states (or remains
        in the down(2) state)."
  3: ifOperStatus
     Syntax="INTEGER"
       1: up
       2: down
       3: testing
       4: unknown
       5: dormant
       6: notPresent
       7: lowerLayerDown
     Descr="The current operational state of the interface.  The
        testing(3) state indicates that no operational packets can
        be passed.  If ifAdminStatus is down(2) then ifOperStatus
        should be down(2).  If ifAdminStatus is changed to up(1)
        then ifOperStatus should change to up(1) if the interface is
        ready to transmit and receive network traffic; it should
        change to dormant(5) if the interface is waiting for
        external actions (such as a serial line waiting for an
        incoming connection); it should remain in the down(2) state
        if and only if there is a fault that prevents it from going
        to the up(1) state; it should remain in the notPresent(6)
        state if the interface has missing (typically, hardware)
        components."
EDESC
#
#
#

Cisco 機器用のトラップ定義ファイルを作成します。

/etc/snmp/snmptt-cisco.conf
##########################################################################################
#
# CISCOTRAP-MIB
#
##########################################################################################
EVENT coldStart .1.3.6.1.6.3.1.1.5.1 "Cisco Status Events" Normal
FORMAT エージェントが再起動しました。種別:coldStart, 理由:$2
NODES /etc/snmp/snmptt-cisco.nodes
SDESC
A coldStart trap signifies that the sending
protocol entity is reinitializing itself such
that the agent's configuration or the protocol
entity implementation may be altered.
Variables:
  1: sysUpTime
     Syntax="TICKS"
     Descr="The time (in hundredths of a second) since the
                      network management portion of the system was last
                      re-initialized."
  2: whyReload
     Syntax=""
EDESC
#
#
#
EVENT linkDown .1.3.6.1.6.3.1.1.5.3 "Cisco Status Events" Critical
FORMAT インターフェース $2 が停止しました。状態:$4
NODES /etc/snmp/snmptt-cisco.nodes
SDESC
A linkDown trap signifies that the sending
protocol entity recognizes a failure in one of
the communication links represented in the
agent's configuration.
Variables:
  1: ifIndex
     Syntax="INTEGER"
     Descr="A unique value for each interface.  Its value
                      ranges between 1 and the value of ifNumber.  The
                      value for each interface must remain constant at
                      least from one re-initialization of the entity's
                      network management system to the next re-
                      initialization."
  2: ifDescr
     Syntax="OCTETSTR"
     Descr="A textual string containing information about the
                      interface.  This string should include the name of
                      the manufacturer, the product name and the version
                      of the hardware interface."
  3: ifType
     Syntax="INTEGER"
       1: other
       10: iso88026-man
       11: starLan
       12: proteon-10Mbit
       13: proteon-80Mbit
       14: hyperchannel
       15: fddi
       16: lapb
       17: sdlc
       18: ds1
       19: e1
       2: regular1822
       20: basicISDN
       21: primaryISDN
       22: propPointToPointSerial
       23: ppp
       24: softwareLoopback
       25: eon
       26: ethernet-3Mbit
       27: nsip
       28: slip
       29: ultra
       3: hdh1822
       30: ds3
       31: sip
       32: frame-relay
       4: ddn-x25
       5: rfc877-x25
       6: ethernet-csmacd
       7: iso88023-csmacd
       8: iso88024-tokenBus
       9: iso88025-tokenRing
     Descr="The type of interface, distinguished according to
                      the physical/link protocol(s) immediately `below'
                      the network layer in the protocol stack."
  4: locIfReason
     Syntax="OCTETSTR"
     Descr="Reason for interface last status change."
EDESC
#
#
#
EVENT linkUp .1.3.6.1.6.3.1.1.5.4 "Cisco Status Events" Normal
FORMAT インターフェース $2 が動作を開始しました。状態:$4
NODES /etc/snmp/snmptt-cisco.nodes
SDESC
A linkUp trap signifies that the sending
protocol entity recognizes that one of the
communication links represented in the agent's
configuration has come up.
Variables:
  1: ifIndex
     Syntax="INTEGER"
     Descr="A unique value for each interface.  Its value
                      ranges between 1 and the value of ifNumber.  The
                      value for each interface must remain constant at
                      least from one re-initialization of the entity's
                      network management system to the next re-
                      initialization."
  2: ifDescr
     Syntax="OCTETSTR"
     Descr="A textual string containing information about the
                      interface.  This string should include the name of
                      the manufacturer, the product name and the version
                      of the hardware interface."
  3: ifType
     Syntax="INTEGER"
       1: other
       10: iso88026-man
       11: starLan
       12: proteon-10Mbit
       13: proteon-80Mbit
       14: hyperchannel
       15: fddi
       16: lapb
       17: sdlc
       18: ds1
       19: e1
       2: regular1822
       20: basicISDN
       21: primaryISDN
       22: propPointToPointSerial
       23: ppp
       24: softwareLoopback
       25: eon
       26: ethernet-3Mbit
       27: nsip
       28: slip
       29: ultra
       3: hdh1822
       30: ds3
       31: sip
       32: frame-relay
       4: ddn-x25
       5: rfc877-x25
       6: ethernet-csmacd
       7: iso88023-csmacd
       8: iso88024-tokenBus
       9: iso88025-tokenRing
     Descr="The type of interface, distinguished according to
                      the physical/link protocol(s) immediately `below'
                      the network layer in the protocol stack."
  4: locIfReason
     Syntax="OCTETSTR"
     Descr="Reason for interface last status change."
EDESC
#
#
#
EVENT authenticationFailure .1.3.6.1.6.3.1.1.5.5 "Cisco Management Events" Warning
FORMAT コミュニティ名が不正です。リクエスト送信元:$1
NODES /etc/snmp/snmptt-cisco.nodes
SDESC
An authenticationFailure trap signifies that
the sending protocol entity is the addressee
of a protocol message that is not properly
authenticated.  While implementations of the
SNMP must be capable of generating this trap,
they must also be capable of suppressing the
emission of such traps via an implementation-
specific mechanism.
Variables:
  1: authAddr
     Syntax=""
EDESC
#
#
#
EVENT egpNeighborLoss .1.3.6.1.6.3.1.1.5.6 "Cisco Status Events" Critical
FORMAT EGP ネイバーとの接続が切断されました。ネイバー:$1
NODES /etc/snmp/snmptt-cisco.nodes
SDESC
An egpNeighborLoss trap signifies that an EGP
neighbor for whom the sending protocol entity
was an EGP peer has been marked down and the
peer relationship no longer obtains.
Variables:
  1: egpNeighAddr
     Syntax="IPADDR"
     Descr="The IP address of this entry's EGP neighbor."
EDESC
#
#
#
EVENT reload .1.3.6.1.4.1.9.0.0 "Cisco Status Events" Normal
FORMAT ノードの再起動を開始します。理由:$2
SDESC
A reload trap signifies that the sending
protocol entity is reinitializing itself such
that the agent's configuration or the protocol
entity implementation may be altered.
Variables:
  1: sysUpTime
     Syntax="TICKS"
     Descr="The time (in hundredths of a second) since the
                      network management portion of the system was last
                      re-initialized."
  2: whyReload
     Syntax=""
EDESC
#
#
#
EVENT tcpConnectionClose .1.3.6.1.4.1.9.0.1 "Cisco Management Events" Normal
FORMAT TTY セッションが終了しました。セッション種別:$1
SDESC
A tty trap signifies that a TCP connection,
previously established with the sending
protocol entity for the purposes of a tty
session, has been terminated.
Variables:
  1: tslineSesType
     Syntax="INTEGER"
       1: unknown
       10: xremote
       11: rshell
       12: ipc
       13: udptn
       2: pad
       3: stream
       4: rlogin
       5: telnet
       6: tcp
       7: lat
       8: mop
       9: slip
     Descr="Type of session."
  2: tcpConnState
     Syntax="INTEGER"
       1: closed
       10: closing
       11: timeWait
       12: deleteTCB
       2: listen
       3: synSent
       4: synReceived
       5: established
       6: finWait1
       7: finWait2
       8: closeWait
       9: lastAck
     Descr="The state of this TCP connection.

                      The only value which may be set by a management
                      station is deleteTCB(12).  Accordingly, it is
                      appropriate for an agent to return a `badValue'
                      response if a management station attempts to set
                      this object to any other value.

                      If a management station sets this object to the
                      value deleteTCB(12), then this has the effect of
                      deleting the TCB (as defined in RFC 793) of the
                      corresponding connection on the managed node,
                      resulting in immediate termination of the
                      connection.

                      As an implementation-specific option, a RST
                      segment may be sent from the managed node to the
                      other TCP endpoint (note however that RST segments
                      are not sent reliably)."
  3: loctcpConnElapsed
     Syntax="TICKS"
     Descr="How long this TCP connection has been
                           established."
  4: loctcpConnInBytes
     Syntax="INTEGER"
     Descr="Bytes input for this TCP connection."
  5: loctcpConnOutBytes
     Syntax="INTEGER"
     Descr="Bytes output for this TCP connection."
  6: tsLineUser
     Syntax="OCTETSTR"
     Descr="TACACS user name, if TACACS enabled, of user
                           on this line."
EDESC
##########################################################################################
#
# CISCO-SYSLOG-MIB
#
##########################################################################################
EVENT clogMessageGenerated .1.3.6.1.4.1.9.9.41.2.0.1 "Cisco Syslog Events" Normal
FORMAT $5 $1-$3: $2: $4
SDESC
When a syslog message is generated by the device a
clogMessageGenerated notification is sent.  The
sending of these notifications can be enabled/disabled
via the clogNotificationsEnabled object.
Variables:
  1: clogHistFacility
     Syntax="OCTETSTR"
     Descr="Name of the facility that generated this message.
                 For example: 'SYS'."
  2: clogHistSeverity
     Syntax="INTEGER"
       1: emergency
       2: alert
       3: critical
       4: error
       5: warning
       6: notice
       7: info
       8: debug
     Descr="The severity of the message."
  3: clogHistMsgName
     Syntax="OCTETSTR"
     Descr="A textual identification for the message type.
                 A facility name in conjunction with a message name
                 uniquely identifies a message type."
  4: clogHistMsgText
     Syntax="OCTETSTR"
     Descr="The text of the message.  If the text of the message
                 exceeds 255 bytes, the message will be truncated to
                 254 bytes and a '*' character will be appended -
                 indicating that the message has been truncated."
  5: clogHistTimestamp
     Syntax="TICKS"
     Descr="The value of sysUpTime when this message was
                 generated."
EDESC
##########################################################################################
#
# CISCO-CONFIG-MAN-MIB
#
##########################################################################################
EVENT ciscoConfigManEvent .1.3.6.1.4.1.9.9.43.2.0.1 "Cisco Management Events" Normal
FORMAT コンフィグ変更管理イベントが発行されました。変更手段:$1, 変更元:$2, 変更対象:$3
SDESC
Notification of a configuration management event as
recorded in ccmHistoryEventTable.
Variables:
  1: ccmHistoryEventCommandSource
     Syntax="INTEGER"
       1: commandLine
       2: snmp
     Descr="The source of the command that instigated the event."
  2: ccmHistoryEventConfigSource
     Syntax="INTEGER"
       1: erase
       2: commandSource
       3: running
       4: startup
       5: local
       6: networkTftp
       7: networkRcp
       8: networkFtp
       9: networkScp
     Descr="The configuration data source for the event."
  3: ccmHistoryEventConfigDestination
     Syntax="INTEGER"
       1: erase
       2: commandSource
       3: running
       4: startup
       5: local
       6: networkTftp
       7: networkRcp
       8: networkFtp
       9: networkScp
     Descr="The configuration data destination for the event."
EDESC
#
#
#
EVENT ccmCLIRunningConfigChanged .1.3.6.1.4.1.9.9.43.2.0.2 "Cisco Management Events" Normal
FORMAT CLI からコンフィグが変更されました。ターミナル種別:$2
SDESC
This notification indicates that the running
configuration of the managed system has changed
from the CLI.
If the managed system supports a separate
configuration mode(where the configuration commands
are entered under a  configuration session which
affects the running configuration of the system),
then this notification is sent when the configuration
mode is exited.
During this configuration session there can be
one or more running configuration changes.
Variables:
  1: ccmHistoryRunningLastChanged
     Syntax="TICKS"
     Descr="The value of sysUpTime when the running configuration
            was last changed.

                    If the value of ccmHistoryRunningLastChanged is
                    greater than ccmHistoryRunningLastSaved, the
                    configuration has been changed but not saved."
  2: ccmHistoryEventTerminalType
     Syntax="INTEGER"
       1: notApplicable
       2: unknown
       3: console
       4: terminal
       5: virtual
       6: auxiliary
     Descr="If ccmHistoryEventCommandSource is 'commandLine',
            the terminal type, otherwise 'notApplicable'."
EDESC
#
#
#
EVENT ccmCTIDRolledOver .1.3.6.1.4.1.9.9.43.2.0.3 "Cisco Management Events" Normal
FORMAT コンフィグ変更トラッキング ID の値が上限に達したため、リセットされます。
SDESC
This notification indicates that the Config Change Tracking
ID has rolled over and will be reset.
EDESC
##########################################################################################
#
# CISCO-HSRP-MIB
#
##########################################################################################
EVENT cHsrpStateChange .1.3.6.1.4.1.9.9.106.2.0.1 "Cisco Status Events" Critical
FORMAT HSRP グループの状態が変化しました。状態:$1
SDESC
A cHsrpStateChange notification is sent when a
cHsrpGrpStandbyState transitions to either active or
standby state, or leaves active or standby state. There
will be only one notification issued when the state change
is from standby to active and vice versa.
Variables:
  1: cHsrpGrpStandbyState
     Syntax="INTEGER"
       1: initial
       2: learn
       3: listen
       4: speak
       5: standby
       6: active
     Descr="The current HSRP state of this group on this interface."
EDESC
#
#
#

/etc/snmp/snmptt-cisco.nodes という名前でファイルを作成し、Cisco 機器のアドレスを記載します。以下は記述例ですので、環境に合わせて適切なアドレスを指定してください。

/etc/snmp/snmptt-cisco.nodes
# address list of Cisco routers and switches
192.168.0.1
192.168.100.0/24
192.168.200.0-192.168.200.255
:

上記のファイルを作成している理由ですが、Cisco の MIB で定義されるトラップの中には、CISCOTRAP-MIB の linkUp や linkDown のように標準 MIB で定義されているものと同じ OID を持つものがあります。こうしたトラップには、変数バインディングを追加するなどのベンダー独自の拡張が行われているため、標準に準拠しているトラップとは定義を分けて監視する必要があります。

今回は特定ベンダーの機器を他の機器と区別するために、トラップ定義ファイルで NODES 行に外部ファイルを指定し、ファイルに対象機器のアドレスを追記していく方式を採っています。また、標準トラップ定義の記述の簡略化のため、snmptt.ini で multiple_event = 0 を指定し、トラップ定義ファイルの記述順を制御することで、最初にマッチした条件で処理を終了するようにしています。

③ hosts への監視対象機器の登録

今回の環境では snmptt.ini で dns_enable = 1 を設定しているため、監視対象機器のアドレスを全て hosts に登録しておきましょう。特に OS の設定で DNS による名前解決を有効にしている場合、DNS サーバとの間に不要なトラフィックが流れたり、ログへの書き込みが遅延するなどの問題が発生する可能性があります。

また、大規模環境においては snmptt をインストールしたサーバに DNS を立てることも選択肢の一つになります。

④ サービスの起動と動作確認

ここまでの設定が完了したら、最後に snmptrapd を起動します。

[root@centos6 ~]# service snmptrapd start
snmptrapd を起動中:                                        [  OK  ]

snmptrap コマンドでテスト用のトラップを飛ばして、正常にログに記録されるかを確認しましょう。以下のようなコマンドを実行することで、Cisco ルータの linkUp トラップを擬似的に発生させることができます。ここではエージェントアドレスに 192.168.100.100 を指定していますが、コマンド実行をする際は snmptt-cisco.nodes に記載のあるアドレスに書き換えて下さい。

snmptrap -v 1 -c public localhost 1.3.6.1.6.3.1.1.5 192.168.100.100 3 0 '' .1.3.6.1.2.1.2.2.1.1.1 i 1 .1.3.6.1.2.1.2.2.1.2.1 s FastEthernet0/0 .1.3.6.1.2.1.2.2.1.3.1 i 6 .1.3.6.1.4.1.9.2.2.1.1.20.1 s up

/var/log/snmptt/snmptt.log に以下のようなログが書き込まれたら、正常に監視ができています。

Mon Jul 18 11:52:22 2011 linkUp Normal "Status Events" router6 - インターフェース FastEthernet0/0 が動作を開始しました。状態:up

メッセージが以下のようになっている場合は、Cisco 用のトラップ定義にマッチしていませんので、snmptt-cisco.nodes の内容や snmptrap コマンド実行時のエージェントアドレスの指定を見直してみてください。

Mon Jul 18 11:45:47 2011 linkUp Normal "Status Events" router6 - インターフェース 1 が動作を開始しました。状態:FastEthernet0/0/ethernetCsmacd



今回はひとまずここまで。

次回以降、snmpttconvertmib の使い方や Splunk との連携などについて解説していきたいと思います。
関連記事

テーマ : おすすめソフトウェア
ジャンル : コンピュータ

トラックバック


この記事にトラックバックする(FC2ブログユーザー)

-

管理人の承認後に表示されます

-

管理人の承認後に表示されます

コメントの投稿

非公開コメント

プロフィール

米麹

筆者: 米麹
某社に勤務する SE です。
ここでは本職とは関係のない趣味的な検証情報などを書いていきます。

注意事項とお願い
記事の内容は掲載時点のもので、現在は異なる可能性があります。情報に誤りや不適切な事項があった場合には、コメントやメールフォームでご指摘下さい。
また、本サイトの情報を利用することによって生じたいかなる損害についても、筆者は責任を負いかねますのでご了承下さい。
カレンダー
09 | 2018/10 | 11
- 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 - - -
最新記事
月別アーカイブ
カテゴリ
全記事表示リンク

全ての記事を表示する

検索フォーム
メールフォーム

名前:
メール:
件名:
本文:

上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。