Getting Data In

Is Splunk support Perl script?

dada1234
New Member

I am looking for Perl script execution steps in Splunk. Please provide the details steps in case of possible.

Tags (3)
0 Karma

PavelP
Motivator

Hello @dada1234

splunk can get parse output of any script which supported by the operating system. Follow these steps for Linux:

  1. write a perl script

    #!/usr/bin/perl
    print "hello";

  2. place it in /opt/splunk/etc/apps/search/bin/ and add an executable bit

    chmod +x /opt/splunk/etc/apps/search/bin/test.pl

  3. test your script using CLI

    /opt/splunk/etc/apps/search/bin/test.pl
    hello

  4. configure your inputs.conf (/opt/splunk/etc/apps/search/local/inputs.conf)

    [script://./bin/test.pl]
    disabled = false
    sourcetype = test1
    interval = 10

  5. restart splunk

  6. search

    index=* sourcetype=test1

0 Karma

to4kawa
Ultra Champion
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Splunk supports Python and shell (bash) scripts. Other program/script types can be invoked via bash. If you describe want you want to accomplish then perhaps someone can be more specific.

---
If this reply helps you, Karma would be appreciated.
0 Karma

richieri
New Member

But what about Splunk Cloud. Does it also support Perl?

0 Karma

isoutamo
SplunkTrust
SplunkTrust

It’s still same situation for supported languages. Supported means e.g. splunklib etc. integration support. Of course you could use almost any languages to do e.g. scripted inputs.

0 Karma
Get Updates on the Splunk Community!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...