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
Get Updates on the Splunk Community!

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...