diff --git a/meta/main.yml b/meta/main.yml index 3a0a30e..980a276 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,6 +15,7 @@ galaxy_info: - name: Debian versions: - all - categories: + galaxy_tags: - monitoring + dependencies: [] diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 1ae3e20..b9d3da9 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -25,6 +25,33 @@ provisioner: name: ansible lint: name: ansible-lint + inventory: + group_vars: + all: + telegraf_plugins_default: + - plugin: cpu + config: + - percpu = true + - plugin: disk + - plugin: io + - plugin: mem + - plugin: net + - plugin: system + - plugin: swap + - plugin: netstat + - plugin: processes + - plugin: kernel + - plugin: nginx + config: + - urls = ["http://localhost/nginx_status"] + - plugin: logparser + config: + - files = ["/var/log/nginx/access.log"] + - from_beginning = true + - name_override = "nginx_access_log" + - \[logparser.grok\] + - patterns = ["%{COMBINED_LOG_FORMAT}"] + scenario: name: default verifier: diff --git a/templates/telegraf-extra-plugin.conf.j2 b/templates/telegraf-extra-plugin.conf.j2 index 452b722..9828fef 100644 --- a/templates/telegraf-extra-plugin.conf.j2 +++ b/templates/telegraf-extra-plugin.conf.j2 @@ -6,7 +6,7 @@ {% endif %} {% if item.value.config is defined and item.value.config is iterable %} {% for items in item.value.config %} - {{ items }} + {% raw %}{{ items }}{% endraw %}} {% endfor %} {% endif %} {% if item.value.tags is defined and item.value.tags is iterable %}