增加sce telegraf.conf
This commit is contained in:
66
conf/sce_telegraf.conf
Normal file
66
conf/sce_telegraf.conf
Normal file
@@ -0,0 +1,66 @@
|
||||
# Telegraf Configuration
|
||||
[global_tags]
|
||||
device_id = "123456"
|
||||
vsys_id = "1"
|
||||
device_group = "group-xxg-x-test"
|
||||
data_center = "center-xxg-x-test"
|
||||
|
||||
[agent]
|
||||
interval = "1s"
|
||||
round_interval = true
|
||||
metric_batch_size = 1000
|
||||
metric_buffer_limit = 10000
|
||||
collection_jitter = "0s"
|
||||
flush_interval = "1s"
|
||||
flush_jitter = "0s"
|
||||
precision = ""
|
||||
debug = false
|
||||
quiet = false
|
||||
logfile = ""
|
||||
hostname = ""
|
||||
omit_hostname = true
|
||||
|
||||
[[inputs.socket_listener]]
|
||||
service_address = "udp://:8300"
|
||||
data_format = "influx"
|
||||
|
||||
[[processors.rename]]
|
||||
[[processors.rename.replace]]
|
||||
field = "sent_pkts_sum"
|
||||
dest = "sent_pkts"
|
||||
|
||||
[[processors.rename.replace]]
|
||||
field = "sent_bytes_sum"
|
||||
dest = "sent_bytes"
|
||||
|
||||
[[processors.rename.replace]]
|
||||
field = "recv_pkts_sum"
|
||||
dest = "recv_pkts"
|
||||
|
||||
[[processors.rename.replace]]
|
||||
field = "recv_bytes_sum"
|
||||
dest = "recv_bytes"
|
||||
|
||||
[[aggregators.basicstats]]
|
||||
period = "1s"
|
||||
drop_original = true
|
||||
stats = ["sum"]
|
||||
fieldpass = ["sent_pkts", "sent_bytes", "recv_pkts", "recv_bytes"]
|
||||
namepass = ["service_chaining_metrics"] # only "pass" swap metrics through the aggregator.
|
||||
|
||||
[[outputs.file]]
|
||||
files = ["/tmp/sce_metrics.json", "stdout"]
|
||||
data_format = "json"
|
||||
json_transformation = '''
|
||||
$merge([{"timestamp": timestamp}, tags, fields])
|
||||
'''
|
||||
|
||||
[[outputs.kafka]]
|
||||
sasl_username = "admin"
|
||||
sasl_password = "galaxy2019"
|
||||
brokers = [ "192.168.44.12:9094" ]
|
||||
topic = "SERVICE-CHAINING-METRICS"
|
||||
data_format = "json"
|
||||
json_transformation = '''
|
||||
$merge([{"timestamp": timestamp}, tags, fields])
|
||||
'''
|
||||
Reference in New Issue
Block a user