Refine your search:

..as in, I have a .cmd or a .bat file that I would like to use as a scripted input.

I am not able to find any solid examples of how the script:// stanza within my inputs.conf file looks like that actually works.

Anyone do this already that is willing to share their stanza?

asked 16 Dec '10, 22:59

maverick's gravatar image

maverick ♦
2.6k6575
accept rate: 14%

edited 16 Dec '10, 23:10


2 Answers:
[script://$SPLUNK_HOME\etc\apps\myapp\bin\myscript.bat]
disabled = false
index = myindex
interval = 3600
sourcetype = mysourcetype
link

answered 17 Dec '10, 15:56

ziegfried's gravatar image

ziegfried ♦
7.2k1315
accept rate: 53%

Also note that if you are calling a python script you'll similarly want to make sure that path within it are set in a way that Windows can handle along the lines of theFile = open(os.path.join(os.environ["SPLUNK_HOME"], 'etc', 'apps', 'bmon-eventgen', 'bin', 'sample', 'noise_apache.sample'),'r')

(14 Feb '11, 05:56) jflomenberg ♦♦

The Splunk IP Watchlist app has a simple bat file to retrieve IP addresses and uses scripted input to call this bat file to gather the data. It's a simple approach as I'm not much of a DOS style script writer.

http://splunkbase.splunk.com/apps/All/4.x/app:Global+Threat+Landscape%7FIP+Watch+list+V2

link

answered 17 Dec '10, 19:45

ndoshi's gravatar image

ndoshi
4.6k110
accept rate: 0%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×311
×304
×89

Asked: 16 Dec '10, 22:59

Seen: 1,087 times

Last updated: 12 Apr '11, 15:22

Copyright © 2005-2012 Splunk, Inc. All rights reserved.