Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Test
- ```
- logstash -e 'input { stdin { } } output { stdout {} }'
- ```
- Outputs anything you type to console.
- ```
- logstash agent -f log.conf -l lslog.log –verbose
- ```
- ### Sample
- ```
- input {
- eventlog {
- type => 'Win32-EventLog'
- logfile => 'System'
- }
- file {
- path => ["c:/1/logs/*.log"]
- start_position => "beginning"
- }
- }
- filter {
- grok {
- match => {
- "message" => "\[%{YEAR:year}-%{MONTHNUM:mm}-%{MONTHDAY:md}[T]%{HOUR:h}:%{MINUTE:m}:%{SECOND:s},%{NUMBER:ms}\]\[%{LOGLEVEL:llevel}%{SPACE}?\]\[%{DATA:agent}%{SPACE}?\] %{GREEDYDATA:appmessage}" }
- }
- }
- output {
- stdout { }
- elasticsearch {
- hosts => "127.0.0.1:9200"
- }
- }
- ```
- > [2018-06-18T02:06:33,778][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
- ```
- .\bin\logstash-plugin.bat install logstash-input-eventlog
- ```
Add Comment
Please, Sign In to add comment