diff options
author | Daniil Baturin <daniil@vyos.io> | 2020-12-21 03:25:52 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-21 03:25:52 +0700 |
commit | 089b5f10aaa3f7976eb3f9165e805babdbf2a564 (patch) | |
tree | b26bdd6b44a86e3402205f370487a466ddd7c92a /data/templates/netflow/uacctd.conf.tmpl | |
parent | aa51add8be3e032f6d928cf1dd2ca32f82ec0d8e (diff) | |
parent | 5394518ae639fdfe71d514fa167e75d1ccf88a47 (diff) | |
download | vyos-1x-089b5f10aaa3f7976eb3f9165e805babdbf2a564.tar.gz vyos-1x-089b5f10aaa3f7976eb3f9165e805babdbf2a564.zip |
Merge pull request #652 from jpbede/fix/flow-accounting-template
flow-accounting: T3141: Fixing wrongly formatted config
Diffstat (limited to 'data/templates/netflow/uacctd.conf.tmpl')
-rw-r--r-- | data/templates/netflow/uacctd.conf.tmpl | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/data/templates/netflow/uacctd.conf.tmpl b/data/templates/netflow/uacctd.conf.tmpl index 1938901d2..3d4df72f7 100644 --- a/data/templates/netflow/uacctd.conf.tmpl +++ b/data/templates/netflow/uacctd.conf.tmpl @@ -20,27 +20,28 @@ imt_path: /tmp/uacctd.pipe imt_mem_pools_number: 169 {% endif %} plugins: -{% if templatecfg['netflow']['servers'] != none %} - {% for server in templatecfg['netflow']['servers'] %} - {% if loop.last %}nfprobe[nf_{{ server['address'] }}]{% else %}nfprobe[nf_{{ server['address'] }}],{% endif %} - {% endfor %} - {% set plugins_presented = true %} -{% endif %} -{% if templatecfg['sflow']['servers'] != none %} - {% if plugins_presented %} - {% for server in templatecfg['sflow']['servers'] %} +{%- if templatecfg['netflow']['servers'] != none -%} + {%- for server in templatecfg['netflow']['servers'] -%} + {%- if loop.last -%}nfprobe[nf_{{ server['address'] }}]{%- else -%}nfprobe[nf_{{ server['address'] }}],{%- endif -%} + {%- endfor -%} + {%- set plugins_presented = true -%} +{%- endif -%} +{%- if templatecfg['sflow']['servers'] != none -%} + {%- if plugins_presented -%} + {%- for server in templatecfg['sflow']['servers'] -%} ,sfprobe[sf_{{ server['address'] }}] - {% endfor %} - {% else %} - {% for server in templatecfg['sflow']['servers'] %} - {% if loop.last %}sfprobe[sf_{{ server['address'] }}]{% else %}sfprobe[sf_{{ server['address'] }}],{% endif %} - {% endfor %} - {% endif %} - {% set plugins_presented = true %} -{% endif %} -{% if templatecfg['disable-imt'] == none %} - {% if plugins_presented %},memory{% else %}memory{% endif %} -{% endif %} + {%- endfor -%} + {%- else -%} + {%- for server in templatecfg['sflow']['servers'] -%} + {%- if loop.last -%}sfprobe[sf_{{ server['address'] }}]{%- else -%}sfprobe[sf_{{ server['address'] }}],{%- endif -%} + {%- endfor -%} + {%- endif -%} + {%- set plugins_presented = true -%} +{%- endif -%} +{%- if templatecfg['disable-imt'] == none %} + {%- if plugins_presented %},memory{%- else -%}memory{%- endif -%} +{%- endif -%} + {% if templatecfg['netflow']['servers'] != none %} {% for server in templatecfg['netflow']['servers'] %} nfprobe_receiver[nf_{{ server['address'] }}]: {{ server['address'] }}:{{ server['port'] }} @@ -62,6 +63,7 @@ nfprobe_timeouts[nf_{{ server['address'] }}]: {{ templatecfg['netflow']['timeout {% endif %} {% endfor %} {% endif %} + {% if templatecfg['sflow']['servers'] != none %} {% for server in templatecfg['sflow']['servers'] %} sfprobe_receiver[sf_{{ server['address'] }}]: {{ server['address'] }}:{{ server['port'] }} |