input{
exec {
command => "netstat"
interval => 30
}
beats{
port =>5044
}
}
filter{
grok{
match => {"message" => [
#reqout grok:
"%{DATESTAMP:time} (: [%{DATA:req}(:)][(RQID:)%{DATA:rqId}][(STV:)%{DATA:stv}][(S:)%{DATA:s}][(RQC:)%{DATA:rqc}][(UN:)%{DATA:un}][(CAT:)%{DATA:cat}][(MSISDN:)%{DATA:msisdn}][(USt:)%{DATA:ust}][(UNW:)%{DATA:unw}][(DSMS:)%{DATA:dsms}][(TEMPTID:)%{DATA:temptid}][(UDH:)%{DATA:udh}][(ST:)%{DATA:st}][(SRVPRT:)%{DATA:srvprt}][(OINFO:)%{DATA:oinfo}(,MsgReq=)%{DATA:msgreq}(,FT=)%{DATA:ft} (ResTyp=)%{DATA:restyp}][(RETMSG:)%{DATA:retmsg}][%{DATA:fixedInfNtAvail}][(TT:)%{NUMBER:tt:int} %{DATA:timeunit}][(Source IP:%{IP:sourceIp})]",
"%{DATESTAMP:time} (: [%{DATA:req}(:)][(RQID:)%{DATA:rqId}][(STV:)%{DATA:stv}][(S:)%{DATA:s}][(RQC:)%{DATA:rqc}][(UsInf.)%{DATA:UsInf},(UName:)%{DATA:UName},(Cat:)%{DATA:Cat},(UStatus:)%{DATA:UStatus}] [(DSMS:)%{DATA:dsms}][(TEMPTID:)%{DATA:temptid}][(UDH:)%{DATA:udh}][(ST:)%{DATA:st}][(SRVPRT:)%{DATA:srvprt}][(OINFO:)%{DATA:oinfo}(,MsgReq=)%{DATA:msgreq}(,FT=)%{DATA:ft} (ResTyp=)%{DATA:restyp}][(RETMSG:)%{DATA:retmsg}][%{DATA:fixedInfNtAvail}][(TT:)%{NUMBER:tt:int} %{DATA:timeunit}][(Source IP:%{IP:sourceIp})]",
#reqin grok:
"%{DATESTAMP:time} (: [%{DATA:req}][(RQID:)%{DATA:rqId}][(S:)%{DATA:S}][(MD:)%{DATA:MD}][(DSMS:)%{DATA:DSMS}][(SMSISDN:)%{DATA:SMSISDN}][(REQMSG:)%{DATA:REQMSG}][(ST:)%{DATA:ST}][(SERPRT:)%{DATA:SERPRT}][(OINFO:)%{DATA:oinfo}(,MsgReq=)%{DATA:msgreq}(,FT=)%{DATA:ft}(ResTyp=)%{DATA:RResTyp}][(Source IP:%{IP:sourceIp})]",
#login grok:
"%{DATESTAMP:time} (: [(Login ID:)%{DATA:LoginID}] [(User ID:)%{DATA:UserID}] [(Network ID:)%{DATA:NetworkID}] [(User Name:)%{DATA:UserName}] [(User Type:)%{DATA:UserType}] [(Domain ID:)%{DATA:DomainID}] [(Category Code:)%{DATA:CategoryCode}] [(Log Type:)%{DATA:LogType}] [(Login Time:)%{DATA:LoginTime}] [(Logout Time:)%{DATA:LogoutTime}] [(IP Address:)%{IP:IPAddress}] [(Browser Type:)%{DATA:BrowserType}] [(Other Information:)%{DATA:OtherInformation}]",
#dailylog grok:
"%{DATA:INFO} (: [(IID:)%{DATA:IID}][(RNW:)%{DATA:RNW}][(RQRVT:)%{DATA:RQRVT}][(RQLGT:)%{DATA:RNW}][(RQID:)%{DATA:RQID}][(STV:)%{DATA:STV}][(RQST:)%{DATA:RQST}][(RQS:)%{DATA:RQS}][(RQEST:)%{DATA:RQEST}][(SUID:)%{DATA:SUID}][(SUN:)%{DATA:SUN}][(SC:)%{DATA:SC}][(SM:)%{DATA:SM}][(SNW:)%{DATA:SNW}][(TID:)%{DATA:TID}][(TS:)%{DATA:TS}][(E:)%{DATA:E}][(RM:)%{DATA:RM}][(AMT:)%{NUMBER:AMT:int}][(SST:)%{DATA:SST}][(RID:)%{DATA:RID}][(VAL:)%{NUMBER:VAL:int}][(TOP:)%{NUMBER:TOP:int}][(RTT:)%{NUMBER:RTT:int}][(PPT:)%{NUMBER:PPT:int}][(INVALURL:)%{DATA:INVALURL}][(INVALRESP:)%{DATA:INVALRESP}][(INRURL:)%{DATA:INRURL}][(INRRESP:)%{DATA:INRRESP}]"
]
}
}
json {
source => "message"
}
json {
source => "message"
remove_field => ["message"]
}
}
output{
stdout { codec => rubydebug }
}