科学の箱

科学・IT・登山の話題

IT

muninでSNMPを監視する

投稿日:2014年3月19日 更新日:

muninでSNMPを監視するための手順をまとめておく。

muninはエージェントを使って対象機器を監視するがそれ以外にSNMP経由での監視もできる。エージェントがなくてもほとんどの機器ではSNMPは提供されているために、muninでまとめて管理できる。

まず対象機器でsnmpが有効になっているかをsnmpwalkで確認する。

snmpwalk –v1 –c public tokyo-server.company_a.com
snmpwalk -v1 -c public -On tokyo-server.company_a.com

/etc/munin/muninplugin-conf.d/munin-nodeにsnmp機器を追加する

[snmp_tokyo-server.company_a.com_*]
env.community public
env.version 2

/etc/munin/munin.confにsnmp機器を追加する

[tokyo-server.company_a.com]
    address 127.0.0.1
    use_node_name no
  • サーバー名は名前解決できるようにしておく。
  • addressはローカルホスト
  • use_node_nameにはnoを指定する。

プラグインの設定をする。プラグインの設定は/etc/munin/plugins/のフォルダにSNMPの監視項目にあわせたスクリプトを用意する。このスクリプトはmunin-node-configureコマンドでスクリプト作成用のコマンドを出力し、コピー&ペーストでシェルから実行する。スクリプト作成用のコマンドはテンプレートフォルダからのリンク作成である。

# munin-node-configure --shell --snmp tokyo-server.company_a.com -snmpversion 1 --snmpcommunity public
ln -s '/usr/share/munin/plugins/snmp__if_' '/etc/munin/plugins/snmp_tokyo-server.company_a.com_if_11'
ln -s '/usr/share/munin/plugins/snmp__if_' '/etc/munin/plugins/snmp_tokyo-server.company_a.com_if_13'
ln -s '/usr/share/munin/plugins/snmp__if_' '/etc/munin/plugins/snmp_tokyo-server.company_a.com_if_14'
ln -s '/usr/share/munin/plugins/snmp__if_' '/etc/munin/plugins/snmp_tokyo-server.company_a.com_if_15'

対象機器で利用できるすべての項目についてリンクが出力されるので必要な項目のみコピーして実行する。

munin-nodeを再起動する。

service munin-node restart

5分ほど待つと取得された情報が監視画面に出てくる。

メタ情報

inarticle



メタ情報

inarticle



-IT
-

執筆者:


comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

Networkerにおける削除ができないNotificationの例

下記のNotificationはNetworkerでは削除できない。 Bootstrap Backup Failure NetWorker Daemons Not Running Resource F …

no image

ドメインレジストラの決め方

会社のドメインレジストラを決める際のポイントについて考えてみる。 個人でドメインを取得する場合には、重要なポイントになるのは価格である。 価格はgTLDによっても違うのでなるべく安めのドメインを選ぶ。 …

no image

gitの使い方

git init git add \*.java git status -s or git status git commit -m “initial commit” git …

no image

pukiwikiが動かなくなった件について – Part2

手順がはっきりしたので備忘録として http://pukiwiki.cafelounge.net/plus/?Downloadからpukiwiki Plus!の国際版をダウンロードする。 data2u …

no image

DellラップトップのBreakキー

DellラップトップにはBreakキーがない機種がある。 この場合にはFn+BでBreakキーが使える。 参考 https://www.dell.com/support/article/jp/ja/j …

2014年3月
« 2月   4月 »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

side bar top



アーカイブ

カテゴリー