thanks @Badger
However i get a
"tags": [
"_rubyexception"
],
my message looks like this
{
"MSG": "File successfully transmitted to drive",
"payloadTransferSpeedMBps": "146.388052",
"transferTime": "0.032947",
"readWriteTime": "0.027923",
"reconciliationTime": "0",
"driveTransferSpeedMBps": "146.402652",
"capacityInBytes": "500000000000",
"fileId": "757082",
"@version": "1",
"tapeVid": "V01006",
"checksumingTime": "0.004905",
"totalTime": "0.032877",
"vendor": "IBM",
"thread": "TapeWrite",
"path": "/var/log/cta/cta-taped.log",
"fSeq": "12835",
"fileSize": "4812800",
"headerVolume": "480",
"LBPMode": "LBP_Off",
"tapeDrive": "VDSTK11",
"mediaType": "LTO8",
"waitDataTime": "0.000011",
"waitReportingTime": "0.000108",
"dataVolume": "4812800",
"vo": "desy",
"mountId": "5643",
"mountType": "ArchiveForUser",
"TID": "15081",
"LVL": "INFO",
"PID": "14663",
"@timestamp": "2023-02-15T15:38:45.874Z",
"tags": [
"_rubyexception"
],
"logicalLibrary": "VLSTK10",
"type": "cta-taped"
}
so i want all the values to be integers...these are not the only fields..
my filter looks like this
filter {
ruby {
code => "
event.get('message').each {|key, value|
if value =~ /\A\d+\Z/
event.set(key, value.to_i)
end
}
"
}
}
filter {
mutate {
gsub => ["message", " msg='", " _nested='"]
}
kv {
source => "_nested"
remove_field => "_nested"
}
kv {remove_field => "message" }
}
what am i missing/doing wrong?