ܼ

ESXi6.x

ESXi6.xǤˡ礭Ѥޤ
ޥ饤󤫤ȤʤޤΤǡSSH³ԤäDzԤޤ

Ķ

ʲδĶˤԤȤȤޤ

VMware ESXi6.5

1. ESXiSSH³
2. SNMPߥ˥ƥ̾

esxcli system snmp set --communities Community Name

3. SNMPӥͭ

esxcli system snmp set --enable true

4. Firewall(³¤Ԥʤ)

esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
esxcli network firewall ruleset set --ruleset-id snmp --enabled true

5. SNMPӥư

/etc/init.d/snmpd start

root: snmpd Running from interactive shell, running command: esxcli system snmp set -e false.
root: snmpd setting up resource reservations.
root: snmpd opening firewall port(s) for notifications.
root: snmpd watchdog for snmpd started.

ʾˤơSNMPӥͭ롣

SNMPTrap

1. ESXiSSH³
2. SNMPӥͭ

esxcli system snmp set --enable true

3. Trap

esxcli system snmp set --targets 襢ɥ쥹@162/Community Name


ʲޥƥȤԤ

esxcli system snmp test
  Comments: There is 1 target configured, send warmStart requested, test completed normally.


ȡSNMPޥ͡¦ǡwarmStartפ롣

ESXi5.x

ESXi5Ǥˡ礭Ѥޤ
ޥ饤󤫤ͭʤ̵ʤꡢESXiФSSH³Ԥեν񤭴ȥӥεưɬפȤʤޤ

Ķ

ʲδĶˤԤȤȤޤ

VMware ESXi5.0u1

1. ESXiSSH³
2. ե򳫤

vi /etc/vmware/snmp.xml

3. 񤭴

  • ͭ
    ѹ<enabled>false</enabled>
    ѹ<enabled>true</enabled>
  • ߥ˥ƥ̾
    ѹ<communities></communities>
    ѹ<communities>public</communities>
    4. ӥƵư
    /sbin/services.sh restart

ESXi4.x

VMware ESXiSNMPˤͤμSNMPTrapˤ㳲ΤԤ硣
VMware vSphere CLIԤʤޤȼESXiκƵưɬפȤεҤޤµԤäϰϤǤϺƵưפǤ

Ķ

ʲδĶˤԤȤȤޤ

VMware ESXi4.1
VMware vSphere CLI4.1.0-254719

ʲޥSNMPλȤ


  • vicfg-snmp.pl --server [ESX IPɥ쥹] -E -c [Community Name] -t [SNMPTrapIPɥ쥹]@[SNMP Port Num]/[Community ID]
  • ¹
    > vicfg-snmp.pl --server 192.168.1.1 -E -c localnet -t192.168.1.10@162/public
    Enter username: root
    Enter password:
    Enabling agent...
    Failed : fault.RestrictedVersion.summary


/

ʲޥϸ̤SNMPԤʤλȤ



Community ID


  • vicfg-snmp.pl --server [IP] -c [Community Name]
  • ¹
    > vicfg-snmp.pl --server 192.168.1.1 -c public
    Enter username: root
    Enter password:
    Changing community list to: localnet...
    Complete.



SNMPTrap


  • vicfg-snmp.pl --server [IP] -t [IP]/[Community Name]
  • ¹
    >vicfg-snmp.pl --server 192.168.1.1 -t 192.168.1.2/public
    Enter username: root
    Enter password:
    Changing notification(trap) targets list to: 192.168.1.2/public...
    Complete.



SNMPɽ


  • vicfg-snmp.pl --server [IP] -s

  • ¹
    >vicfg-snmp.pl --server 192.168.1.1 -s
    Enter username: root
    Enter password:
    Current SNMP agent settings:
    Enabled  : 1
    UDP port : 161
    
    Communities :
    public
    
    Notification targets :
    192.168.1.2@0/public



SNMPͭ


  • vicfg-snmp.pl --server [IP] -E

  • ¹
    >vicfg-snmp.pl --server 192.168.1.1 -E
    Enter username: root
    Enter password:
    Enabling agent...
    Complete.



SNMP̵


  • vicfg-snmp.pl --server [IP] -D

  • ¹
    >vicfg-snmp.pl --server 192.168.1.1 -D
    Enter username: root
    Enter password:
    Disabling agent...
    Complete.

SNMPTrap


  • vicfg-snmp.pl --server [IP] -T
  • ¹
    >vicfg-snmp.pl --server 192.168.1.1 -T
    Enter username: root
    Enter password:
    Sending test nofication(trap) to all configured targets...
    Complete. Check with each target to see if trap was received.

SNMPޥ͡Υǧ/var/log/messages

  • /var/log/messages
    Dec  9 02:09:24 nms snmptrapd[3352]: 
    2010-12-09 02:09:24 
    ESXi-2 [192.168.1.1] (via UDP: [192.168.1.1]:51047) TRAP, SNMP v1, community public     
    SNMPv2-SMI::enterprises.6876.4.1 Warm Start Trap (0) Uptime: 7  days, 2:57:21.94

ȥå   Խ ʬ ʎގ̎ ź ʣ ̾ѹ   ǽ   إ   ǽRSS
Last-modified: 2023-02-12 () 10:43:29 (663d)