regex - Creating Index based on pattern matching in logstash -


i'm trying build centralised logging system group windows & linux servers using elasticsearch logstash , kibana. input syslogs both system(single input stream). i'm trying understand if there way use grok , match pattern , based on put logs in different indices(one windows logs , 1 linux logs)

any in direction appreciated.

thanks,

you can assign 'type' based on system logs coming , use type in output.

below configuration:

input{    file{      path =>"path/to/system1_log_file"      type =>"sys1logs"    }    file{     path =>"path/to/system2_log_files"     type =>"sys2logs"   } }  output{   if[type]=="sys1logs"{   #output sys1 index    elasticsearch{host => localhost                index => "sys1"                }    }   if[type]=="sys2logs"{  #output sys2 index   elasticsearch{host => localhost                index =>"sys2"               }   } } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -