<commit_before>input {
	<% if p("logstash_ingestor.syslog.port") %>
	tcp {
		add_field => [ "type", "syslog" ]
		host => "0.0.0.0"
		port => "<%= p("logstash_ingestor.syslog.port") %>"
	}
	udp {
		add_field => [ "type", "syslog" ]
		host => "0.0.0.0"
		port => "<%= p("logstash_ingestor.syslog.port") %>"
	}
	<% end %>

	<% if_p("logstash_ingestor.syslog_tls.port") do | port | %>
    tcp {
		add_field => [ "type", "syslog" ]
		host => "0.0.0.0"
		port => "<%= port %>"
		ssl_enable => true
		ssl_cert => "/var/vcap/jobs/ingestor_syslog/config/syslog_tls.crt"
		ssl_key => "/var/vcap/jobs/ingestor_syslog/config/syslog_tls.key"
	}
	<% end %>
}

output {
	<% if p("logstash_ingestor.debug") %>
        stdout {
            codec => "json"
        }
	<% end %>
	
	redis {
		host => "<%= p("redis.host") %>"
		port => "<%= p("redis.port") %>"
		data_type => "list"
		key => "<%= p("redis.key") %>"
		batch => true
		batch_events => 50
	}
}<commit_msg>Rename host and sslsubject in syslog input to ingestor scope<commit_after>input {
	<% if p("logstash_ingestor.syslog.port") %>
	tcp {
		add_field => [ "type", "syslog" ]
		host => "0.0.0.0"
		port => "<%= p("logstash_ingestor.syslog.port") %>"
	}
	udp {
		add_field => [ "type", "syslog" ]
		host => "0.0.0.0"
		port => "<%= p("logstash_ingestor.syslog.port") %>"
	}
	<% end %>

	<% if_p("logstash_ingestor.syslog_tls.port") do | port | %>
    tcp {
		add_field => [ "type", "syslog" ]
		host => "0.0.0.0"
		port => "<%= port %>"
		ssl_enable => true
		ssl_cert => "/var/vcap/jobs/ingestor_syslog/config/syslog_tls.crt"
		ssl_key => "/var/vcap/jobs/ingestor_syslog/config/syslog_tls.key"
	}
	<% end %>
}

filter {
    mutate {
        rename => [ "host", "@ingestor.remote_host" ]
        rename => [ "sslsubject", "@ingestor.sslsubject" ]
    }
}

output {
	<% if p("logstash_ingestor.debug") %>
        stdout {
            codec => "json"
        }
	<% end %>
	
	redis {
		host => "<%= p("redis.host") %>"
		port => "<%= p("redis.port") %>"
		data_type => "list"
		key => "<%= p("redis.key") %>"
		batch => true
		batch_events => 50
	}
}
{'fraction_non_alphanumeric': 0.22786022020105315, 'fraction_numerical': 0.013403542364767831, 'mean_word_length': 2.877551020408163, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '5830507', 'n_tokens_mistral': 986, 'n_tokens_neox': 894, 'n_words': 133}