Refine your search:

Guys,

Just wondering if you could help me...

When I go to add a scripted input for my Splunk App I get the following error message:

Encountered the following error while trying to save: In handler 'script': The command path `"c:\program files\splunk\etc\apps\winFW\bin\rules.py"` is not allowed for scripted inputs.

Using the following command path:

"c:\program files\splunk\etc\apps\winFW\bin\rules.py"

I have tried it with and without the " , and tried the path as a above and as it appears on the command line (i.e. "C:\Program Files\Splunk\etc\apps\winFW\bin\rules.py") Can someone explain where I am going wrong please.

Cheers

asked 11 Oct '11, 06:47

hewhib's gravatar image

hewhib
211
accept rate: 0%

edited 11 Oct '11, 06:55

ftk's gravatar image

ftk ♦
6.2k419


One Answer:

I have one working that looks very similar to this in my inputs.conf:

[script://$SPLUNK_HOME\etc\apps\app_name\bin\script.bat]
disabled = false
index = someindex
interval = #####
sourcetype = somesourcetype

Hope this helps!

link

answered 11 Oct '11, 09:36

jbsplunk's gravatar image

jbsplunk ♦
4.9k114
accept rate: 34%

edited 11 Oct '11, 09:37

in your inputs.conf file, I'm assuming you have a batch file not a python script? or do you have a batch file calling the python script.

(11 Oct '11, 10:13) hewhib
1

Its just a batch file. If your using a python script it should be fine too, just be sure your paths are configured so that Windows understands.

Something like "stuff = open(os.path.join(os.environ["SPLUNK_HOME"], 'etc', 'apps', 'app_name', 'bin', 'scripts', 'yourscript.py'),'r')" would do the trick.

(11 Oct '11, 10:19) jbsplunk ♦

Not sure what I did, but after playing around with my python script, I tried it again and it worked. But thank-you for you help, I will note the last comment, I'm sure I will need it

(12 Oct '11, 03:57) hewhib
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:

×303
×89
×87

Asked: 11 Oct '11, 06:47

Seen: 533 times

Last updated: 12 Oct '11, 03:57

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