Update Snmp Agent

Update Snmp Agent

API to update a single agent

Request
URI
PUT
https://{api_host}/tcsa/api/v1/snmp/agents
COPY
Query Parameters
string
snmpIntegration
Optional

The name of the current snmp integration

snmpIntegration example
snmp-integration

Request Body

The snmpAgentRequest object containing the details of the agent to be updated

SnmpAgentRequest of type(s) application/json
Optional

Show optional properties

{
    "name": "V2Agent",
    "ipAddress": "10.106.126.64",
    "snmpPort": 161,
    "transportProtocol": "udp",
    "snmpTimeout": 1000,
    "snmpNumberOfRetries": 5,
    "snmpVersion": "v2c",
    "snmpCommunityOrUserV3Name": "public",
    "maxBulkSize": 50,
    "devType": "Switch",
    "onFailTryWith": "v1"
}
{
    "name": "Agent1",
    "agentId": "0.0.0.0:161",
    "ipAddress": "0.0.0.0",
    "snmpPort": 161,
    "transportProtocol": "udp",
    "snmpTimeout": 1000,
    "snmpNumberOfRetries": 2,
    "snmpVersion": "v2c",
    "snmpCommunityOrUserV3Name": "public",
    "snmpV3AuthenticationProtocol": "sha",
    "snmpV3AuthenticationPassword": "changeme",
    "snmpV3PrivacyProtocol": "aes",
    "snmpV3PrivacyPassword": "aespass",
    "maxBulkSize": 50,
    "v3ContextName": "string",
    "v3ContextEngineId": "string",
    "useV3ContextName": false,
    "useV3ContextEnginedId": false,
    "devType": "Node",
    "v1TableRowPolling": false,
    "onFailTryWith": "string",
    "doNotUseGetBulkRequests": false,
    "doNotUseCapabilityList": [
        "CISCO-MEMORY-OLD"
    ],
    "collectorNameList": [
        "collector-a",
        "collector-b"
    ],
    "pollingPeriod": 300,
    "capabilitiesWithPollingPeriod": [
        {
            "capabilityName": "CISCO-MEMORY-OLD",
            "pollingPeriod": "number"
        }
    ],
    "discoveryStatus": "string",
    "discoveryMessage": [
        "string"
    ]
}
string
name
Required

This required attribute will set the device property to this value for all polled RawValues on this agent.

string
agentId
Optional

The id of the agent. The ID is a combination of 4 attributes "ipAddress" , "port", "v3ContextName" and "v3ContextEnginedId". The id is not required while adding/uploading an agent. This is only filled in the response of an API call

string
ipAddress
Required
Constraints: default: 0.0.0.0

This contains the IP address of the polled agent which will be used to contact the device.The pair IP address and port must be unique among all defined agents for this collector.

integer
snmpPort
Required
Constraints: default: 161

This port will be used in order to contact the SNMP agent on the polled device. Default one is 161.Please note that the pair IP address and port must be unique among all defined agents for this collector.

string
transportProtocol
Required
Constraints: default: udp

The protocol to use for data transportation. Default is UDP.

Possible values are : tcp, udp,
integer
snmpTimeout
Required
Constraints: default: 1000

The timeout, in milliseconds, before giving up while waiting for the agent response. 1000 is a good value that will fit most of the cases.

integer
snmpNumberOfRetries
Required
Constraints: default: 2

The number of retries before giving up while contacting the agent. 2 retries, which mean 3 attempts will be made, should be enough.

string
snmpVersion
Required
Constraints: default: v2c

The SNMP version to use when polling the agent. Most SNMP agents support v2c, which offers better efficiency than v1. Please note that SNMP v2c (or v3) must be used when polling 64 bits counters.

Possible values are : v1, v2c, v3,
string
snmpCommunityOrUserV3Name
Required
Constraints: default: public

The community string or SNMP v3 username, depending on the selected SNMP version. Filling this attribute is mandatory.

string
snmpV3AuthenticationProtocol
Optional
Constraints: default: noAuth

Only used with SNMP v3. It defines the protocol to use for authentication process.

Possible values are : md5, sha, noAuth,
string
snmpV3AuthenticationPassword
Optional

Only used with SNMP v3. It defines the authentication password. Leave blank if not using authentication.

string
snmpV3PrivacyProtocol
Optional

Only used with SNMP v3. It defines the protocol to use for privacy.

Possible values are : aes, des, aes192, aes256, noPriv,
string
snmpV3PrivacyPassword
Optional

Only used with SNMP v3. It defines the privacy password. SNMP v3 Authentication only is used when this password is not provided.

integer
maxBulkSize
Required
Constraints: default: 50

The maximum number of varbind in a snmpGetBulk request issued to this device. This applies only to SNMP v2c and v3 column-based polling. The default value is 50, which covers most cases. However, it may be required to lower this value if the devices SNMP agent times out when receiving oversized request instead of replying with the largest number of varbinds that may fit in the pdu.

string
v3ContextName
Optional

Only used with SNMP v3. It specifies the context name. Leave it empty for default context.

string
v3ContextEngineId
Optional

Only used with SNMP v3. It specifies the engine ID, as a hexadecimal format character string (i.e. : 0102AAAF ). Leave it empty for default engine ID.

boolean
useV3ContextName
Optional

Only used with SNMP v3 Include the context name as part of the raw values variable for this agent.

boolean
useV3ContextEnginedId
Optional

Only used with SNMP v3 Include the context engined ID as part of the raw values variable for this agent.

string
devType
Required
Constraints: default: Node

This attribute is required and describes the type of device this agent represents. All polled values from this agent will be tagged with this property.

boolean
v1TableRowPolling
Optional

This attribute affects the way SNMP v1 agents are polled. false is the standard failsafe mode: table polling will be column-based, while true enables a more efficient row-based polling model. However, this feature is not correctly supported by all SNMP v1 agents.

string
onFailTryWith
Required
Constraints: default: v1

This options give the opportunity to issue another call when all retries have failed, using either snmpGet (v1) or snmpGetBulk (v2c) requests.

Possible values are : v1, v2c, disabled,
boolean
doNotUseGetBulkRequests
Optional

Use only get and getNext requests on agent.

array of string
doNotUseCapabilityList
Optional

The names of the capabilities not to be used on this agent

array of string
collectorNameList
Optional

The names of the collectors to which this agent can be distributed

integer
pollingPeriod
Optional
Constraints: default: 0

The polling period of the polling group that contains this agent

array of object
capabilitiesWithPollingPeriod
Optional

The capabilities assigned to the agent along with their polling periods. By default the polling period assigned to each capability is 0

string
discoveryStatus
Optional

The status of the discovery that was performed on the agent

Possible values are : SUCCESS, FAILED,
array of string
discoveryMessage
Optional

A list of error messages in case of failure of discovery.

Authentication
This operation uses the following authentication methods.
Responses
200

OK Returned updated configuration of snmpAgent

Returns SnmpAgentResponse of type(s) application/json
{
    "name": "10.107.119.4",
    "agentId": "10.107.119.4:161",
    "snmpV3Constraint": true,
    "ipAddress": "10.107.119.4",
    "snmpPort": 161,
    "transportProtocol": "udp",
    "snmpTimeout": 1000,
    "snmpNumberOfRetries": 5,
    "snmpVersion": "v3",
    "snmpCommunityOrUserV3Name": "autoshaaes256user!@#$",
    "snmpV3AuthenticationProtocol": "sha",
    "snmpV3AuthenticationPassword": "{8D36C853D676D96BC7570135AA9099681325844251C17FB1318B98C62FFEED95027C5015FDB8C5C597D333B0DC4AFD5A}",
    "snmpV3PrivacyProtocol": "aes256",
    "snmpV3PrivacyPassword": "{EEB7ED4CA8459627329D28EBB548F1B570A4A15D2FF230FDC441B11830268548220834677189B98E95614D111227E32F}",
    "maxBulkSize": 50,
    "v3ContextName": null,
    "v3ContextEngineId": null,
    "useV3ContextName": false,
    "useV3ContextEnginedId": false,
    "devType": "Switch",
    "contactPropertyValue": null,
    "devdescPropertyValue": null,
    "locationPropertyValue": null,
    "modelPropertyValue": null,
    "discoveryStarted": false,
    "v1TableRowPolling": false,
    "lastSysUpTimeValue": null,
    "lastSysUpTimePollTimestamp": null,
    "shortestPollingPeriod": null,
    "port": null,
    "onFailTryWith": "v1",
    "doNotUseGetBulkRequests": false,
    "refreshPropertiesLastRequestTime": null,
    "capabilitiesWithPollingPeriod": [
        {
            "capabilityName": "GENERIC-INTERFACES",
            "pollingPeriod": 10
        },
        {
            "capabilityName": "CISCO-MEMORY-OLD",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "CISCO-IPSLA-JITTER-STATSTABLE",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "GENERIC-SYSUPTIME",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "CISCO-IPSLA-HTTP-LATEST",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "CISCO-IPSLA-INVENTORY",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "CISCO-IPSLA-JITTER-LATEST",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "CISCO-MEMORY",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "CISCO-IPSLA-STATSTABLE",
            "pollingPeriod": 0
        },
        {
            "capabilityName": "CISCO-PROCESS-POST12.2(3.5)",
            "pollingPeriod": 0
        }
    ],
    "doNotUseCapabilityList": [
        "cap1",
        "cap2"
    ],
    "collectorNameList": [
        "collector-a"
    ],
    "pollingPeriod": 300,
    "discoveryStatus": null,
    "discoveryMessage": null
}
string
name
Required

This required attribute will set the device property to this value for all polled RawValues on this agent.

string
agentId
Optional

The id of the agent. The ID is a combination of 4 attributes "ipAddress" , "port", "v3ContextName" and "v3ContextEnginedId". The id is not required while adding/uploading an agent. This is only filled in the response of an API call

string
ipAddress
Required
Constraints: default: 0.0.0.0

This contains the IP address of the polled agent which will be used to contact the device.The pair IP address and port must be unique among all defined agents for this collector.

integer
snmpPort
Required
Constraints: default: 161

This port will be used in order to contact the SNMP agent on the polled device. Default one is 161.Please note that the pair IP address and port must be unique among all defined agents for this collector.

string
transportProtocol
Required
Constraints: default: udp

The protocol to use for data transportation. Default is UDP.

Possible values are : tcp, udp,
integer
snmpTimeout
Required
Constraints: default: 1000

The timeout, in milliseconds, before giving up while waiting for the agent response. 1000 is a good value that will fit most of the cases.

integer
snmpNumberOfRetries
Required
Constraints: default: 2

The number of retries before giving up while contacting the agent. 2 retries, which mean 3 attempts will be made, should be enough.

string
snmpVersion
Required
Constraints: default: v2c

The SNMP version to use when polling the agent. Most SNMP agents support v2c, which offers better efficiency than v1. Please note that SNMP v2c (or v3) must be used when polling 64 bits counters.

Possible values are : v1, v2c, v3,
string
snmpCommunityOrUserV3Name
Required
Constraints: default: public

The community string or SNMP v3 username, depending on the selected SNMP version. Filling this attribute is mandatory.

string
snmpV3AuthenticationProtocol
Optional
Constraints: default: noAuth

Only used with SNMP v3. It defines the protocol to use for authentication process.

Possible values are : md5, sha, noAuth, null,
string
snmpV3AuthenticationPassword
Optional

Only used with SNMP v3. It defines the authentication password. Leave blank if not using authentication.

string
snmpV3PrivacyProtocol
Optional

Only used with SNMP v3. It defines the protocol to use for privacy.

Possible values are : aes, des, aes192, aes256, noPriv, null,
string
snmpV3PrivacyPassword
Optional

Only used with SNMP v3. It defines the privacy password. SNMP v3 Authentication only is used when this password is not provided.

integer
maxBulkSize
Required
Constraints: default: 50

The maximum number of varbind in a snmpGetBulk request issued to this device. This applies only to SNMP v2c and v3 column-based polling. The default value is 50, which covers most cases. However, it may be required to lower this value if the devices SNMP agent times out when receiving oversized request instead of replying with the largest number of varbinds that may fit in the pdu.

string
v3ContextName
Optional

Only used with SNMP v3. It specifies the context name. Leave it empty for default context.

string
v3ContextEngineId
Optional

Only used with SNMP v3. It specifies the engine ID, as a hexadecimal format character string (i.e. : 0102AAAF ). Leave it empty for default engine ID.

boolean
useV3ContextName
Optional

Only used with SNMP v3 Include the context name as part of the raw values variable for this agent.

boolean
useV3ContextEnginedId
Optional

Only used with SNMP v3 Include the context engined ID as part of the raw values variable for this agent.

string
devType
Required
Constraints: default: Node

This attribute is required and describes the type of device this agent represents. All polled values from this agent will be tagged with this property.

string
contactPropertyValue
Optional

The SMARTS contact (sysContact) property for a specific snmpAgent. This is polled as soon as the polling group is created.

string
devdescPropertyValue
Optional

devdescPropertyValue

string
locationPropertyValue
Optional

locationPropertyValue

string
modelPropertyValue
Optional

modelPropertyValue

boolean
discoveryStarted
Optional

discoveryStarted

boolean
v1TableRowPolling
Optional

This attribute affects the way SNMP v1 agents are polled. false is the standard failsafe mode: table polling will be column-based, while true enables a more efficient row-based polling model. However, this feature is not correctly supported by all SNMP v1 agents.

integer
lastSysUpTimeValue
Optional

lastSysUpTimeValue

integer
lastSysUpTimePollTimestamp
Optional

lastSysUpTimePollTimestamp

integer
shortestPollingPeriod
Optional

shortestPollingPeriod

string
port
Optional

port

string
onFailTryWith
Required
Constraints: default: v1

This options give the opportunity to issue another call when all retries have failed, using either snmpGet (v1) or snmpGetBulk (v2c) requests.

Possible values are : v1, v2c, disabled,
boolean
doNotUseGetBulkRequests
Optional

Use only get and getNext requests on agent.

integer
refreshPropertiesLastRequestTime
Optional

refreshPropertiesLastRequestTime

array of string
doNotUseCapabilityList
Optional

The names of the capabilities not to be used on this agent

array of string
collectorNameList
Optional

The names of the collectors to which this agent can be distributed

integer
pollingPeriod
Optional
Constraints: default: 0

The polling period of the polling group that contains this agent

array of object
capabilitiesWithPollingPeriod
Optional

The capabilities assigned to the agent along with their polling periods. By default the polling period assigned to each capability is 0

string
discoveryStatus
Optional

The status of the discovery that was performed on the agent

Possible values are : SUCCESS, FAILED, null,
array of string
discoveryMessage
Optional

A list of error messages in case of failure of discovery.


400

BAD REQUEST Error in the request sent

Returns SnmpError of type(s) application/json
"SnmpError Object"
string
code
Optional

This code refers to the internal error codes used in the code base.

string
reason
Optional

This specifies the reason for failure.

string
status
Optional

This specifies the HTTP status code error


404

NOT FOUND Requested object not found

Returns SnmpError of type(s) application/json
"SnmpError Object"
string
code
Optional

This code refers to the internal error codes used in the code base.

string
reason
Optional

This specifies the reason for failure.

string
status
Optional

This specifies the HTTP status code error


500

INTERNAL SERVER ERROR Error on the server

Returns SnmpError of type(s) application/json
"SnmpError Object"
string
code
Optional

This code refers to the internal error codes used in the code base.

string
reason
Optional

This specifies the reason for failure.

string
status
Optional

This specifies the HTTP status code error


Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name:"string","ipAddress:"string","snmpPort:"integer","snmpVersion:"string","snmpCommunityOrUserV3Name:"string","snmpTimeout:"integer","snmpNumberOfRetries:"integer","transportProtocol:"string","maxBulkSize:"integer","onFailTryWith:"string","devType:"string"}' https://{api_host}/tcsa/api/v1/snmp/agents