input { elasticsearch { hosts => "https://192.168.56.1:9200" index => "winevent" user => "elastic" password => "******" ssl_certificate_authorities => "D:/ELK/v9/elasticsearch-9.2.0/config/certs/http_ca.crt" schedule => "* * * * *" query => '{ "bool": { "must": [ { "match": { "winlog.event_id": "4624" } }, { "match": { "winlog.event_data.TargetUserName": "administrator" } }, { "range": { "@timestamp": { "gte": "now-1m", "lte": "now" } } } ] } } }' }} output { email { address => "smtp.gmail.com" port => 587 username => "mhkang589@gmail.com" password => "app password" to => "mhkang589@gmail.com" use_tls => true subject => "logstash alert" body => "%{[winlog][event_data][TargetUserName]} login" }}참고로 스플렁크는 서버 설정 > 이메일 설정 후,
원하는 조건 검색 기반 경보 생성.
이메일 트리거 작업 등록.
관련 글






댓글 없음:
댓글 쓰기