express42-cookbooks/zabbix_lwrp

View on GitHub
templates/default/zabbix_agentd.conf.erb

Summary

Maintainability
Test Coverage
# This is a config file for the Zabbix agent daemon (Unix)
# To get more information about Zabbix, visit http://www.zabbix.com

# This file is generated by Chef, please keep in mind you can change this file only with Chef

# agent configuration options

<% unless @listen_ip.to_s.empty? %>
ListenIP=<%= @listen_ip %>
<% end %>
<% unless @listen_port.to_s.empty? %>
ListenPort=<%= @listen_port %>
<% end %>
<% if node['platform'] != 'windows' %>
PidFile=<%= @pidfile %>
<% end %>

# zabbix server connect configuration
Server=<%= @serverhost %>
ServerActive=<%= @serverhost %>
<% unless @hostname.to_s.empty? %>
Hostname=<%= @hostname %>
<% end %>

# global configuration options
<% @global.each do |parameter, value| %>
<%= parameter %>=<%= value %>
<% end %>

# logs configuration
<% @logs.each do |parameter, value| %>
<%= parameter %>=<%= value %>
<% end %>

# additional scripts and user parameters
<% @user_params.each do |k, v| %>
UserParameter=<%= k %>,<%= v %>
<% end %>

Include=<%= node['zabbix']['agent']['include']  %>