84 lines
3.7 KiB
JSON
84 lines
3.7 KiB
JSON
{
|
|
"type": "kafka",
|
|
"dataSchema": {
|
|
"dataSource": "traffic_general_stat",
|
|
"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" }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"metricsSpec":[
|
|
{ "type":"longSum", "name":"sessions", "fieldName":"sessions" },
|
|
{ "type":"longMax", "name":"active_sessions", "fieldName":"active_sessions" },
|
|
{ "type":"longSum", "name":"closed_sessions", "fieldName":"closed_sessions" },
|
|
{ "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" },
|
|
{ "type":"longSum", "name":"asymmetric_c2s_flows", "fieldName":"asymmetric_c2s_flows" },
|
|
{ "type":"longSum", "name":"asymmetric_s2c_flows", "fieldName":"asymmetric_s2c_flows" },
|
|
{ "type":"longSum", "name":"tcp_syn_pkts", "fieldName":"tcp_syn_pkts" },
|
|
{ "type":"longSum", "name":"tcp_ack_pkts", "fieldName":"tcp_ack_pkts" },
|
|
{ "type":"longSum", "name":"tcp_fin_pkts", "fieldName":"tcp_fin_pkts" },
|
|
{ "type":"longSum", "name":"tcp_rst_pkts", "fieldName":"tcp_rst_pkts" }
|
|
],
|
|
"granularitySpec": {
|
|
"type": "uniform",
|
|
"segmentGranularity": "DAY",
|
|
"queryGranularity": {"type": "period", "period": "PT1S"},
|
|
"rollup": true
|
|
},
|
|
"transformSpec" :{
|
|
"transforms":[
|
|
{"type": "expression", "name": "sessions", "expression": "nvl(sessions, 0)"},
|
|
{"type": "expression", "name": "active_sessions", "expression": "nvl(active_sessions, 0)"},
|
|
{"type": "expression", "name": "closed_sessions", "expression": "nvl(closed_sessions, 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)"},
|
|
{"type": "expression", "name": "asymmetric_c2s_flows", "expression": "nvl(asymmetric_c2s_flows, 0)"},
|
|
{"type": "expression", "name": "asymmetric_s2c_flows", "expression": "nvl(asymmetric_s2c_flows, 0)"},
|
|
{"type": "expression", "name": "tcp_syn_pkts", "expression": "nvl(tcp_syn_pkts, 0)"},
|
|
{"type": "expression", "name": "tcp_ack_pkts", "expression": "nvl(tcp_ack_pkts, 0)"},
|
|
{"type": "expression", "name": "tcp_fin_pkts", "expression": "nvl(tcp_fin_pkts, 0)"},
|
|
{"type": "expression", "name": "tcp_rst_pkts", "expression": "nvl(tcp_rst_pkts, 0)"}
|
|
],
|
|
"filter": { "type": "selector", "dimension": "name", "value": "traffic_general_stat" }
|
|
}
|
|
},
|
|
"tuningConfig": {
|
|
"type": "kafka",
|
|
"maxRowsPerSegment": 5000000,
|
|
"resetOffsetAutomatically": true,
|
|
"reportParseExceptions": false
|
|
},
|
|
"ioConfig": {
|
|
"topic": "NETWORK-TRAFFIC-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\";"
|
|
}
|
|
}
|
|
}
|
|
|