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
- Basic Agent - ipAddress, name
- Standard agent - ipAddress, name, snmpCommunityOrUserV3Name, snmpPort, snmpVersion, [collectorName, pollingPeriod, capability, doNotDiscoverCapability]
- 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-
- 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.
The separator of file that is being uploaded
The name of the current snmp integration
snmp-integration
{
"file": "string"
}
The actual file that is uploaded. This can be a csv, txt, or xml file.
OK Returned list of all uploaded agents
[
{
"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
}
]
BAD REQUEST Error in request sent
"SnmpError Object"
This code refers to the internal error codes used in the code base.
This specifies the reason for failure.
This specifies the HTTP status code error
INTERNAL SERVER ERROR Error on the server
"SnmpError Object"
This code refers to the internal error codes used in the code base.
This specifies the reason for failure.
This specifies the HTTP status code error
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: multipart/form-data' -d '{"file:"string"}' https://{api_host}/tcsa/api/v1/snmp/agents/upload