Splunk Search

How can i extract a field from my custom search command through a conf file ?

phbourrel
New Member

Hello splunkers,
I've got PEM encoded value from SSL certificates that are already indexed.
I've made a python custom search command to display a decoded part of my value : the "not before" date of my x509 certificate.
The extraction works through the search command, but i couldn't manage to make it work through a conf file.
Could anyone help me through this.
Thank you.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

There currently is no way to extend the eval command with custom functions, and I don't know of a way to run a custom search command as a configured field extraction.

One possible approach could be a scripted lookup - those allow you to run a piece of python on some fields from your result, and return fields of its own. You should be able to pass your encoded field into there, decode, and pass some output back up.

0 Karma

phbourrel
New Member

Thks a lot Martin, that is exactly the conclusion to which i've come.
I gave up the idea of using my custom search command through a conf file and looking towards the external lookup process, which, as you say yourself could be the response to my problem.
Thks again for the thinking and suggestion, i'll let everyone know as soon as i get through to my work.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

What do you mean by "make it work through a conf file"?
Are you trying to run a custom search command to extract a field?

0 Karma

phbourrel
New Member

Execute it as i would with an eval command.
Yes I'm trying to run a custom search command to extract a field.

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...