HPE Insight Remote Support
1751858 メンバー
5496 オンライン
108782 解決策
新規ポスト

SNMPトラップ設定(Linux)snmpd.confファイルをテキストエディターで編集

 
hp販社
時折のアドバイザー

SNMPトラップ設定(Linux)snmpd.confファイルをテキストエディターで編集

管理対象サーバ上で、hpasm OR hp-snmp-agents に付属のスクリプトを実行し、SNMP を設定する。

  

PSP8.00まで: 

# /etc/init.d/hpasm reconfigure

PSP8.10~: 

# /sbin/hpsnmpconfig

上記コマンドを実行すると、SNMP に関する質問が出てきますので、以下のように答えます。

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Do you wish to continue? <y/n> (blank is y) y を入力します。

Press the Enter key to continue... Enter キーを押します。                                           

Do you want to load the hp modules even though they may "taint" your kernel? <y/n> (Blank

is y) Enter キーを押します。

Do you require SNMP agents (y/n) ? (Blank is y): Enter キーを押します。

you require Storage Agent support (y/n) ? (Blank is y): Enter キーを押します。

Do you require performance agent support (y/n) ? (Blank is y): Enter キーを押します。

Do you wish to use an existing snmpd.conf (y/n) (Blank is n): Enter キーを押します。

Localhost SNMP Read/Write community strings are already known.

Do you wish to change it (y/n) (Blank is n): y を入力します。

Enter the localhost SNMP Read/Write community string

(one word, required, no default): private と入力します。(入力した文字は表示されません)

Re-enter the same input to confirm: 再度private と入力します。(入力した文字は表示されません)

Enter localhost SNMP Read Only community string

(one word, Blank to skip): public と入力します。(入力した文字は表示されません)

Re-enter the same input to confirm: public と入力します。(入力した文字は表示されません)

Enter Read/Write Authorized Management Station IP or DNS name

(Blank to skip): 管理サーバのIP アドレスを入力します。

Enter SNMP Read/Write community string for Management Station "192.168.1.2"

(one word, required, no default): private と入力します。(入力した文字は表示されません)

Re-enter the same input to confirm: private と入力します。(入力した文字は表示されません)

Enter Read Only Authorized Management Station IP or DNS name

(Blank to skip): 管理サーバのIP アドレスを入力します。

Enter SNMP Read Only community string for Management Station "192.168.1.2"

(one word, required, no default): public と入力します。(入力した文字は表示されません)

Re-enter the same input to confirm: public と入力します。(入力した文字は表示されません)

Enter default SNMP trap community string

(One word; Blank to skip): public と入力します。

Enter SNMP trap destination IP or DNS name

(One word; Blank to skip): 管理サーバのIP アドレスを入力します。

Enter trap community string for trap destination "192.168.1.2"

(One word; Blank to skip): public と入力します。

he system contact is set to

syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)

Do you wish to change it (y/n) (Blank is n): Enter キーを入力します。

The system location is set to

syslocation Unknown (edit /etc/snmp/snmpd.conf)

Do you wish to change it (y/n) (Blank is n): y を入力します。

Enter system location information

(Building, room, etc; Blank to skip): Tokyo Office 4F と入力します。『住所』

Do you wish to disable hpsmh support (y/n) (Blank is n): Enter キーを押します。

以上で管理対象サーバのSNMP の設定は完了です。正しく設定されているかsnmpd.conf ファ

イルを確認します。

# less /etc/snmp/snmpd.conf     

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

注:

privateとpublicはOS上のデフォルト設定であり、お客様環境により、コミュニティ名は任意で設定可能です。

ただ、管理サーバと管理対象サーバのコミュニティ名は同じであることが必要です。