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
SplunkTrust
SplunkTrust
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, an upvote would be appreciated.
0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!