75 lines
2.6 KiB
JSON
75 lines
2.6 KiB
JSON
{
|
|
"type": "kafka",
|
|
"dataSchema": {
|
|
"dataSource": "top_internal_ips",
|
|
"parser": {
|
|
"type": "string",
|
|
"parseSpec": {
|
|
"format": "json",
|
|
"timestampSpec": {
|
|
"column": "timestamp_ms",
|
|
"format": "millis"
|
|
},
|
|
"dimensionsSpec": {
|
|
"dimensions": [
|
|
{"name": "vsys_id","type": "long"},
|
|
"device_id",
|
|
"device_group",
|
|
"data_center",
|
|
"rank_by",
|
|
"internal_ip"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"metricsSpec" : [
|
|
{ "type" : "longSum", "name" : "sessions", "fieldName" : "sessions" },
|
|
{ "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
|
|
{ "type" : "longSum", "name" : "in_bytes", "fieldName" : "in_bytes" },
|
|
{ "type" : "longSum", "name" : "out_bytes", "fieldName" : "out_bytes" },
|
|
{ "type" : "longSum", "name" : "pkts", "fieldName" : "pkts" },
|
|
{ "type" : "longSum", "name" : "in_pkts", "fieldName" : "in_pkts" },
|
|
{ "type" : "longSum", "name" : "out_pkts", "fieldName" : "out_pkts" }
|
|
],
|
|
"granularitySpec": {
|
|
"type": "uniform",
|
|
"segmentGranularity": "DAY",
|
|
"queryGranularity": {"type": "period", "period": "PT1M"},
|
|
"rollup": true
|
|
},
|
|
"transformSpec" :{
|
|
"transforms":[
|
|
{"type": "expression", "name": "sessions", "expression": "nvl(sessions, 0)"},
|
|
{"type": "expression", "name": "bytes", "expression": "nvl(bytes, 0)"},
|
|
{"type": "expression", "name": "in_bytes", "expression": "nvl(in_bytes, 0)"},
|
|
{"type": "expression", "name": "out_bytes", "expression": "nvl(out_bytes, 0)"},
|
|
{"type": "expression", "name": "pkts", "expression": "nvl(pkts, 0)"},
|
|
{"type": "expression", "name": "in_pkts", "expression": "nvl(in_pkts, 0)"},
|
|
{"type": "expression", "name": "out_pkts", "expression": "nvl(out_pkts, 0)"}
|
|
],
|
|
"filter": {"type": "selector", "dimension": "name", "value": "top_internal_ip"}
|
|
}
|
|
},
|
|
"tuningConfig": {
|
|
"type": "kafka",
|
|
"resetOffsetAutomatically": true,
|
|
"reportParseExceptions": false
|
|
},
|
|
"ioConfig": {
|
|
"topic": "TOPK-METRIC",
|
|
"taskCount": 1,
|
|
"replicas": 1,
|
|
"taskDuration": "PT1H",
|
|
"completionTimeout": "PT30M",
|
|
"consumerProperties": {
|
|
"bootstrap.servers": "kafkabootstrap",
|
|
"sasl.mechanism": "PLAIN",
|
|
"security.protocol": "SASL_PLAINTEXT",
|
|
"sasl.jaas.config": "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"admin\" password=\"galaxy2019\";"
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|