i have got the log looks like this below.
{ "message" => "#, @varbind_list=[#, #>, #, #>], @specific_trap=1, @source_ip="10.10.10.13", @agent_addr=#, @generic_trap=6>",
"host" => "10.10.10.13",
"@version" => "1",
"@timestamp" => "2016-04-08T06:22:17.711Z",
"type" => "snmptrap",
"BGP4-MIB::bgpPeerLastError_10_10_10_54" => "\x00\x00",
"BGP4-MIB::bgpPeerState_10_10_10_54" => "3",
"RFC1155-SMI::enterprises_9_9_187_1_2_1_1_7_10_10_10_54" => "",
"RFC1155-SMI::enterprises_9_9_187_1_2_1_1_8_10_10_10_54" => "1",
"source_ip" => "10.10.10.13"
}
{
"message" => "#, @varbind_list=[#>], @specific_trap=2, @source_ip="10.10.10.12", @agent_addr=#, @generic_trap=6>",
"host" => "10.10.10.12",
"@version" => "1",
"@timestamp" => "2016-04-08T07:09:13.040Z",
"type" => "snmptrap",
"MSDP-MIB::msdpPeerState_10_10_10_54" => "1",
"source_ip" => "10.10.10.12"
}
}
i only want to get "message" 、"host" 、 "@version"、 "@timestamp" 、"type" and "source_ip" ,
how to remove the other field ?
Can somebody give me a hint how I can fix the problem?