Create Collector

Create Collector

This API is useful for creating a new collector instance of given type( like cisco-aci,vims,kafka-collector )

Request
URI
POST
https://{api_host}/tcsa.host.com/dcc/v1/collectors
COPY
Query Parameters
string
packageName
Required

Package name to be used to create collector e.g. cisco-aci, smarts-metrics

packageName example
cisco-aci
string
name
Optional

Name of the collector instance. If no name is provided then it is created as a dm collector. DM collectors do not show up by default on the UI.

name example
demo-collector

Request Body

Provision a new collector Block.

CollectorRequestObject of type(s) application/json
Required
{
    "source": {
        "topic": "metrics1",
        "type": "json_metrics",
        "mapping_name": "KMD RegEx",
        "properties": {
            "bootstrap.servers": "localhost:9092",
            "username": "string",
            "password": "string",
            "application.id": "omega-kafka-collector",
            "auto.offset.reset": "earliest",
            "group.id": "omega-consumer-group",
            "key.deserializer": "org.apache.kafka.common.serialization.StringDeserializer",
            "value.deserializer": "org.apache.kafka.common.serialization.StringDeserializer"
        }
    },
    "sink": {
        "topic": "vsa_metrics_raw"
    }
}
source
Required

Source cluster details e.g. source topic name , mapping name etc.

sink
Required

Target kafka cluster topic name

Authentication
This operation uses the following authentication methods.
Responses
200

Returns Block Config for the newly created block

Returns CollectorResponseObject of type(s) application/json
{
    "blockID": "cisco-aci",
    "message": "Block successfully deployed",
    "time": "2023-11-22 08:17:04.144411",
    "name": "test-aci",
    "instanceId": "test-aci",
    "containerId": "test-aci",
    "display_name": "test-aci",
    "params": "{\n    \"collect\": {\n      \"collectormode\": \"acidiscovery\"\n    },\n    \"aci\": {\n      \"host\": [\n        {\n          \"hostname\": \"localhost\",\n          \"username\": \"admin\",\n          \"password\": \"{6F0B1CB041DEB7A3CA71B3E15A56CDB1F11850A1C66911793CAD2A12DF38B94C5C6291BEB130396AF49ED2C988617FB0}\",\n          \"port\": \"443\",\n          \"protocol\": \"https\"\n        }\n      ]\n    },\n    \"controllerNode\": [\n      {\n        \"host\": \"localhost\"\n      }\n    ],\n    \"kafka\": {\n      \"cluster\": {\n        \"node\": [\n          {\n            \"host\": \"localhost\",\n            \"port\": \"9092\"\n          }\n        ],\n        \"topic\": \"default-topic\",\n        \"auth\": \"true\",\n        \"username\": \"admin\",\n        \"password\": \"{16A8027BDEAB404C2D696034921260F488BB4E6A591CE696DBB5F9C7177C1409A575AB5E93CE1165829EE1C7CB6E81F3}\"\n      }\n    },\n    \"memory_max\": \"1024\",\n    \"advanced_options\": \"true\",\n    \"discovery_threads\": \"20\",\n    \"collection_interval\": \"240\"\n  }"
}
string
blockID
Optional

The package type of the collector created

string
instanceId
Optional

The instanceId of the collector created.

string
containerId
Optional

The container Id of the collector created.

string
display_name
Optional

The name of the collector as provided by the user

string
message
Optional

This attribute provides information regarding the faiure or success of collector creation

string
params
Optional

The configuration with which the collector was set.

string
time
Optional

The time of creation of the collector object


400

Invalid Request sent by the user

Operation doesn't return any data structure

401

User authentication failed

Operation doesn't return any data structure

403

Access to the requested resource/operation is forbidden

Operation doesn't return any data structure

404

Cannot find requested resource

Operation doesn't return any data structure

500

Internal server error

Operation doesn't return any data structure