SNMP
Overview
You can enable a 3rd-party platform to get resource monitoring data from the Cloud or receive alarms proactively pushed from the Cloud by enabling the SNMP management.
Inventory
SNMP Agent Inventory
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| uuid | The UUID, see Resource Property | 4.7.21 | ||
| version | The protocol version. | 4.7.21 | ||
| readCommunity | The read community (used for the v2c version). | 4.7.21 | ||
| userName | The user name (used for the v3 version). | 4.7.21 | ||
| authAlgorithm | The authentication algorithm. | 4.7.21 | ||
| authPassword | The authentication password. | 4.7.21 | ||
| privacyAlgorithm | The privacy algorithm. | 4.7.21 | ||
| privacyPassword | The privacy password. | 4.7.21 | ||
| port | The port. | 4.7.21 | ||
| status | The SNMP agent status. | 4.7.21 | ||
| securityLevel | The security level. | 4.7.21 | ||
| createDate | The creation date. For more information, see Resource Property. | 4.7.21 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 4.7.21 | ||
| userTags | The user tags. For more information, see CreateUserTag. | 4.7.21 | ||
| systemTags | The system tags. For more information, see CreateSystemTag. | 4.7.21 |
Sample
{
"inventories": [
{
"uuid": "f0ef8d847b573c6b86565e1d9111723b",
"version": "v3",
"userName": "zstack",
"authAlgorithm": "SHA512",
"authPassword": "auth_password",
"privacyAlgorithm": "DES",
"privacyPassword": "priv_password",
"port": 161,
"status": "Enable",
"securityLevel": "authPriv"
}
]
}
SNS SNMP Platform Inventory
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| snmpAddress | The SNMP server address. | 4.7.21 | ||
| snmpPort | The SNMP server port. | 4.7.21 | ||
| name | The name. See Resource Property. | 4.7.21 | ||
| description | The description. See Resource Property. | 4.7.21 | ||
| uuid | The UUID. See Resource Property. | 4.7.21 | ||
| tagUuids | The tag UUID list. | 4.7.21 | ||
| systemTags | The system tags. For more information, see CreateSystemTag. | 4.7.21 | ||
| userTags | The user tags. For more information, see CreateUserTag. | 4.7.21 | ||
| createDate | The creation date. For more information, see Resource Property. | 4.7.21 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 4.7.21 |
Operations
CreateSnmpAgent
Creates an SNMP agent. For example,
CreateSnmpAgent version=v2c readcommunity=test port=1161Parameters
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| version | The protocol version. | 4.7.21 | ||
| readCommunity | The read community (used for the v2c version). | Yes | 4.7.21 | |
| userName | The user name (used for the v3 version). | Yes | 4.7.21 | |
| authAlgorithm | The authentication algorithm. | Yes | 4.7.21 | |
| authPassword | The authentication password. | Yes |
|
4.7.21 |
| privacyAlgorithm | The privacy algorithm. | Yes | 4.7.21 | |
| privacyPassword | The privacy password. | Yes | 4.7.21 | |
| port | The port. | 4.7.21 | ||
| resourceUuid | The resource UUID. | Yes | 4.7.21 | |
| tagUuids | The tag UUID list. | Yes | 4.7.21 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 4.7.21 | |
| timeout | Yes |
QuerySnmpAgent
Queries an SNMP agent. For example,
QuerySnmpAgent uuid=f0ef8d847b573c6b86565e1d9111723bPrimitive Fields of Query
See SNMP Agent Inventory.
UpdateSnmpAgent
Updates the SNMP agent. For example,
UpdateSnmpAgent uuid=f0ef8d847b573c6b86565e1d9111723b version=v2c readcommunity=test port=1161Parameters
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| version | The protocol version. | 4.7.21 | ||
| uuid | The resource UUID. | 4.7.21 | ||
| readCommunity | The read community (used for the v2c version). | Yes | 4.7.21 | |
| userName | The user name (used for the v3 version). | Yes | 4.7.21 | |
| authAlgorithm | The authentication algorithm. | Yes | 4.7.21 | |
| authPassword | The authentication password. | Yes |
|
4.7.21 |
| privacyAlgorithm | The privacy algorithm. | Yes | 4.7.21 | |
| privacyPassword | The privacy password. | Yes | 4.7.21 | |
| port | The port. | 4.7.21 | ||
| resourceUuid | The resource UUID. | Yes | 4.7.21 | |
| tagUuids | The tag UUID list. | Yes | 4.7.21 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 4.7.21 | |
| timeout | Yes |
CreateSNSSnmpEndpoint
Creates an SNMP trap receiver endpoint. For example,
CreateSNSSnmpEndpoint name=test platformUuid=d71f754a80663dc7a6a2003cc5667846Parameters
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| name | The resource name. | 4.7.21 | ||
| description | The resource description. | Yes | 4.7.21 | |
| platformUuid | The SNMP platform UUID. | Yes | 4.7.21 | |
| resourceUuid | The resource UUID. | Yes | 4.7.21 | |
| tagUuids | The tag UUID list. | Yes | 4.7.21 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 4.7.21 | |
| timeout | Yes |
SNSSnmpTestConnection
Sends a test message to an SNMP trap receiver endpoint. For example,
SNSSnmpTestConnection platformUuid=d71f754a80663dc7a6a2003cc5667846 endpointUuid=e3a38d5d8d123991bd0a986150f3e6dfParameters
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| platformUuid | The SNMP platform UUID. | Yes | 5.1.8 | |
| endpoinyUuid | The SNMP trap receiver endpoint UUID. | Yes | 5.1.8 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 5.1.8 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 5.1.8 | |
| timeout | Yes |
CreateSNSSnmpPlatform
Creates an SNMP platform. For example,
CreateSNSSnmpPlatform snmpAddress=127.0.0.1 snmpPort=161 name=testParameters
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| snmpAddress | The SNMP server address. | 4.7.21 | ||
| snmpPort | The SNMP server port. | 4.7.21 | ||
| name | The resource name. | 4.7.21 | ||
| description | The resource description. | Yes | 4.7.21 | |
| resourceUuid | The resource UUID. | Yes | 4.7.21 | |
| tagUuids | The tag UUID list. | Yes | 4.7.21 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 4.7.21 | |
| timeout | Yes |
QuerySNSSnmpPlatform
Queries the SNMP platform information. For example,
QuerySNSSnmpPlatformPrimitive Fields of Query
Nested And Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| endpoints | endpoints inventory | 4.7.21 |
UpdateSNSSnmpPlatform
Updates the SNMP platform. For example,
UpdateSNSSnmpPlatform snmpAddress=127.0.0.1 snmpPort=161 name=test uuid=38c619bf4e7a4cdaa04fcb44d85d5fc9| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| snmpAddress | The SNMP server address. | 4.7.21 | ||
| snmpPort | The SNMP server port. | 4.7.21 | ||
| uuid | The resource UUID. | 4.7.21 | ||
| name | The resource name. | Yes | 4.7.21 | |
| description | The resource description. | Yes | 4.7.21 | |
| resourceUuid | The resource UUID. | Yes | 4.7.21 | |
| tagUuids | The tag UUID list. | Yes | 4.7.21 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 4.7.21 | |
| timeout | Yes |
Tags
You can create a user tag on a global setting by using CreateUserTag
resourceType=GlobalConfigVO. For
example,
CreateUserTag resourceType=GlobalConfigVO tag=Test1 \
resourceUuid=3fd25b9e5b87423bba5612a45c1f5ecc