Compare commits
No commits in common. "0decac47c938122d7a1db47b4de15f38d704dfb3" and "80ce44f981170f5d103ef72be988a349eecd2163" have entirely different histories.
0decac47c9
...
80ce44f981
|
@ -31,9 +31,8 @@
|
|||
|
||||
- name: Render Filebeat Configure File
|
||||
ansible.builtin.template:
|
||||
src: "filebeat-{{ items }}-template.yml"
|
||||
dest: "{{ work_path }}/filebeat_{{ items }}.yml"
|
||||
src: filebeat-gateway-nginx-template.yml
|
||||
dest: "{{ work_path }}/filebeat.yml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
with_items: "{{ config_files }}"
|
||||
mode: '0644'
|
|
@ -22,9 +22,9 @@ filebeat.config.modules:
|
|||
#reload.period: 10s
|
||||
|
||||
# ======================= Elasticsearch template setting =======================
|
||||
setup.ilm.enabled: true
|
||||
setup.ilm.enabled: false
|
||||
setup.template.name: "gw-nginx-ug10cn"
|
||||
setup.template.pattern: "gw-nginx-*"
|
||||
setup.template.pattern: "gw-nginx-ug10cn-*"
|
||||
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 3
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
filebeat.registry.path: {{ work_path }}/data/registry/mgr-cp-{{ instance_name }}
|
||||
|
||||
filebeat.inputs:
|
||||
{% for log in logs %}
|
||||
- type: log
|
||||
paths:
|
||||
- {{ log }}
|
||||
multiline.type: pattern
|
||||
multiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
|
||||
multiline.negate: true
|
||||
multiline.match: after
|
||||
multiline.skip_newline: true
|
||||
fields:
|
||||
source: cp
|
||||
{% endfor %}
|
||||
|
||||
filebeat.config.modules:
|
||||
# Glob pattern for configuration loading
|
||||
path: ${path.config}/modules.d/*.yml
|
||||
|
||||
# Set to true to enable config reloading
|
||||
reload.enabled: false
|
||||
|
||||
# Period on which files under path should be checked for changes
|
||||
#reload.period: 10s
|
||||
|
||||
# ======================= Elasticsearch template setting =======================
|
||||
setup.ilm.enabled: true
|
||||
setup.template.name: "mgr-cp"
|
||||
setup.template.pattern: "mgr-cp-*"
|
||||
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 3
|
||||
|
||||
setup.kibana:
|
||||
host: "{{ kibana_url }}"
|
||||
space.id: "{{ kibana_space }}"
|
||||
|
||||
# ---------------------------- Elasticsearch Output ----------------------------
|
||||
output.elasticsearch:
|
||||
hosts: {{ es_hosts }}
|
||||
index: "mgr-{{ instance_name }}-%{[fields.source]}-%{+yyyy.MM.dd}"
|
||||
pipeline: "mgrlogs"
|
||||
username: {{ es_user }}
|
||||
password: {{ es_passwd }}
|
||||
|
||||
|
||||
# ================================= Processors =================================
|
||||
processors:
|
||||
- add_host_metadata:
|
||||
when.not.contains.tags: forwarded
|
||||
- add_cloud_metadata: ~
|
||||
- add_docker_metadata: ~
|
||||
- add_kubernetes_metadata: ~
|
|
@ -2,8 +2,4 @@
|
|||
# vars file for filebeat
|
||||
filebeat_download_url: "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.10.1-linux-x86_64.tar.gz"
|
||||
work_path: "/data/opt/filebeat/{{ instance_name }}"
|
||||
logs:
|
||||
- "/data/game/htdocs/center/manager/storage/cp/logs/*.log"
|
||||
config_files:
|
||||
- "gateway-nginx"
|
||||
- "manager"
|
||||
logs: ["api", "cl*", "doc", "download", "gw*", "cp", "pay", "static"]
|
|
@ -12,8 +12,6 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: '0750'
|
||||
vars:
|
||||
items: "{{ filebeat_configs }}"
|
||||
|
||||
- name: Render Supervisor SystemV Script
|
||||
ansible.builtin.template:
|
||||
|
|
|
@ -21,13 +21,10 @@ chown = filebeat:filebeat
|
|||
username = filebeat
|
||||
password = eNlB.UlOrJAnA
|
||||
|
||||
{% for item in items %}
|
||||
[program:filebeat_{{instance_name}}_{{ item }}]
|
||||
command={{ work_path }}/filebeat -c {{ work_path }}/filebeat_{{ item }}.yml
|
||||
[program:filebeat_{{instance_name}}]
|
||||
command={{ work_path }}/filebeat -c {{ work_path }}/filebeat.yml
|
||||
autorestart=true
|
||||
|
||||
{% endfor %}
|
||||
|
||||
[supervisorctl]
|
||||
serverurl = unix:///tmp/supervisord_{{instance_name}}.sock
|
||||
username = filebeat
|
||||
|
|
|
@ -3,6 +3,4 @@
|
|||
pip_bin_path: "/data/opt/python3/bin/pip"
|
||||
python_bin_dir: "/data/opt/python3/bin"
|
||||
work_path: "/data/opt/filebeat/{{ instance_name }}"
|
||||
filebeat_configs:
|
||||
- "gateway-nginx"
|
||||
- "manager"
|
||||
|
||||
|
|
Loading…
Reference in New Issue