[{"label":"Latest (2.0.1)","version":"latest"}]
telco-cloud-service-assurance

Create Collector

Description

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

Request

Request

URL

URL


post
https://{api_host}tcsa.host.com/dcc/v1/collectors
Copy

Query Parameters

Query Parameters

string
name Optional

Name of the collector instance

name example
"demo-collector"

string
packageName Required

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

packageName example
"cisco-aci"

Request Body

Request Body

CollectorRequestObject of mimetype application/json Required

Provision a new collector Block.

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

Target kafka cluster topic name


source Required

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

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns object of type application/json

Returns Block Config for the newly created block

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

Errors

400

Invalid Request sent by the user


401

User authentication failed


403

Access to the requested resource/operation is forbidden


404

Cannot find requested resource


500

Internal server error

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"sink":{"topic":"vsa_metrics_raw"},"source":{"mapping_name":"KMD RegEx","properties":{"application.id":"omega-kafka-collector","auto.offset.reset":"earliest","bootstrap.servers":"localhost:9092","group.id":"omega-consumer-group","key.deserializer":"org.apache.kafka.common.serialization.StringDeserializer","password":"string","username":"string","value.deserializer":"org.apache.kafka.common.serialization.StringDeserializer"},"topic":"metrics1","type":"json_metrics"}}' https://{api_host}tcsa.host.com/dcc/v1/collectors?packageName=cisco-aci


Feedback

Was this page helpful?