Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Extracting fields from SNMP GETBULK data

$
0
0
Hi everyone, I need to extract fields from data continuously polled for via SNMP Modular Input. Each event looks like this: IF-MIB::ifInOctets."1" = "1587826952" IF-MIB::ifOutOctets."1" = "3472375195" IF-MIB::ifInOctets."2" = "0" IF-MIB::ifOutOctets."2" = "0" IF-MIB::ifInOctets."3" = "0" IF-MIB::ifOutOctets."3" = "0" IF-MIB::ifInOctets."4" = "0" IF-MIB::ifOutOctets."4" = "0" IF-MIB::ifInOctets."5" = "0" IF-MIB::ifOutOctets."5" = "0" IF-MIB::ifInOctets."6" = "50036733" IF-MIB::ifOutOctets."6" = "3575426650" IF-MIB::ifInOctets."7" = "0" IF-MIB::ifOutOctets."7" = "0" IF-MIB::ifInOctets."8" = "657176060" IF-MIB::ifOutOctets."8" = "2715199686" I've tried using the extractions in snmp_ta but it didn't work for this particular set of SNMP poll data. It managed to create "*ifInOctets*" and "*ifOutOctets*" fields but does not separate them by interface ID. I've then resorted to index-time extraction. My **transforms.conf**: [snmp_ifOctets_extraction] REGEX=IF-MIB::(.+?)\.\"((?:\d\.?)+)\"\s=\s\"(.*?)\" FORMAT=$1.$2::$3 WRITE_META = true REPEAT_MATCH = true My **props.conf**: [snmp_ifoctets] TRANSFORMS-ifoctets = snmp_ifOctets_extraction That didn't turn out so well either. It extracted just one field, "*ifInOctets.1*". The regex didn't seem to repeat itself throughout the event even though REPEAT_MATCH is set. Anyone have any ideas why this is happening? PS I'm also open to any other ideas on how to parse this set of data. I'm thinking of splitting each poll result into individual events next if index-time extraction isn't workable.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>