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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...