filter f_<%= @name -%> {facility(local3, local4, local5);};
destination d_<%= @name -%> {udp("<%= @remote_server -%>" port(514));};
log {source(s_src); filter(f_<%= @name -%>); destination(d_<%= @name -%>);};
<% if @logstash_remote_server and @logstash_remote_port -%>
destination d_<%= @name -%>_logstash {udp("<%= @logstash_remote_server -%>" port(<%= @logstash_remote_port -%>));};
log {source(s_src); filter(f_<%= @name -%>); destination(d_<%= @name -%>_logstash);};
<% end %>

filter f_<%= @name -%> {facility(local3, local4, local5);};

<% if @remote_server.is_a?(Array) -%>
<% @remote_server.each_with_index do |rs, n| -%>
destination d_<%= @name -%><%= n -%> {udp("<%= rs -%>" port(514));};
log {source(s_src); filter(f_<%= @name -%>); destination(d_<%= @name -%><%= n -%>);};
<% end -%>
<% else -%>
destination d_<%= @name -%> {udp("<%= @remote_server -%>" port(514));};
log {source(s_src); filter(f_<%= @name -%>); destination(d_<%= @name -%>);};
<% end -%>

<% if @logstash_remote_server and @logstash_remote_port -%>
destination d_<%= @name -%>_logstash {udp("<%= @logstash_remote_server -%>" port(<%= @logstash_remote_port -%>));};
log {source(s_src); filter(f_<%= @name -%>); destination(d_<%= @name -%>_logstash);};
<% end -%>

Support for multiple remote syslog servers.
Support for multiple remote syslog servers.
