<commit_before># Standalone Agent. 
#
# Reads logs from input and ships them directly to elasticsearch

input {
<% @inputs.each do |section_data| %>
    <% section_data.each do |section, config| %>
    <%= section %> {
    <% if config %>
    <% config.each do |k, v| %>
        <%= k %> => <%= v.inspect %>
    <% end %>
    <% end %>
    }
    <% end %>
<% end %>
}

output {
  <% if node['logstash']['elasticsearch']['embedded'] %>
  elasticsearch { embedded => true }
  <% else %>
  elasticsearch {
    bind_host => "<%= node['logstash']['elasticsearch']['host'] %>"
    host => "<%= node['logstash']['elasticsearch']['host'] %>"
    port => <%= node['logstash']['elasticsearch']['port'] %>
    <% if node['logstash']['elasticsearch']['cluster'] %>
    cluster => "<%= node['logstash']['elasticsearch']['cluster'] %>"
    <% end %>
  }
  <% end %>
}<commit_msg>explicitely listing 'embedded' value, even when false<commit_after># Standalone Agent. 
#
# Reads logs from input and ships them directly to elasticsearch

input {
<% @inputs.each do |section_data| %>
    <% section_data.each do |section, config| %>
    <%= section %> {
    <% if config %>
    <% config.each do |k, v| %>
        <%= k %> => <%= v.inspect %>
    <% end %>
    <% end %>
    }
    <% end %>
<% end %>
}

output {
  <% if node['logstash']['elasticsearch']['embedded'] %>
  elasticsearch { embedded => true }
  <% else %>
  elasticsearch {
    bind_host => "<%= node['logstash']['elasticsearch']['host'] %>"
    host => "<%= node['logstash']['elasticsearch']['host'] %>"
    port => <%= node['logstash']['elasticsearch']['port'] %>
    embedded => <%= node['logstash']['elasticsearch']['embedded'] %>
    <% if node['logstash']['elasticsearch']['cluster'] %>
    cluster => "<%= node['logstash']['elasticsearch']['cluster'] %>"
    <% end %>
  }
  <% end %>
}
{'fraction_non_alphanumeric': 0.23708537248504621, 'fraction_numerical': 0.0, 'mean_word_length': 3.5320197044334973, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6597659', 'n_tokens_mistral': 643, 'n_tokens_neox': 569, 'n_words': 116}