bugfix:更新telegraf到v1.25.0,修改sapp necessary_plug_list.conf配置文件,修改/etc/consul.d目录权限

This commit is contained in:
fumingwei
2023-02-10 13:19:10 +08:00
committed by 付明卫
parent e61a12cdd9
commit cceea9f706
17 changed files with 89 additions and 14 deletions

View File

@@ -16,6 +16,7 @@
file:
path: /etc/consul.d/
state: directory
mode: 0777
when: runtime_env != 'TSG-X-P0906'
- name: "mkdir -p /opt/tsg/consul/bin"

View File

@@ -17,6 +17,7 @@ copyConfigmap2Dest(){
/usr/bin/cp /opt/tsg/config/app_sketch_local.inf /opt/tsg/sapp/plug/business/app_sketch_local/app_sketch_local.inf
/usr/bin/cp /opt/tsg/config/vlan_flipping_map.conf /opt/tsg/sapp/etc/vlan_flipping_map.conf
/usr/bin/cp /opt/tsg/config/firewall.inf /opt/tsg/sapp/plug/business/firewall/firewall.inf
/usr/bin/cp /opt/tsg/config/necessary_plug_list.conf /opt/tsg/sapp/etc/necessary_plug_list.conf
}
prestart(){

View File

@@ -23,17 +23,13 @@
./plug/business/tsg_conn_sketch/tsg_conn_sketch.inf
./plug/business/capture_packet_plug/capture_packet_plug.inf
./plug/business/kni/kni.inf
./plug/business/fw_ssl_plug/fw_ssl_plug.inf
./plug/business/fw_http_plug/fw_http_plug.inf
./plug/business/fw_dns_plug/fw_dns_plug.inf
./plug/business/fw_mail_plug/fw_mail_plug.inf
./plug/business/fw_ftp_plug/fw_ftp_plug.inf
./plug/business/fw_quic_plug/fw_quic_plug.inf
./plug/business/fw_voip_plug/fw_voip_plug.inf
./plug/business/conn_telemetry/conn_telemetry.inf
./plug/business/app_sketch_local/app_sketch_local.inf
./plug/protocol/gtp/gtp.inf
./plug/business/gtp_signaling_plug/gtp_signaling_plug.inf
./plug/business/http_healthcheck/http_healthcheck.inf
./plug/platform/tsg_ddos_sketch/tsg_ddos_sketch.inf
./plug/business/radius_collect_plug/radius_collect_plug.inf
./plug/business/radius_collect_plug/radius_collect_plug.inf
./plug/platform/shaping_master/shaping_master.inf
./plug/business/firewall/firewall.inf

View File

@@ -1,2 +1,2 @@
[Service]
ExecStartPre=/opt/tsg/consul/bin/set_shaping_addr.sh
ExecStartPre=/opt/tsg/sapp/bin/set_shaping_addr.sh

View File

@@ -1,12 +1,12 @@
- name: "copy telegraf.rpm to destination server"
copy:
src: "{{ role_path }}/files/telegraf-1.13.0-1.x86_64.rpm"
src: "{{ role_path }}/files/telegraf-1.25.0-1.x86_64.rpm"
dest: /tmp
- name: "install telegraf"
yum:
name:
- /tmp/telegraf-1.13.0-1.x86_64.rpm
- /tmp/telegraf-1.25.0-1.x86_64.rpm
state: present
disable_gpg_check: yes

View File

@@ -2,13 +2,19 @@
[global_tags]
device_id = "${device_id}"
vsys_id = "{% raw %}{{ vsys_id }}{% endraw %}"
{% raw %}{% for device_tag in device.tags %}
{% raw %}{% if data_center.name is defined %}
data_center = "{{ data_center.name }}"
{% endif %}
{% if device.tags is defined %}
{% for device_tag in device.tags %}
{% for key,value in device_tag.items() %}
{{ key }} = "{{value}}"
{% endfor %}
{% endfor %}
{% endif %}
{% endraw %}
[agent]
interval = "1s"
round_interval = true

View File

@@ -1,11 +1,16 @@
[global_tags]
device_id = "${device_id}"
vsys_id = "{% raw %}{{ vsys_id }}{% endraw %}"
{% raw %}{% for device_tag in device.tags %}
{% raw %}{% if data_center.name is defined %}
data_center = "{{ data_center.name }}"
{% endif %}
{% if device.tags is defined %}
{% for device_tag in device.tags %}
{% for key,value in device_tag.items() %}
{{ key }} = "{{value}}"
{% endfor %}
{% endfor %}
{% endif %}
{% endraw %}
[agent]

View File

@@ -0,0 +1,35 @@
#以下插件如果加载,初始化失败, sapp平台会退出;
#插件的路径来自配置文件 ./plug/conflist.inf, 不需要加段落标识[platform],[protocol],[business]等.
#If the following plugins fail to initialize, the sapp platform will exit.
#The name of the plugin comes from the configuration ./plug/conflist.inf, section identification is not required.
./plug/platform/wannat/wangw.inf
./plug/platform/wire_graft/wire_graft.inf
./plug/platform/app_proto_identify/app_proto_identify.inf
./plug/platform/tsg_master/tsg_master.inf
./plug/protocol/sip/sip.inf
./plug/protocol/rtp/rtp.inf
./plug/protocol/ssl/ssl.inf
./plug/protocol/ssh/ssh.inf
./plug/protocol/http/http.inf
./plug/protocol/dns/dns.inf
./plug/protocol/mail/mail.inf
./plug/protocol/ftp/ftp.inf
./plug/protocol/quic/quic.inf
./plug/protocol/radius/radius.inf
./plug/protocol/rdp/rdp.inf
./plug/protocol/bgp/bgp.inf
./plug/protocol/l2tp_protocol_plug/l2tp_protocol_plug.inf
./plug/business/tsg_conn_sketch/tsg_conn_sketch.inf
./plug/business/capture_packet_plug/capture_packet_plug.inf
./plug/business/kni/kni.inf
./plug/business/fw_dns_plug/fw_dns_plug.inf
./plug/business/conn_telemetry/conn_telemetry.inf
./plug/business/app_sketch_local/app_sketch_local.inf
./plug/protocol/gtp/gtp.inf
./plug/business/gtp_signaling_plug/gtp_signaling_plug.inf
./plug/business/http_healthcheck/http_healthcheck.inf
./plug/platform/tsg_ddos_sketch/tsg_ddos_sketch.inf
./plug/business/radius_collect_plug/radius_collect_plug.inf
./plug/platform/shaping_master/shaping_master.inf
./plug/business/firewall/firewall.inf

View File

@@ -20,3 +20,4 @@ data:
tsg_device_tag.json: {{ tpl (.Files.Get "conf/tsg_device_tag.json") . | quote }}
app_sketch_local.inf: {{ tpl (.Files.Get "conf/app_sketch_local.inf") . | quote }}
firewall.inf: {{ tpl (.Files.Get "conf/firewall.inf") . | quote }}
necessary_plug_list.conf: {{ tpl (.Files.Get "conf/necessary_plug_list.conf") . | quote }}

View File

@@ -171,6 +171,12 @@
dest: /etc/telegraf/telegraf_statistic.conf
tags: telegraf_statistic
- name: "tsg-os-provision: Templates telegraf.conf"
template:
src: "../templates/telegraf_shaping.conf.j2"
dest: /etc/telegraf/telegraf_shaping.conf
tags: telegraf_shaping
- name: "tsg-os-provision: template wannat wangw.conf file"
template:
src: "../templates/wangw.conf.j2"

View File

@@ -120,7 +120,13 @@
src: "../templates/telegraf_statistic.conf.j2"
dest: /etc/telegraf/telegraf_statistic.conf
tags: telegraf_statistic
- name: "tsg-os-provision: Templates telegraf.conf"
template:
src: "../templates/telegraf_shaping.conf.j2"
dest: /etc/telegraf/telegraf_shaping.conf
tags: telegraf_shaping
- name: "tsg-os-provision: template the tfe.conf"
template:
src: "../templates/tfe.conf.j2"

View File

@@ -104,7 +104,13 @@
src: "../templates/telegraf_statistic.conf.j2"
dest: /etc/telegraf/telegraf_statistic.conf
tags: telegraf_statistic
- name: "tsg-os-provision: Templates telegraf.conf"
template:
src: "../templates/telegraf_shaping.conf.j2"
dest: /etc/telegraf/telegraf_shaping.conf
tags: telegraf_shaping
- name: "tsg-os-provision: template the tfe.conf"
template:
src: "../templates/tfe.conf.j2"

View File

@@ -189,6 +189,12 @@
dest: /etc/telegraf/telegraf_statistic.conf
tags: telegraf_statistic
- name: "tsg-os-provision: Templates telegraf.conf"
template:
src: "../templates/telegraf_shaping.conf.j2"
dest: /etc/telegraf/telegraf_shaping.conf
tags: telegraf_shaping
- name: "template tfe-env service for rps mask"
template:
src: ../templates/service_add_StartPostForRps.conf.j2

View File

@@ -96,6 +96,12 @@
dest: /etc/telegraf/telegraf_statistic.conf
tags: telegraf_statistic
- name: "tsg-os-provision: Templates telegraf.conf"
template:
src: "../templates/telegraf_shaping.conf.j2"
dest: /etc/telegraf/telegraf_shaping.conf
tags: telegraf_shaping
- name: "tsg-os-provision: template consul"
template:
src: "../templates/consul.hcl.j2"