VMWare ESX/ESXi 에 SNMP를 설정하려면 vSphere Remote CLI가 깔려있어야 함. 사용하는 ESXi 버전에 따라 다르고, 설치 후 CLI 명령어 실행할 때 libxml2.dll (perl.exe) 문제가 발생하면 내 컴퓨터 - 등록정보 - 고급 - 환경 변수 - 사용자(혹은 시스템) 변수 에서 Path 에 ;C:\Program Files (x86)\VMware\VMware vSphere CLI\bin 경로를 넣어주고 재시작 하면 됨.
근데, ESXi 5.0 호스트는 잘 긁어오는데 4.0 은 NIC만 긁어오네? -_-
C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl --server 192.168.0.100 --username root --password (password) -c (communityname) --enable Changing community list to: public... Complete. Changing notification filter to: --enable... Complete.
Synopsis: C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\vicfg-snmp.pl OPTIONS Command-specific options: --communities -c Set communities separated by comma comm1[,...] (this overwrites previous settings) --disable -D Stop SNMP service --enable -E Start SNMP service --hwsrc -y Where to source hardware events from IPMI sensors or CIM Indications. One of: indications|sensors --notraps -n Comma separated list of trap oids for traps not to be sent by agent. Use value 'reset' to clear setting --port -p Sets the port of the snmp agent. The default is udp/162 --reset -r Return agent configuration to factory defaults --show -s Displays snmp agent configuration --targets -t Set destination of notifications(traps) hostname[@port][/community][,...] (this overwrites previous settings) (IPv6 address valid for vSphere 4.0 and later) --test -T Send out a test notification to validate configuration --vihost -h The host to use when connecting via a vCenter Server.
Common VI options: --config (variable VI_CONFIG) Location of the VI Perl configuration file --credstore (variable VI_CREDSTORE) Name of the credential store file defaults to <HOME>/.vmware/credstore/vicredentials.xml on Linux and <APPDATA>/VMware/credstore/vicredentials.xml on Windows --encoding (variable VI_ENCODING, default 'utf8') Encoding: utf8, cp936 (Simplified Chinese), iso-8859-1 (German), shiftjis (Japanese) --help Display usage information for the script --passthroughauth (variable VI_PASSTHROUGHAUTH) Attempt to use pass-through authentication --passthroughauthpackage (variable VI_PASSTHROUGHAUTHPACKAGE, default 'Negotiate') Pass-through authentication negotiation package --password (variable VI_PASSWORD) Password --portnumber (variable VI_PORTNUMBER) Port used to connect to server --protocol (variable VI_PROTOCOL, default 'https') Protocol used to connect to server --savesessionfile (variable VI_SAVESESSIONFILE) File to save session ID/cookie to utilize --server (variable VI_SERVER, default 'localhost') VI server to connect to. Required if url is not present --servicepath (variable VI_SERVICEPATH, default '/sdk/webService') Service path used to connect to server --sessionfile (variable VI_SESSIONFILE) File containing session ID/cookie to utilize --url (variable VI_URL) VI SDK URL to connect to. Required if server is not present --username (variable VI_USERNAME) Username --verbose (variable VI_VERBOSE) Display additional debugging information --version Display version information for the script