Upload Snmp Agents

Upload Snmp Agents

A Seed file can be uploaded in two formats, a comma separated file, or a tab separated file.

CSV - The user can provide csv files of three different syntaxes

  1. Basic Agent - ipAddress, name
  2. Standard agent - ipAddress, name, snmpCommunityOrUserV3Name, snmpPort, snmpVersion, [collectorName, pollingPeriod, capability, doNotDiscoverCapability]
  3. Full agent - name, ipAddress, snmpPort, transportProtocol, timeout, retries, snmpVersion, snmpCommunityOrUserV3Name, snmpV3AuthenticationProtocol, snmpV3AuthenticationPassword, snmpV3PrivacyProtocol, snmpV3PrivacyPassword, devtype, onFailTryWith, [collectorName, pollingPeriod, capability, doNotDiscoverCapability]

TAB - The user can provide a tab separated '.txt' file with key value pairs of the attributes. For example-

  1. name=name1 snmpPort=161 devtype=Router ipAddress=192.168.0.1 capability=ipsla snmpCommunityOrUserV3Name=commString1 collectorName=snmp-collector For providing multiple collectorNames or capabilities two formats are supported a. Space separated values. example - collectorName=collector-a collector-b b. Duplicated keys. example - collectorName=collector-a colectorName=collector-b The keys supported are specified in the VMware docs TCSA web page.

The attributes enclosed in [] are non-mandatory attributes and can be skipped.

Request
URI
POST
https://{api_host}/tcsa/api/v1/snmp/agents/upload
COPY
Query Parameters
string
separator
Optional

The separator of file that is being uploaded

Possible values are : comma, tab,
string
snmpIntegration
Optional

The name of the current snmp integration

snmpIntegration example
snmp-integration

Request Body
SnmpFileObject of type(s) multipart/form-data
Required
{
    "file": "string"
}
string As binary As binary
file
Required

The actual file that is uploaded. This can be a csv, txt, or xml file.

Authentication
This operation uses the following authentication methods.
Responses
200

OK Returned list of all uploaded agents

Returns Array of SnmpAgentResponse of type(s) application/json
[
    {
        "agentId": "10.106.232.11:161",
        "snmpV3Constraint": true,
        "name": "Agent1",
        "ipAddress": "10.106.232.11",
        "snmpPort": 161,
        "transportProtocol": "udp",
        "snmpTimeout": 3000,
        "snmpNumberOfRetries": 2,
        "snmpVersion": "v2c",
        "snmpCommunityOrUserV3Name": "{56DD2A113EEB2BF320BF00F410AE4D0DC8CE6600B95C8D29D663990795C039F0848CBFFE3EEEDE2D3A51B50425DD3638}",
        "snmpV3AuthenticationProtocol": null,
        "snmpV3AuthenticationPassword": null,
        "snmpV3PrivacyProtocol": null,
        "snmpV3PrivacyPassword": null,
        "maxBulkSize": 50,
        "v3ContextName": null,
        "v3ContextEngineId": null,
        "useV3ContextName": false,
        "useV3ContextEnginedId": false,
        "devType": "Node",
        "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": [],
        "doNotUseCapabilityList": [],
        "collectorNameList": [],
        "pollingPeriod": 0,
        "discoveryStatus": null,
        "discoveryMessage": null
    }
]

400

BAD REQUEST Error in 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


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 POST -H 'Authorization: <value>' -H 'Content-Type: multipart/form-data' -d '{"file:"string"}' https://{api_host}/tcsa/api/v1/snmp/agents/upload