Hello All,
I want to parse the below mentioned log value in integer format only, but when i map it to additional.fields or
Solved! Go to Solution.
Hi @James_E ,
The parser code you gave me i have already tried it didn't work, so after some research i found out a differrent method to get it parse. Please find the below parser code for your reference.
@sudeep_singh Can you try the below? If you want it to be an integer, you need to convert it to an integer. The number_value should store it as a number within WAFSQLiAttachScore_label.value.
if [WAFSQLiAttackScore] != "" {
mutate {
convert => {
"WAFSQLiAttackScore" => "integer"
}
on_error => "already_string"
}
mutate {
replace => {
"WAFSQLiAttackScore_label.value.number_value" => "%{WAFSQLiAttackScore}"
"WAFSQLiAttackScore_label.key" => "WAFSQLiAttackScore"
}
on_error => "err"
}
mutate{
merge => {
"security_result.about.resource.attribute.labels" => "WAFSQLiAttackScore_label"
}
on_error => "err"
}
}
Hi @James_E ,
The parser code you gave me i have already tried it didn't work, so after some research i found out a differrent method to get it parse. Please find the below parser code for your reference.