Splunk Search

How to search for string like "KeyError: 'ABC_DEF'"

stevenfharris
New Member

I am trying to search for log entries that contain the following: KeyError: 'ABC_DEF'

The following work, but will find all instances of ABC_DEF even if it is not accompanied by KeyError:

  • ABC DEF
  • ABC_DEF
  • 'ABC_DEF'

The following return nothing of use to me:

  • KeyError: ABC_DEF
  • KeyError: 'ABC_DEF'
  • KeyError ABC_DEF
  • KeyError ABC DEF
  • KeyError
  • "KeyError:"

What should my search look like to find the above?

Of note, the last entry above would resolve to the following Splunk query string: index=* "KeyError:"

Thank you in advance

Labels (1)
0 Karma

ITWhisperer
Ultra Champion

It isn't clear whether you have tried these strings in double quotes or not

index=* "KeyError: 'ABC_DEF'"
0 Karma