I'm been struggling for three days more or less to get pfsense logs into elasticsearch. I'm running debian jessie on a VM. pfsense is running real. I did the easy config in pfsense, setting up IP local IP and port 514. I installed the two debian packages logstash and elasticsurch via dpkg. I have to manually start the services via systemctl but it looks all good.
I made a pfsense.conf file, just eash input output
input {
tcp {
type => syslog
port => 514
}
udp {
type => syslog
port => 514
}
}
output {
stdout { codec => rubydebug }
elasticsearch {
host => "127.0.0.1"
cluster => "elasticsearch"
}
}
I'm getting output in bash, everything seems to be fine, stuff is happening like this
{
"message" => "<134>Jul 25 18:02:51 filterlog: 9,16777216,,1000000103,re0,match,block,in,4,0x0,,117,6044,0,none,17,udp,134,188.114.19.225,176.10.137.213,34544,40138,114",
"@version" => "1",
"@timestamp" => "2015-07-25T16:02:38.535Z",
"type" => "syslog",
"host" => "10.10.10.1"
}
What I'm unsure of is if the logs are actually stored in elasticsearch, if I understand correctly logstash only "forwards" what's happening and elasticsearch actually stores it. And this is where I get confused. in the elasticsearch.yml I haven't touched much, only the name of the cluster which is the same as my pfsense.conf file. I've been looking for logs but can't find any. I'm been looking at /var/log/elasticsearch/elasticsearch.log which seems to be overwritten every time I restart ES service.
Please help. I'm not fluent in *nix but I'm learning.