I got one solution here,
If you know username then create 'passwords.conf' in default directory containing,
[credential::user_name:]
and in setup.xml use entity "user_name" instead of "_new"
<block title="Public Key" endpoint="storage/passwords" entity="user_name*" mode="iter" eai_strict="false">
... View more
I am developing a Splunk add-on, I want that it to work on Linux as well as on a Windows machine.
In inputs.conf I am providing script path
[script://./bin/myscript.py]
disabled = 0
which is working in Linux but not in Windows.
If I change script
[script://.\bin\myscript.py]
disabled = 0
then it is working in Windows but not in Linux.
Is there any way to use same path for Windows and Linux?
thanks,
yusuf
... View more
Thanks cusello for your response,
. Python script running successfully in app at windows successfully.
. I have tried script using full address ?[script://c:\Programs\splunk\etc\apps\my_app\bin\my_script.py 15]
. 15 at the end of command is argument provided for script interval which is working fine in linux as well as windows.
Actually I am not getting any issue with inputs.conf
my app script is running fine after providing below script path in inputs.conf
path[script://$SPLUNK_HOME\etc\apps\my_app\bin\my_script.py 15]
disabled = 0
I am getting only issue to enable/disable this script from setup page of this app
issue is in below setup.xml block
<block title="my script setting"
endpoint="admin/script"
entity="%24SPLUNK_HOME%5Cetc%5Capps%5CiSIGHTPartners_ThreatScape_App%5Cbin%5Cfetch_indicators.py%2015">
<input field="enabled">
<label>Enable</label>
<type>bool</type>
</input>
</block>
problem is in provided entity field
entity="%24SPLUNK_HOME%5Cetc%5Capps%5CiSIGHTPartners_ThreatScape_App%5Cbin%5Cfetch_indicators.py%2015 "
... View more
I want to remove spaces from starting and ending of field
I was trying to achieve this using
... | rex mode=sed field=A "s/ //g"
but it removes all spaces from the field (within the field also).
... View more