Hi everyone, currently stuck trying to setup Logstash to accept iis logs. I'm on a windows 10 workstation with the logs being copied from external servers. At the moment when logstash is ran, it starts, then stops on the successfully start message. It can't seem to find the log files at all. I've looked through a lot of other post and checked file extension, sincedb = null etc. But none of these previous fixes work. Anyone have an ideas what to change?
The command to start logstash used is
C:\elk\logstash-6.6.0\bin\logstash.bat --debug -f logstash.conf
My filter.conf looks like this
input {
file {
type=>"iis"
path => "C:/elk/LOGS/u_ex160905.log"
start_position => "beginning"
sincedb_path => "NUL"
ignore_older => 0
}
}
filter{
grok {
match => ["message", "%{TIMESTAMP_ISO8601} %{IPORHOST:s-ip} %{WORD:cs-method} %{NOTSPACE:cs-uri-query} %{NOTSPACE:cs-uri-stem} %{NOTSPACE:cs-port} %{NOTSPACE:cs-username} %{IPORHOST:c-ip} %{NOTSPACE:cs(User-Agent)} %{NOTSPACE:cs(Referer)} %{NUMBER:sc-status} %{NUMBER:sc-substatus} %{NUMBER:c-win32-status} %{NUMBER:time-taken}"]
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "Test"
}
stdout {
codec => rubydebug
}
}
This is the pipeline.
- pipeline.id: iis
queue.type: persisted
path.config: ["C:/elk/logstash-6.6.0/config/*.conf"]
Heres an example of the logs I'm trying to process
2016-09-05 01:12:46 192.168.10.10 GET /viewer-webtier/pcc.ashx/Document/q/0-0/Text DocumentID=u9_2hDfuotQuIiLbutGJ9Bb6PA6glSm_a1S6wdFniuCdFZIWnqNt6efbE-f9gb_wRBZzo0ZiTuhxXoW5PUOZcCw 443 smcintosh 117.120.18.136 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko https://testwebsite.com 200 0 0 62
After running debug this is what it spits out
[2019-02-28T10:09:11,717][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x4e824a1d sleep>"}
[2019-02-28T10:09:11,759][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-02-28T10:09:11,764][INFO ][filewatch.observingtail ] START, creating Discoverer, Watch with file and sincedb collections
[2019-02-28T10:09:11,785][DEBUG][logstash.agent ] Starting puma
[2019-02-28T10:09:11,799][DEBUG][logstash.agent ] Trying to start WebServer {:port=>9600}
[2019-02-28T10:09:11,850][DEBUG][logstash.api.service ] [api-service] start
[2019-02-28T10:09:12,033][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2019-02-28T10:09:15,574][DEBUG][logstash.instrument.periodicpoller.cgroup] One or more required cgroup files or directories not found: /proc/self/cgroup, /sys/fs/cgroup/cpuacct, /sys/fs/cgroup/cpu
[2019-02-28T10:09:15,583][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ParNew"}
[2019-02-28T10:09:15,584][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ConcurrentMarkSweep"}
[2019-02-28T10:09:16,721][DEBUG][logstash.pipeline ] Pushing flush onto pipeline {:pipeline_id=>"main", :thread=>"#<Thread:0x4e824a1d sleep>"}
[2019-02-28T10:09:20,576][DEBUG][logstash.instrument.periodicpoller.cgroup] One or more required cgroup files or directories not found: /proc/self/cgroup, /sys/fs/cgroup/cpuacct, /sys/fs/cgroup/cpu