105 lines
3.3 KiB
JSON
105 lines
3.3 KiB
JSON
{
|
|
"type": "kafka",
|
|
"dataSchema": {
|
|
"dataSource": "statistics_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"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"metricsSpec": [
|
|
{
|
|
"type": "longSum",
|
|
"name": "in_bytes",
|
|
"fieldName": "in_bytes"
|
|
},
|
|
{
|
|
"type": "longSum",
|
|
"name": "out_bytes",
|
|
"fieldName": "out_bytes"
|
|
},
|
|
{
|
|
"type": "longSum",
|
|
"name": "hit_count",
|
|
"fieldName": "hit_count"
|
|
},
|
|
{
|
|
"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": "vsys_id", "expression": "nvl(vsys_id,1)"},
|
|
{"type": "expression", "name": "in_bytes", "expression": "nvl(in_bytes, 0)"},
|
|
{"type": "expression", "name": "out_bytes", "expression": "nvl(out_bytes, 0)"},
|
|
{"type": "expression", "name": "hit_count", "expression": "nvl(hit_count, 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": "statistics_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\";"
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|