Written by
in
ต่อจา ELK #07 – Logstash คราวนี้ มาใช้งานจริง โดยใช้ ELK เพื่อเก็บ Log ของ Oracle Audit Trail
ดัง Configuration ต่อไปนี้
input { syslog { port => 5515 codec => multiline { pattern => "<AuditRecord>" negate => "true" what => "previous" } } } filter { xml { source => "message" target => "doc" } } output { elasticsearch { hosts => ["elk.server:9200"] } }
จากนั้น ทาง Oracle Database Server ทำการเปิด Audit Trail แล้วเขียน Log ลงไฟล์ แล้วเขียน Cron เพื่อ Netcat ไฟล์ส่งมาให้ Lostash ที่เปิด Port TCP 5515 ไว้รอรับ
ผลที่ได้คือ
โดยวิธีนี้ จะเป็นการนำ Log ซึ่งจากเดิมเป็น Text Format นำมาเป็น NoSQL ได้ ซึ่งจะสามารถ Query ข้อมูลได้ง่ายยิ่งขึ้น
หวังว่าจะเป็นประโยชน์ครับ
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Δ
Leave a Reply