<commit_before>filter {
  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
      add_field => [ "received_at", "%{@timestamp}" ]
      add_field => [ "received_from", "%{host}" ]
    }
    syslog_pri { }
    date {
      match => <%= @logstash_filter_pattern_params['syslog_filter_match'] %>
    }
  }
}<commit_msg>Update syslog filter in logstash<commit_after>filter {
  if [type] == "syslog" {
    # Do not log passwords when they came from puppet-agent. Be case insensitive
    # about it.
    # Watch for mysql "access denied for user " logs, as these do not contain
    # passwords - could be logged.
    if [message] =~ "(?i)puppet-agent"
     and [message] =~ "(?i)password"
     and [message] !~ "(?i)1045, \"Access denied for user" {
      drop {}
    }
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
      add_field => [ "received_at", "%{@timestamp}" ]
      add_field => [ "received_from", "%{host}" ]
    }
    syslog_pri { }
    date {
      match => <%= @logstash_filter_pattern_params['syslog_filter_match'] %>
    }
  }
}
{'fraction_non_alphanumeric': 0.17677514792899407, 'fraction_numerical': 0.0029585798816568047, 'mean_word_length': 3.5555555555555554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2368195', 'n_tokens_mistral': 497, 'n_tokens_neox': 475, 'n_words': 91}