Lost All Indices After Adding Additional Pipelines

So after I cleared all of the indices and added an additional method to my pipeline configuration, my indices will not repopulate.

I have added my code below for the original configuration and then reconfiguration.

Original Configuration:

input {
  beats {
    port => 5044
  }
}

filter {
grok {
    match => { "message" => "%{SYSLOGTIMESTAMP:timestamp}\s+%{IPORHOST:dst_host}\s+%{WORD:syslog_program}\[\d+\]:\s+(?<status>\w+\s+password)\s+for\s+%{USER:auth_user}\s+from\s+%{SYSLOGHOST:src_host}.*" }
    add_field => { "activity" => "SSH Logins" }
    add_tag => "linux_auth"
    }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    manage_template => false
    index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
   }
}

Reconfiguration:

input {
  beats {
    port => 5044
    type => "beats"
    tags => ["beats"]
  }
  udp {
    port => 514
    type => "syslog"
    tags => ["syslog"]
  }
}

filter {
  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{DATA:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
    }
    date {
       match => [ "timestamp", "MMM dd HH:mm:ss", "MMM  d HH:mm:ss" ]
    }
  }
 if [type] == "beats" {
    match => { "message" => "%{SYSLOGTIMESTAMP:timestamp}\s+%{IPORHOST:dst_host}\s+%{WORD:syslog_program}\[\d+\]:\s+(?<status>\w+\s+password)\s+for\s+%{USER:auth_user}\s+from\s+%{SYSLOGHOST:src_host}.*" }
    add_field => { "activity" => "SSH Logins" }
    add_tag => "linux_auth"
  }
}

output {
  if "beats" in [tags] {
   elasticsearch {
    hosts => ["localhost:9200"]
    manage_template => false
    index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
   }
  }
  if "syslog" in [tags] {
  elasticsearch {
    hosts => ["localhost:9200"]
    manage_template => false
    index => "syslogs-%{+YYYY.MM.dd}"
   }
 }
}

After I had restarted logstash, only syslog port is open 514 and not beats port 5044.

What could be the issue?

Welcome to our community! :smiley:

Can you elaborate more on what you did here?

Also, what do your Logstash logs show is happening?

I followed this guy's post and my indices are now working.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.