VMware vSphere 6.7のESXiからsnmp trapを上げるようにしたのだが、あまりにも大量のinfoが上がってくるので、その対応。
esxcliで送出レベルを設定する。
設定後snmpdを再起動すると反映される。
----
Usage: esxcli system snmp set [cmd options]
Description:
set This command allows the user to set up ESX SNMP agent.
Cmd options:
-a|--authentication=
Set default authentication protocol. Values: none,
MD5, SHA1
-c|--communities=
Set up to ten communities each no more than 64
characters. Format is: community1[,community2,...]
(this overwrites previous settings)
-e|--enable= Start or stop SNMP service. Values: [yes|no,
true|false, 0|1]
-E|--engineid= Set SNMPv3 engine id. Must be at least 10 to 32
hexadecimal characters. 0x or 0X is stripped if found
as well as colons (:)
-y|--hwsrc= Where to source hardware events from IPMI sensors or
CIM Indications. One of: indications|sensors
-s|--largestorage=
Support large storage for hrStorageAllocationUnits *
hrStorageSize. Values: [yes|no, true|false, 0|1].
Control how the agent reports
hrStorageAllocationUnits, hrStorageSize and
hrStorageUsed in hrStorageTable. Setting this
directive to 1 to support large storage with small
allocation units, the agent re-calculates these values
so they all fit Integer32 and hrStorageAllocationUnits
* hrStorageSize gives real size of the storage ( Note:
hrStorageAllocationUnits will not be real allocation
units if real hrStorageSize won't fit into Integer32
). Setting this directive to 0 turns off this
calculation and the agent reports real
hrStorageAllocationUnits, but it might report wrong
hrStorageSize for large storage because the value
won't fit into Integer32.
-l|--loglevel= System Agent syslog logging level:
debug|info|warning|error
-n|--notraps= Comma separated list of trap oids for traps not to be
sent by agent. Use value 'reset' to clear setting
-p|--port= Set UDP port to poll snmp agent on. The default is
udp/161. May not use ports 32768 to 40959
-x|--privacy= Set default privacy protocol. Values: none, AES128
-R|--remote-users=
Set up to five inform user ids. Format is: user/auth-
proto/-|auth-hash/priv-proto/-|priv-hash/engine-
id[,...] Where user is 32 chars max. auth-proto is
none|MD5|SHA1, priv-proto is none|AES. '-' indicates
no hash. engine-id is hex string '0x0-9a-f' up to 32
chars max.
-r|--reset Return agent configuration to factory defaults
-C|--syscontact= System contact string as presented in sysContact.0. Up
to 255 characters
-L|--syslocation=
System location string as presented in sysLocation.0.
Up to 255 characters.
-t|--targets= Set up to three targets to send SNMPv1 traps to.
Format is: ip-or-hostname[@port]/community[,...] The
default port is udp/162. (this overwrites previous
settings)
-u|--users= Set up to five local users. Format is: user/-|auth-
hash/-|priv-hash/model[,...] Where user is 32 chars
max. '-' indicates no hash. Model is one of
(none|auth|priv).
-i|--v3targets= Set up to three SNMPv3 notification targets. Format
is: ip-or-hostname[@port]/remote-user/security-
level/trap|inform[,...].