-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Revise Templates To allow Different Types Of Filters #91
Comments
Found this while searching: https://github.com/jtyr/yaml2toml-converter |
@mcaulifn That looks nice, ever worked with it? |
just found it and then tried it out. there seem to be a few kinks but overall a great start.
gets me:
I can hack around I opened an issue: jtyr/yaml2toml-converter#1 |
@mcaulifn Nice! Do you think you can make a PR that includes the usage of the converter? |
I'd like to hear back from the author first to see if he is OK with it. |
@mcaulifn Yeah sure, I agree. 👍 |
Is it still open? I have searched for snmp config and as I can see this issue is hanging. |
@mcaulifn Could you share to us the modifications that you did in order to get the ability to set the template like you described in #91 (comment)? |
@emiliencartesoft There is a link to another PR with the modification I made. I couldn't find anything else locally that I would have changed. |
I'm sorry but where is the link of the PR? I can't find it. |
Is your feature request related to a problem? Please describe.
When using inputs.logparser, I'd like to template applying grok filters - this requires a file which looks like
`
[[inputs.logparser]]
[inputs.logparser.grok]
`
I'm unsure if this is possible already with this role, but I couldn't figure it out.
Describe the solution you'd like
Modify the templates to allow custom 'subplugins' (I don't really know the Telegraf nomenclature) - with this, you could also remove the entries for tags, tagpass, tagdrop parts and pass them as subplugins
This seems to be working for me
`{% if item.value.subplugin is defined and item.value.subplugin is iterable %}
{% for subpluginname in item.value.subplugin %}
[inputs.{{ item.value.plugin | default(item.key) }}.{{ subpluginname }}]
{% for items in item.value.subplugin[subpluginname] %}
{% endfor %}
{% endfor %}
{% endif %}
`
Additional context
eg group_vars file
logparser:
config:
- files = ["/var/log/apache/access.log"]
- from_beginning = False
subplugin:
grok:
- patterns = ["%{COMBINED_LOG_FORMAT}"]
- measurement = "apache_access_log"
The text was updated successfully, but these errors were encountered: