晚上服务器部署模式
This commit is contained in:
@@ -11,9 +11,17 @@
|
||||
|
||||
- name: "Templates telegraf_collect.conf"
|
||||
template:
|
||||
src: "{{role_path}}/templates/telegraf_collect.conf.j2"
|
||||
src: "{{role_path}}/templates/telegraf_collect.conf_adc.j2"
|
||||
dest: /etc/telegraf/telegraf_collect.conf
|
||||
tags: template
|
||||
when: tsg_running_type == 2
|
||||
|
||||
- name: "Templates telegraf_collect.conf"
|
||||
template:
|
||||
src: "{{role_path}}/templates/telegraf_collect.conf_server.j2"
|
||||
dest: /etc/telegraf/telegraf_collect.conf
|
||||
tags: template
|
||||
when: tsg_running_type != 2
|
||||
|
||||
- name: "copy telegraf_collect.service to destination server"
|
||||
copy:
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
[global_tags]
|
||||
blade = "{{bladename}}"
|
||||
[agent]
|
||||
interval = "5s"
|
||||
round_interval = true
|
||||
metric_batch_size = 1000000
|
||||
metric_buffer_limit = 1000000
|
||||
collection_jitter = "0s"
|
||||
flush_interval = "1s"
|
||||
flush_jitter = "0s"
|
||||
precision = ""
|
||||
debug = false
|
||||
quiet = false
|
||||
logfile = ""
|
||||
hostname = ""
|
||||
omit_hostname = false
|
||||
|
||||
[[outputs.file]]
|
||||
files = ["stdout", "/tmp/collect.out"]
|
||||
data_format = "json"
|
||||
rotation_interval = "1h"
|
||||
rotation_max_size = "100MB"
|
||||
rotation_max_archives = 5
|
||||
|
||||
[[outputs.socket_writer]]
|
||||
address = "udp://192.168.100.1:8100"
|
||||
|
||||
|
||||
{% if bladename == "mcn0" %}
|
||||
[[inputs.procstat]]
|
||||
exe= "sapp"
|
||||
[[inputs.procstat]]
|
||||
exe="certstore"
|
||||
{% else %}
|
||||
[[inputs.procstat]]
|
||||
exe= "tfe"
|
||||
{% endif %}
|
||||
|
||||
[[inputs.systemd_units]]
|
||||
unittype = "service"
|
||||
timeout = "1s"
|
||||
|
||||
[[inputs.cpu]]
|
||||
percpu = false
|
||||
totalcpu = true
|
||||
collect_cpu_time = false
|
||||
report_active = false
|
||||
fieldpass = ["usage_idle", "usage_iowait", "usage_system", "usage_user"]
|
||||
|
||||
[[inputs.system]]
|
||||
fieldpass = ["load1", "load5", "load15"]
|
||||
|
||||
[[inputs.mem]]
|
||||
fieldpass = ["available"]
|
||||
|
||||
[[inputs.disk]]
|
||||
fieldpass = ["free", "inodes_free", "used_percent"]
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
|
||||
|
||||
[[inputs.diskio]]
|
||||
fieldpass = ["read_bytes", "write_bytes", "reads","writes"]
|
||||
|
||||
[[inputs.netstat]]
|
||||
|
||||
[[inputs.net]]
|
||||
ignore_protocol_stats = false
|
||||
interfaces = ["ens*"]
|
||||
|
||||
[[inputs.kernel]]
|
||||
|
||||
[[inputs.udp_listener]]
|
||||
ServiceAddress= ":58100"
|
||||
data_format = "influx"
|
||||
@@ -0,0 +1,70 @@
|
||||
[global_tags]
|
||||
blade = "server"
|
||||
[agent]
|
||||
interval = "5s"
|
||||
round_interval = true
|
||||
metric_batch_size = 1000000
|
||||
metric_buffer_limit = 1000000
|
||||
collection_jitter = "0s"
|
||||
flush_interval = "1s"
|
||||
flush_jitter = "0s"
|
||||
precision = ""
|
||||
debug = false
|
||||
quiet = false
|
||||
logfile = ""
|
||||
hostname = ""
|
||||
omit_hostname = false
|
||||
|
||||
[[outputs.file]]
|
||||
files = ["stdout", "/tmp/collect.out"]
|
||||
data_format = "json"
|
||||
rotation_interval = "1h"
|
||||
rotation_max_size = "100MB"
|
||||
rotation_max_archives = 5
|
||||
|
||||
[[outputs.socket_writer]]
|
||||
address = "udp://192.168.100.1:8100"
|
||||
|
||||
|
||||
[[inputs.procstat]]
|
||||
exe= "sapp"
|
||||
[[inputs.procstat]]
|
||||
exe="certstore"
|
||||
[[inputs.procstat]]
|
||||
exe= "tfe"
|
||||
|
||||
[[inputs.systemd_units]]
|
||||
unittype = "service"
|
||||
timeout = "1s"
|
||||
|
||||
[[inputs.cpu]]
|
||||
percpu = false
|
||||
totalcpu = true
|
||||
collect_cpu_time = false
|
||||
report_active = false
|
||||
fieldpass = ["usage_idle", "usage_iowait", "usage_system", "usage_user"]
|
||||
|
||||
[[inputs.system]]
|
||||
fieldpass = ["load1", "load5", "load15"]
|
||||
|
||||
[[inputs.mem]]
|
||||
fieldpass = ["available"]
|
||||
|
||||
[[inputs.disk]]
|
||||
fieldpass = ["free", "inodes_free", "used_percent"]
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
|
||||
|
||||
[[inputs.diskio]]
|
||||
fieldpass = ["read_bytes", "write_bytes", "reads","writes"]
|
||||
|
||||
[[inputs.netstat]]
|
||||
|
||||
[[inputs.net]]
|
||||
ignore_protocol_stats = false
|
||||
interfaces = ["ens*"]
|
||||
|
||||
[[inputs.kernel]]
|
||||
|
||||
[[inputs.udp_listener]]
|
||||
ServiceAddress= ":58100"
|
||||
data_format = "influx"
|
||||
Reference in New Issue
Block a user