Wiki » History » Version 1
Luke Murphey, 06/01/2016 04:40 PM
1 | 1 | Luke Murphey | h1. Wiki |
---|---|---|---|
2 | 1 | Luke Murphey | |
3 | 1 | Luke Murphey | h2. Troubleshooting modular inputs that don't appear in the Splunk Manager |
4 | 1 | Luke Murphey | |
5 | 1 | Luke Murphey | Look in the messages link in the top right of the page to see if you have a message like this: |
6 | 1 | Luke Murphey | |
7 | 1 | Luke Murphey | <pre> |
8 | 1 | Luke Murphey | Unable to initialize modular input "web_input" defined inside the app "website_input": Introspecting scheme=web_input: script running failed (exited with code 1). |
9 | 1 | Luke Murphey | </pre> |
10 | 1 | Luke Murphey | |
11 | 1 | Luke Murphey | You can search the internal log for related errors that indicate the modular input could not start: |
12 | 1 | Luke Murphey | |
13 | 1 | Luke Murphey | <pre> |
14 | 1 | Luke Murphey | index=_internal "ModularInputs - Unable to initialize modular input" |
15 | 1 | Luke Murphey | </pre> |
16 | 1 | Luke Murphey | |
17 | 1 | Luke Murphey | The best way to identify the source of the error if the modular input cannot be loaded by Splunk is to try to load it via Splunk's python interpreter directly. |
18 | 1 | Luke Murphey | |
19 | 1 | Luke Murphey | Here is an example. Consider the modular input is in the following path: /opt/splunk/etc/apps/website_input/bin/web_input.py |
20 | 1 | Luke Murphey | |
21 | 1 | Luke Murphey | To test this, go to the path /opt/splunk/etc/apps/website_input/bin/ using the CLI: |
22 | 1 | Luke Murphey | |
23 | 1 | Luke Murphey | <pre> |
24 | 1 | Luke Murphey | cd /opt/splunk/etc/apps/website_input/bin/ |
25 | 1 | Luke Murphey | </pre> |
26 | 1 | Luke Murphey | |
27 | 1 | Luke Murphey | Next, run Splunk's python against the file: |
28 | 1 | Luke Murphey | |
29 | 1 | Luke Murphey | <pre> |
30 | 1 | Luke Murphey | /opt/splunk/bin/splunk cmd python web_input.py |
31 | 1 | Luke Murphey | </pre> |
32 | 1 | Luke Murphey | |
33 | 1 | Luke Murphey | This should show an error, such as: |
34 | 1 | Luke Murphey | |
35 | 1 | Luke Murphey | <pre> |
36 | 1 | Luke Murphey | Traceback (most recent call last): |
37 | 1 | Luke Murphey | File "web_input.py", line 1, in <module> |
38 | 1 | Luke Murphey | somethingnotdefined |
39 | 1 | Luke Murphey | NameError: name 'somethingnotdefined' is not defined |
40 | 1 | Luke Murphey | </pre> |