Elasticsearch seems not to receive logs from logstash

Hi, anyone help me sort out why elasticsearch seems not to receive logs from logstash.
I am new to ELK. here is my config so far. TIA

/etc/elasticsearch/elasticsearch.yml

network.host: 0.0.0.0
transport.host: localhost
transport.tcp.port: 9300
http.port: 9200

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12


xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: elastic-certificates.p12
xpack.security.http.ssl.truststore.path: elastic-certificates.p12
xpack.security.http.ssl.client_authentication: optional

/etc/kibana/kibana.yml

server.port: 5601
server.host: "0.0.0.0"
server.name: "ELK-NETWORK"
elasticsearch.hosts: ["https://192.168.205.162:9200"]

elasticsearch.username: "kibana_system"
elasticsearch.password: "L3@ver"

server.ssl.enabled: true
server.ssl.certificate: /etc/kibana/newfile.crt.pem
server.ssl.key: /etc/kibana/newfile.key.pem
elasticsearch.ssl.verificationMode: none
xpack.encryptedSavedObjects.encryptionKey: "fdkjgaKJGHK123D4109NDHGFxsyfdkXSlpOhgjkjdh"

 /etc/logstash/conf.d/logstash.conf

input {
  tcp {
    port => 514
    type => syslog
  }
  udp {
    port => 514
    type => syslog
  }
}

filter {
  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:sysl$
      add_field => [ "received_at", "%{@timestamp}" ]
      add_field => [ "received_from", "%{host}" ]
    }
    date {
      match => [ "syslog_timestamp", "MMM  d HH:mm:ss", "MMM dd HH:mm:ss" ]
    }
  }
}

output {
  elasticsearch { hosts => ["192.168.205.162:9200"] }
  stdout { codec => rubydebug }
}

Thank you so much !

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