Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- => logstash sẽ theo dõi file trong /var/log/keystone/keystone-all.log và sẽ áp dụng các tag keystone, oslofmt và keysoneapi trong từng mục của log và các định nó là một loại keysyone.
- file {
- path => [‘/var/log/keystone/keystone-all.log’]
- tags => [‘keystone’, ‘oslofmt’, ‘keystoneapi’]
- type => “keystone”
- }
- => Một số thao tác định hình bản ghi để nắm rõ hơn về thông tin
- if “keystoneapi” in [tags] {
- mutate {
- gsub => [‘logmessage’,”””,””]
- }
- grok {
- match => { “logmessage” => “[-] %{NOTSPACE:requesterip} – – [%{NOTSPACE:req_date} %{NOTSPACE:req_time}] %{NOTSPACE:method} %{NOTSPACE:url_path} %{NOTSPACE:http_ver} %{NUMBER:response} %{NUMBER:bytes} %{NUMBER:seconds}” }
- add_field => [“api”, “keystone”]
- add_tag => [“apimetrics”]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement