curl --location --request POST 'https://api.flashcat.cloud/api/n9e-plus/collect' \
--header 'X-User-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "111",
"group_id": 1,
"queries": [
{
"key": "hosts",
"op": "==",
"values": [
"test-ent-1-n9e-10.0.0.234"
]
},
{
"key": "group_ids",
"op": "==",
"values": [
1
]
}
],
"active_target_nums": 0,
"heartbeat_max_duration": 300,
"enable_time": [],
"component_id": 37,
"cate": "logs",
"custom_params": {
"send_type": "kafka", // kafka,n9e
"kafka_config": {
"datasource_id": 1,
"kafka_version": "3.3.2",
"producer_timeout": 10,
"compression_enable": false,
"compression_algorithm": "none",
"batch_wait": 5
}
},
"content": "# # collect interval\n# interval = 15\n\n# [[instances]]\n## The Nsq API URI used to collect statistical information.\n# targets = [\"http://localhost:4151\"]\n \n# headers={Authorization=\"\", X-Forwarded-For=\"\", Host=\"\"}\n \n# timeout=\"5s\"\n\n# # basic auth\n# username=\"\"\n# password=\"\"\n\n## append some labels for series\n# labels = { product=\"nsq\" }\n\n## interval = global.interval * interval_times\n# interval_times = 1\n",
"disabled": 0,
"id": 2
}'