0

I am new in Splunk - as well as in Python and start working on Splunk Custom Module and I have taken reference from Splunk Site Custom Module. When I have created Same file structure using Visual Studio 2017 -> Python3 then its give me an error

  • import controllers.module not found
  • import splunk not found
  • import splunk.search not found
  • import splunk.util not found
  • import splunk.entity not found
  • import json from splunk.appserver.mrsparkle.lib not found
  • import lib.util as util not found

Note: I have already imported Splunk SDK using "pip install splunk-sdk" Still, I can't find any package in the project.

Please, anyone, guide me how to resolve above custom module package error.

If there is any readymade samples are available then please suggest a link.

Thanks in advance

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Dave Kapildev
  • 471
  • 1
  • 7
  • 18

2 Answers2

0

You may be wasting your time. Splunk Modules have been deprecated for over a year and may become unsupported at any time. The packages you are looking for should be part of Splunk. Have you installed it? I believe Splunk does not support Python 3. Try 2.7.

RichG
  • 9,063
  • 2
  • 18
  • 29
0

Have you tried taking a look to simple_xml_exaples app for sourcecodeviewer implementation. I think it is a good approach for adding custom HTML + CCS + third party.js. Furthermore it can be implemented in a custom dashboard.js

edit

Download Simple xml examples APP; in every example dashboard it can be seen that it has a custom component called sourceviewer, that is injected after the load time in every dashboard page.

For that a custom

dashboard.js

is created and inserted in APP/appserver/static so this will override the original

so then you can insert in every dashboard page the new needed components without even afecting the dashboard xml part and its functionalities as pdf generator.

I used that way in order to implement custom Nav as a SideBar.

marcolesh
  • 91
  • 1
  • 7
  • Thx for your reply. please can you suggest any sample url for example – Dave Kapildev Jul 25 '18 at 07:43
  • Of course @KapilDave : http://localhost:8000/en-US/app/simple_xml_examples/simple_chart, you have to download Simple xml examples APP, in every example dashboard you can see that it has a custom component called sourceviewer, that is injected after the load time in every dashboard page – marcolesh Aug 02 '18 at 17:22
  • @KapilDave could you figure it out? – marcolesh Aug 08 '18 at 19:12
  • Thanks @marcolesh , for your great support. Yes, Issue was resolved. sorry for late reply. – Dave Kapildev Sep 19 '18 at 09:00