一、引擎设计
扫描流程
数据格式
任务配置
{
"task_name": "实时数据",
"task_cron": {
"interval": {
"second": "300"
},
"notify": "xxx"
},
"task_content": {
"department": "实时数据",
"agent_type": "classification",
"default_level": {
"status": 0,
"level": 3
},
"rules": "lx-00007,lx-00001",
"collect_type": "jdbc",
"collect_value": {
"bat": 0,
"action": 0,
"type": "mysql",
"host": "tx",
"port": "3306",
"user": "ss",
"password": "ss",
"db": "ss"
},
"callback_adjust": 0,
"callback_type": "api",
"callback_value": {
"bat": 0,
"type": "token",
"method": "post",
"url": "xxx",
"header": {
"field": "x-token",
"value": ""
}
}
}
}
{
"task_name": "xxxx",
"task_cron": {"interval": {"second": "300"}, "notify": "xxx"},
"task_content": {
"department": "大数据",
"agent_type": "classification",
"default_level": {"status": 0, "level": 3},
"rules": "lx-00007",
"collect_type": "api",
"collect_value": {
"bat": 5,
"action": 0,
"timeout": 20,
"type": "m2m",
"method": "get",
"url": "https://xxx?pageNo={pageNum}&pageSize={pageSize}&lastModifiedAtMin=",
"domain_id": "xxx",
"m2m_service_id": "xx",
"scopes": "sss"
},
"callback_adjust": 1,
"callback_type": "api",
"callback_value": {
"bat": 10,
"timeout": 20,
"type": "m2m",
"method": "post",
"url": "ccc",
"domain_id": "cc",
"m2m_service_id": "c",
"scopes": "cc"
}
}
}
采集模版
struct(结构化)
{
"task_id": "TASK-20230224162140-56o4",
"department": "业务部门",
"ext": {},
"struct": {
"type": "mysql",
"db_name": "user",
"db_author": "",
"table_name": "t_user",
"table_comment": "用户表",
"table_author": "",
"field_name": "created_at",
"field_type": "datetime",
"field_comment": "创建时间",
"field_org_level": "",
"field_values": []
}
}
half(半结构化)
{
"basic": {
"department": "业务部门",
"db_author": "xx",
"table_author": "xx",
"ext": {}
},
"half": {
"type": "http",
}
}
object(非结构化)
识别数据
结果数据