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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...