Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy options #84

Merged
merged 2 commits into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Specifying an output. The default is set to localhost, you'll have to specify th
- urls = ["http://localhost:8086"]
- database = "telegraf"
tagpass:
- diskmetrics = ["true"]
- cpu = ["cpu0"]

The config will be printed line by line into the configuration, so you could also use:

Expand Down Expand Up @@ -130,8 +130,6 @@ There is an option to delete extra-plugin files in /etc/telegraf/telegraf.d if t
Telegraf plugin options:

* `tags` An k/v tags to apply to a specific input's measurements. Can be used on any stage for better filtering for example in outputs.
* `pass`: An array of strings that is used to filter metrics generated by the current plugin. Each string in the array is tested as a prefix against metric names and if it matches, the metric is emitted.
* `drop`: The inverse of pass, if a metric name matches, it is not emitted.
* `tagpass`: (added in Telegraf 0.1.5) tag names and arrays of strings that are used to filter metrics by the current plugin. Each string in the array is tested as an exact match against the tag name, and if it matches the metric is emitted.
* `tagdrop`: (added in Telegraf 0.1.5) The inverse of tagpass. If a tag matches, the metric is not emitted. This is tested on metrics that have passed the tagpass test.
* `interval`: How often to gather this metric. Normal plugins use a single global interval, but if one particular plugin should be run less or more often, you can configure that here.
Expand All @@ -141,8 +139,8 @@ An example might look like this:
telegraf_plugins_default:
- plugin: disk
interval: 12
tags:
- diskmetrics = "true"
tags:
- diskmetrics = "true"
tagpass:
- fstype = [ "ext4", "xfs" ]
- path = [ "/opt", "/home" ]
Expand Down
21 changes: 1 addition & 20 deletions templates/etc-opt-telegraf-telegraf.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,6 @@
{{ items }}
{% endfor %}
{% endif %}
{% if item.pass is defined and item.pass is iterable %}
[{{ item.plugin }}.pass]
{% for items in item.pass %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.drop is defined and item.drop is iterable %}
[{{ item.plugin }}.drop]
{% for items in item.drop %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.specifications is defined and item.specifications is iterable %}
[[{{item.plugin}}.specifications]]
{% for items in item.specifications %}
{{ items }}
{% endfor %}
{% endif %}


{% endfor %}
{% endif %}
{% endif %}
20 changes: 1 addition & 19 deletions templates/telegraf-extra-plugin.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@
{{ items }}
{% endfor %}
{% endif %}
{% if item.value.pass is defined and item.value.pass is iterable %}
[{{ item.value.plugin | default(item.key) }}.pass]
{% for items in item.value.pass %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.value.drop is defined and item.value.drop is iterable %}
[{{ item.value.plugin | default(item.key) }}.drop]
{% for items in item.value.drop %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.value.objects is defined and item.value.objects is iterable %}
{% for object in item.value.objects %}
[[inputs.{{ item.value.plugin | default(item.key) }}.object]]
Expand All @@ -48,10 +36,4 @@
Measurement = {{ object.measurement | default("win_perf_counters") | to_json }}
IncludeTotal = {{ object.total | default(false) | string | lower }}
{% endfor %}
{% endif %}
{% if item.value.specifications is defined and item.value.specifications is iterable %}
[[{{item.value.plugin | default(item.key)}}.specifications]]
{% for items in item.value.specifications %}
{{ items }}
{% endfor %}
{% endif %}
{% endif %}
18 changes: 0 additions & 18 deletions templates/telegraf.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,6 @@
{{ items }}
{% endfor %}
{% endif %}
{% if item.pass is defined and item.pass is iterable %}
[{{ item.plugin }}.pass]
{% for items in item.pass %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.drop is defined and item.drop is iterable %}
[{{ item.plugin }}.drop]
{% for items in item.drop %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.objects is defined and item.objects is iterable %}
{% for object in item.objects %}
[[inputs.{{ item.plugin }}.object]]
Expand All @@ -116,12 +104,6 @@
IncludeTotal = {{ object.total | default(false) | string | lower }}
{% endfor %}
{% endif %}
{% if item.specifications is defined and item.specifications is iterable %}
[[{{item.plugin}}.specifications]]
{% for items in item.specifications %}
{{ items }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}

Expand Down