【发布时间】:2015-06-19 06:16:39
【问题描述】:
我在使用interface 插件通过salt 配置collectd.conf 时遇到困难。 collectd.conf 需要一个网络接口列表来监控,例如:
<Plugin interface>
Interface "em1"
Interface "em2"
</Plugin>
我发现我需要使用salt mine 将颗粒拉入主控器 - 这是通过如下所示的支柱 sls 实现的:
mine_functions:
network.interfaces: []
在我的collectd.conf 我有:
<Plugin interface>
{% for host, info in salt['mine.get']('*','network.interfaces').items() %}
{% if host == grains['id'] %}
{% for interface in info %}
Interface "{{ interface }}"
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
</Plugin>
但是,它似乎对我不起作用:(
【问题讨论】:
标签: networking salt-stack collectd