Add support for extra win_perf_counters and prevent python u'' strings

This commit is contained in:
Jack Ivy
2018-12-10 11:48:02 -06:00
committed by Jack Ivy
parent 55e366f3b2
commit 086dfab7d3
2 changed files with 12 additions and 2 deletions

View File

@ -39,6 +39,16 @@
{{ 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]]
ObjectName = {{ object.name | to_json }}
Instances = {{ object.instances | default(["*"]) | to_json }}
Counters = {{ object.counters | default(["*"]) | to_json }}
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 %}

View File

@ -98,8 +98,8 @@
{% for object in item.objects %}
[[inputs.{{ item.plugin }}.object]]
ObjectName = {{ object.name | to_json }}
Instances = {{ object.instances | default(["*"]) }}
Counters = {{ object.counters | default(["*"]) }}
Instances = {{ object.instances | default(["*"]) | to_json }}
Counters = {{ object.counters | default(["*"]) | to_json }}
Measurement = {{ object.measurement | default("win_perf_counters") | to_json }}
IncludeTotal = {{ object.total | default(false) | string | lower }}
{% endfor %}