78c66cd992
Added mysql plugin for telegraf to be used by default. Plugin gathers the statistic data from MySQL server. Change-Id: I853af61b64739eedb70ab2b8dc78f0285a839671 Closes-Bug: #1652609
74 lines
3.0 KiB
Django/Jinja
74 lines
3.0 KiB
Django/Jinja
[global_tags]
|
|
[agent]
|
|
interval = "10s"
|
|
round_interval = true
|
|
metric_batch_size = 1000
|
|
metric_buffer_limit = 10000
|
|
collection_jitter = "0s"
|
|
flush_interval = "10s"
|
|
flush_jitter = "0s"
|
|
debug = false
|
|
quiet = false
|
|
hostname = ""
|
|
omit_hostname = false
|
|
[[outputs.influxdb]]
|
|
urls = [{% for host in groups['influxdb'] %}"{{ influxdb_proto }}://{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address']}}:{{ influxdb_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
|
|
database = "telegraf" # required
|
|
retention_policy = "default"
|
|
write_consistency = "any"
|
|
timeout = "5s"
|
|
[[inputs.cpu]]
|
|
percpu = true
|
|
totalcpu = true
|
|
fielddrop = ["time_*"]
|
|
[[inputs.disk]]
|
|
ignore_fs = ["tmpfs", "devtmpfs"]
|
|
[[inputs.diskio]]
|
|
[[inputs.kernel]]
|
|
[[inputs.mem]]
|
|
[[inputs.processes]]
|
|
[[inputs.swap]]
|
|
[[inputs.system]]
|
|
[[inputs.net]]
|
|
interfaces = []
|
|
{% if inventory_hostname in groups['haproxy'] and enable_haproxy | bool %}
|
|
[[inputs.haproxy]]
|
|
servers = ["{{ haproxy_proto }}://{{ haproxy_user }}:{{ haproxy_password }}@{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ haproxy_stats_port }}"]
|
|
{% endif %}
|
|
{% if inventory_hostname in groups['memcached'] and enable_memcached | bool %}
|
|
[[inputs.memcached]]
|
|
servers = ["{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}"]
|
|
{% endif %}
|
|
{% if inventory_hostname in groups['elasticsearch'] and enable_elasticsearch | bool %}
|
|
[[inputs.elasticsearch]]
|
|
servers = ["{{ elasticsearch_proto }}://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ elasticsearch_port }}"]
|
|
local = true
|
|
cluster_health = true
|
|
{% endif %}
|
|
{% if inventory_hostname in groups['rabbitmq'] and enable_rabbitmq | bool %}
|
|
[[inputs.rabbitmq]]
|
|
url = "{{ rabbitmq_proto }}://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_management_port }}"
|
|
username = "{{ rabbitmq_user }}"
|
|
password = "{{ rabbitmq_password }}"
|
|
{% endif %}
|
|
{% if inventory_hostname in groups['mariadb'] and enable_mariadb | bool %}
|
|
[[inputs.mysql]]
|
|
servers = ["{{ database_user }}:{{ database_password }}@{{ mariadb_proto }}({{ api_interface_address }}:{{ database_port }})/"]
|
|
perf_events_statements_digest_text_limit = 120
|
|
perf_events_statements_limit = 250
|
|
perf_events_statements_time_limit = 86400
|
|
table_schema_databases = []
|
|
gather_table_schema = true
|
|
gather_process_list = true
|
|
gather_info_schema_auto_inc = true
|
|
gather_slave_status = true
|
|
gather_binary_logs = true
|
|
gather_table_io_waits = true
|
|
gather_table_lock_waits = true
|
|
gather_index_io_waits = true
|
|
gather_event_waits = true
|
|
gather_file_events_stats = true
|
|
gather_perf_events_statements = true
|
|
interval_slow = "30m"
|
|
{% endif %}
|