-
Notifications
You must be signed in to change notification settings - Fork 9
/
metricbeat.yml.j2
60 lines (57 loc) · 2.29 KB
/
metricbeat.yml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
metricbeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
setup.kibana:
{% if beats_metricbeat_output == "elasticsearch" %}
output.elasticsearch:
{% if elasticsearch_http_security | bool %}
{% if elasticstack_full_stack | bool %}
hosts: [ {% for host in groups[elasticstack_elasticsearch_group_name] %}"https://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
{% else %}
hosts: [ {% for host in beats_target_hosts %}"https://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
{% endif %}
username: "elastic"
password: "{{ beats_writer_password.stdout }}"
ssl.enabled: true
ssl.verification_mode: none
ssl.certificate_authorities: ["/etc/beats/certs/ca.crt"]
{% else %}
{% if elasticstack_full_stack | bool %}
hosts: [ {% for host in groups[elasticstack_elasticsearch_group_name] %}"http://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
{% else %}
hosts: [ {% for host in beats_target_hosts %}"http://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
{% endif %}
{% endif %}
{% endif %}
{% if beats_metricbeat_output == "logstash" %}
output.logstash:
{% if elasticstack_full_stack | bool %}
hosts: [ {% for host in groups[elasticstack_logstash_group_name] %}"{{ host }}:{{ elasticstack_beats_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
{% else %}
hosts: [ {% for host in beats_target_hosts %}"{{ host }}:{{ elasticstack_beats_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
{% endif %}
loadbalance: {{ beats_metricbeat_loadbalance }}
{% if beats_security | bool %}
ssl.enabled: true
ssl.certificate_authorities: ["{{ beats_tls_cacert }}"]
ssl.verification_mode: full
ssl.key: {{ beats_tls_key }}
ssl.key_passphrase: {{ beats_tls_key_passphrase }}
ssl.certificate: {{ beats_tls_cert }}
{% endif %}
{% endif %}
{% if beats_logging == "file" %}
logging.level: {{ beats_loglevel }}
logging.to_files: true
logging.files:
path: {{ beats_logpath }}/metricbeat.log
name: metricbeat
keepfiles: 7
permissions: 0644
{% endif %}
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~