Splunk Enterprise

Extract field as status from different text strings

jlimlogic
New Member

We are feeding SNMP trap data from a video transcoding device into Splunk.

When a video feed goes down, the following text shows up in the SNMP Trap data:

"Low bitrate in source 'abc'"

The above effectively means that the video stream has gone down and is therefore streaming at zero bitrate.

and when the video stream is restored, the following text is received via an SNMP trap:

"Cleared condition (Low bitrate in source 'abc'"

We'd like to extract a new field called low_bitrate and set the value of the field to true or false, depending on the text string received in the snmp trap as detailed above.

Tags (1)
0 Karma
1 Solution

sundareshr
Legend

You can use calculated field to create the new field. Try something like this (you will have to edit the regex to your specific data)

base search | eval low_bitrate=case(match(_raw, "\sLow bitrate"), "true", match(_raw, "Cleared condition \s\(Low bitrare"), "false", 1=1., null())

http://docs.splunk.com/Documentation/Splunk/6.5.0/Knowledge/Configurecalculatedfieldswithprops.conf

View solution in original post

0 Karma

sundareshr
Legend

You can use calculated field to create the new field. Try something like this (you will have to edit the regex to your specific data)

base search | eval low_bitrate=case(match(_raw, "\sLow bitrate"), "true", match(_raw, "Cleared condition \s\(Low bitrare"), "false", 1=1., null())

http://docs.splunk.com/Documentation/Splunk/6.5.0/Knowledge/Configurecalculatedfieldswithprops.conf

0 Karma

jlimlogic
New Member

Calculated field worked great - thanks!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...