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

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

{
    "blockID": "smarts-metrics",
    "message": "Block successfully deployed",
    "time": "2019-02-25 23:25:06.824015",
    "instanceId": "demo-collector",
    "params": {
        "smarts-metrics": {
            "primary": {
                "collect": {
                    "sm": [
                        {
                            "host": "localhost",
                            "port": "12345",
                            "name": "INCHARGE-AM-PM",
                            "username": "admin",
                            "password": "{FAF745B9C01D858B45D7F644CE55D30064E409A847AA2351B30B6FB74B3BA7FDEC5A9315ECA00C2F69D9C425039CA1F1}",
                            "type": "both",
                            "topologyPollingPeriod": "3600",
                            "metricPollingPeriod": "240",
                            "backendgroup": "group",
                            "thread": {
                                "poolsize": "3"
                            },
                            "dmconnection": {
                                "poolsize": "3"
                            }
                        }
                    ]
                }
            },
            "kafka": {
                "cluster": {
                    "node": [
                        {
                            "host": "localhost",
                            "port": "9092"
                        }
                    ],
                    "topic": "default-topic",
                    "auth": "true",
                    "username": "admin",
                    "password": "admin-secret"
                }
            }
        }
    }
}

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