73 lines
2.4 KiB
JSON
73 lines
2.4 KiB
JSON
{
|
|
"type": "kafka",
|
|
"dataSchema": {
|
|
"dataSource": "proxy_rule_hits",
|
|
"parser": {
|
|
"type": "string",
|
|
"parseSpec": {
|
|
"format": "json",
|
|
"timestampSpec": {
|
|
"column": "timestamp_ms",
|
|
"format": "millis"
|
|
},
|
|
"dimensionsSpec": {
|
|
"dimensions": [
|
|
"device_id",
|
|
"device_group",
|
|
"data_center",
|
|
{ "name": "vsys_id", "type": "long" },
|
|
{ "name": "rule_id", "type": "long" },
|
|
{ "name": "pinning_status", "type": "string" },
|
|
{ "name": "action", "type": "long" },
|
|
{ "name": "sub_action", "type": "string" }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"metricsSpec" : [
|
|
{ "type" : "longSum", "name" : "hit_count", "fieldName" : "hit_count" },
|
|
{ "type" : "longSum", "name" : "in_bytes", "fieldName" : "in_bytes" },
|
|
{ "type" : "longSum", "name" : "out_bytes", "fieldName" : "out_bytes" },
|
|
{ "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": "PT1S"},
|
|
"rollup": true
|
|
},
|
|
"transformSpec" :{
|
|
"transforms":[
|
|
{"type": "expression", "name": "hit_count", "expression": "nvl(hit_count, 0)"},
|
|
{"type": "expression", "name": "in_bytes", "expression": "nvl(in_bytes, 0)"},
|
|
{"type": "expression", "name": "out_bytes", "expression": "nvl(out_bytes, 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": "proxy_rule_hits" }
|
|
}
|
|
},
|
|
"tuningConfig": {
|
|
"type": "kafka",
|
|
"maxRowsPerSegment": 5000000,
|
|
"resetOffsetAutomatically": true,
|
|
"reportParseExceptions": false
|
|
},
|
|
"ioConfig": {
|
|
"topic": "POLICY-RULE-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\";"
|
|
}
|
|
}
|
|
}
|
|
|
|
|