else if [type] == "sems" {
csv {
separator => ","
columns => ["LogType","RootLogId","SubLogId","transactionID","Instance","Operation","Status","User","Hostname","Protocol","Target","startTime","ExecuteTime","responseCode"]
}
dissect {
mapping => {
"ExecuteTime" => "%{day} %{hour}:%{minute}:%{second}.%{millisecond}"
}
}
if [hour] and [minute] and [second] and [millisecond] {
ruby {
code => "event.set( 'timeInSeconds', event.get('hour').to_i3600 + event.get('minute').to_i60 +
event.get('second').to_i + event.get('millisecond').to_f/1000)"
}
}
}
else if [type]== "semn" {
csv {
separator => ","
columns => ["LogType","RootLogId","SubLogId","transactionID","Instance","Operation","Status","User","Hostname","Protocol","Target","startTime","ExecuteTime","responseCode"]
}
dissect {
mapping => {
"ExecuteTime" => "%{day1} %{hour1}:%{minute1}:%{second1}.%{millisecond1}"
}
}
if [hour1] and [minute1] and [second1] and [millisecond1] {
ruby {
code => "event.set( 'timeInSeconds1', event.get('hour1').to_i3600 + event.get('minute1').to_i60 +
event.get('second1').to_i + event.get('millisecond1').to_f/1000)"
}
}
}
else if [type] == "tmoes" {
csv {
separator => ","
columns => ["timeStamp","nodeIP","transactionId","APIName","APICall","startTime","endTime","transTime","responseMsg","responseCode","errMsg1","errMsg2","imsi"]
}
dissect {
mapping => {
"path" => "/%{folder1}/%{folder2}/%{folder3}/%{folder4}/%{folder5}/%{TmoesNodename}.%{LogName}"
}
}
grok { match => [ "TmoesNodename", "^(?...)" ] }
}
else {
csv {
separator => ","
columns => ["site","nodeName","APIName","Status","Share","Total"]
}
}
mutate {
convert => { "Filesystem" => "string" }
convert => { "site" => "string" }
convert => { "Size" => "string" }
convert => { "Used" => "string" }
convert => { "Avail" => "string" }
convert => { "Utilization" => "integer" }
convert => { "MountedOn" => "string" }
convert => { "nodeName" => "string" }
convert => { "APIName" => "string" }
convert => { "Status" => "string" }
convert => { "Value" => "string" }
convert => { "Share" => "float" }
convert => { "Total" => "integer" }
convert => { "timeStamp" => "string" }
convert => { "nodeIP" => "string" }
convert => { "transactionID" => "string" }
convert => { "APICall" => "string" }
convert => { "startTime" => "string" }
convert => { "endTime" => "string" }
convert => { "transTime" => "string" }
convert => { "responseMsg" => "string" }
convert => { "responseCode" => "string" }
convert => { "errMsg1" => "string" }
convert => { "errMsg2" => "string" }
convert => { "imsi" => "string" }
convert => { "message1" => "string" }
convert => { "msisdn" => "string" }
convert => { "message2" => "string" }
convert => { "transid" => "string" }
convert => { "customer_id" => "string" }
convert => { "event" => "string" }
convert => { "service" => "string" }
convert => { "message3" => "string" }
convert => { "streetaddress1" => "string" }
convert => { "streetaddress2" => "string" }
convert => { "city" => "string" }
convert => { "state" => "string" }
convert => { "zipcode" => "string" }
convert => { "latitude" => "string" }
convert => { "longitude" => "string" }
convert => { "status1" => "string" }
convert => { "latencyTime" => "string" }
convert => { "transid1" => "string" }
convert => { "event1" => "string" }
convert => { "imsi1" => "string" }
convert => { "msisdn1" => "string" }
convert => { "LogType" => "string" }
convert => { "RootLogId" => "string" }
convert => { "SubLogId" => "string" }
convert => { "Instance" => "string" }
convert => { "Operation" => "string" }
convert => { "User" => "string" }
convert => { "Hostname" => "string" }
convert => { "Protocol" => "string" }
convert => { "Target" => "string" }
convert => { "ExecuteTime" => "string" }
convert => { "Date" => "string" }
convert => { "TransactionType" => "string" }
convert => { "Address" => "string" }
convert => { "EndPointName" => "string" }
convert => { "FailureStatusCode" => "string" }
convert => { "TransactionDuration" => "string" }
convert => { "x-device-auth-mode" => "string" }
convert => { "x-user-auth-mode" => "string" }
convert => { "x-device-type" => "string" }
convert => { "x-nsds-version" => "string" }
convert => { "conditiontype" => "string" }
convert => { "reason" => "string" }
}
}
output {
if [type] == "sesvg1" {
elasticsearch {
action => "index"
hosts => "http://localhost:9200"
index => "sesvg1"
}
}
else if [type] == "sesvg1disk" {
elasticsearch {
action => "index"
hosts => "http://localhost:9200"
index => "sesvg1disk"
}
}
else if [type] == "sppvg1" {
elasticsearch {
action => "index"
hosts => "http://localhost:9200"
index => "sppvg1"
}
}
else if [type] == "sppvg1disk" {
elasticsearch {
action => "index"
hosts => "http://localhost:9200"
index => "sppvg1disk"
}
}
else if [type] == "sppvg2" {
elasticsearch {
action => "index"
hosts => "http://localhost:9200"
index => "sppvg2"
}
}