diff --git a/elk_metrics_6x/installMetricbeat.yml b/elk_metrics_6x/installMetricbeat.yml index c81fbae6..a76ab84a 100644 --- a/elk_metrics_6x/installMetricbeat.yml +++ b/elk_metrics_6x/installMetricbeat.yml @@ -39,21 +39,31 @@ path: /etc/ceph register: ceph - - name: Check for haproxy + - name: Check for etcd stat: - path: /etc/haproxy - register: haproxy + path: /etc/etcd + register: etcd - name: Check for docker stat: path: /var/run/docker.sock register: docker + - name: Check for haproxy + stat: + path: /etc/haproxy + register: haproxy + - name: Check for httpd stat: path: /etc/httpd register: httpd + - name: Check for kvm + stat: + path: /var/run/libvirt/libvirt-sock + register: kvm + - name: Check for memcached stat: path: /etc/memcached.conf @@ -91,7 +101,9 @@ apache_enabled: "{{ (apache2.stat.exists | bool) or (httpd.stat.exists | bool) }}" ceph_enabled: "{{ ceph.stat.exists | bool }}" docker_enabled: "{{ docker.stat.exists | bool }}" + etcd_enabled: "{{ etcd.stat.exists | bool }}" haproxy_enabled: "{{ haproxy.stat.exists | bool }}" + kvm_enabled: "{{ kvm.stat.exists | bool }}" memcached_enabled: "{{ memcached.stat.exists | bool }}" mysql_enabled: "{{ mysql.stat.exists | bool }}" nginx_enabled: "{{ nginx.stat.exists | bool }}" diff --git a/elk_metrics_6x/templates/metricbeat.yml.j2 b/elk_metrics_6x/templates/metricbeat.yml.j2 index d796d04b..6265b10d 100644 --- a/elk_metrics_6x/templates/metricbeat.yml.j2 +++ b/elk_metrics_6x/templates/metricbeat.yml.j2 @@ -61,6 +61,7 @@ metricbeat.modules: - uptime # System Uptime - core # Per CPU core usage - diskio # Disk IO + - raid # Raid - socket # Sockets and connection info (linux only) enabled: true period: 30s @@ -152,17 +153,19 @@ metricbeat.modules: # hosts: ["localhost:8091"] # ##------------------------------- Docker Module ------------------------------- -#- module: docker -# metricsets: ["container", "cpu", "diskio", "healthcheck", "info", "memory", "network"] -# hosts: ["unix:///var/run/docker.sock"] -# period: 30s -# -# # To connect to Docker over TLS you must specify a client and CA certificate. -# #ssl: -# #certificate_authority: "/etc/pki/root/ca.pem" -# #certificate: "/etc/pki/client/cert.pem" -# #key: "/etc/pki/client/cert.key" -# +{% if docker_enabled | default(false) | bool %} +- module: docker + metricsets: ["container", "cpu", "diskio", "healthcheck", "info", "memory", "network"] + hosts: ["unix:///var/run/docker.sock"] + period: 30s + + # To connect to Docker over TLS you must specify a client and CA certificate. + #ssl: + #certificate_authority: "/etc/pki/root/ca.pem" + #certificate: "/etc/pki/client/cert.pem" + #key: "/etc/pki/client/cert.key" + +{% endif %} ##----------------------------- Dropwizard Module ----------------------------- #- module: dropwizard # metricsets: ["collector"] @@ -180,12 +183,13 @@ metricbeat.modules: # {% endif %} ##-------------------------------- Etcd Module -------------------------------- -#- module: etcd -# metricsets: ["leader", "self", "store"] -# period: 30s -# hosts: ["localhost:2379"] -# +{% if etcd_enabled | default(false) | bool %} +- module: etcd + metricsets: ["leader", "self", "store"] + period: 30s + hosts: ["localhost:2379"] # +{% endif %} ##------------------------------- Golang Module ------------------------------- #- module: golang # metricsets: ["expvar","heap"] @@ -306,6 +310,17 @@ metricbeat.modules: # metricsets: # - event # +#--------------------------------- kvm Module -------------------------------- +{% if kvm_enabled | default(false) | bool %} +- module: kvm + metricsets: ["dommemstat"] + enabled: false + period: 10s + hosts: ["localhost"] + + # Timeout to connect to Libvirt server + #timeout: 1s +{% endif %} ##------------------------------ Logstash Module ------------------------------ {% if inventory_hostname in groups['elastic-logstash'] | default([]) %} - module: logstash @@ -342,6 +357,14 @@ metricbeat.modules: # # Password to use when connecting to MongoDB. Empty by default. # #password: pass # +##-------------------------------- Munin Module ------------------------------- +#- module: munin +# metricsets: ["node"] +# enabled: true +# period: 10s +# hosts: ["localhost:4949"] +# node.namespace: node +# ##-------------------------------- MySQL Module ------------------------------- {% if (mysql_enabled | default(false) | bool) and galera_root_user is defined and galera_root_password is defined %} - module: mysql