Troubleshooting » History » Version 3
Version 2 (Luke Murphey, 12/12/2018 06:29 PM) → Version 3/4 (Luke Murphey, 12/12/2018 06:31 PM)
h1. Troubleshooting
Below are some pointers to help in debugging the application:
h2. Search for modular input errors
Look at the output in the "Logs" dashboard inside the Network Toolkit app.
You can also run Run a search for the following and see if the logs indicate a problem with the modular input:
<pre>
index=_internal ((sourcetype=*_modular_input OR sourcetype=*_lookup_command OR sourcetype=*_search_command) ERROR) OR (traceback AND NOT sourcetype=splunkd_ui_access)
</pre>
h2. Search for REST handler errors
Run a search for the following and see if the logs indicate a problem with the REST handler:
<pre>
index=_internal (source=network_tools_helper_controller.log OR source= speedtest_modular_input.log OR source= ping_modular_input.log)
</pre>
h2. Input fails and generates a "ConnectionError"
This can happen when the following is
# The IP address is invalid (if referring to the host by IP)
# The domain name cannot be resolved
# The port number provided is invalid (if a port is specified)
# Network connectivity is lost or a firewall blocks the connection
h2. Troubleshooting modular inputs that don't appear in the Splunk Manager
Look in the messages link in the top right of the page to see if you have a message like this:
<pre>
Unable to initialize modular input "ping" defined inside the app "network_toolkit": Introspecting scheme=web_input: script running failed (exited with code 1).
</pre>
You can search the internal log for related errors that indicate the modular input could not start:
<pre>
index=_internal "ModularInputs - Unable to initialize modular input"
</pre>
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.
Here is an example. Consider the modular input is in the following path: /opt/splunk/etc/apps/network_tools/bin/ping.py
To test this, go to the path /opt/splunk/etc/apps/network_tools/bin/ using the CLI:
<pre>
cd /opt/splunk/etc/apps/network_tools/bin
</pre>
Next, run Splunk's python against the file:
<pre>
/opt/splunk/bin/splunk cmd python ping.py
</pre>
This should show an error, such as:
<pre>
Traceback (most recent call last):
File "ping.py", line 1, in <module>
somethingnotdefined
NameError: name 'somethingnotdefined' is not defined
</pre>
Below are some pointers to help in debugging the application:
h2. Search for modular input errors
Look at the output in the "Logs" dashboard inside the Network Toolkit app.
You can also run Run a search for the following and see if the logs indicate a problem with the modular input:
<pre>
index=_internal ((sourcetype=*_modular_input OR sourcetype=*_lookup_command OR sourcetype=*_search_command) ERROR) OR (traceback AND NOT sourcetype=splunkd_ui_access)
</pre>
h2. Search for REST handler errors
Run a search for the following and see if the logs indicate a problem with the REST handler:
<pre>
index=_internal (source=network_tools_helper_controller.log OR source= speedtest_modular_input.log OR source= ping_modular_input.log)
</pre>
h2. Input fails and generates a "ConnectionError"
This can happen when the following is
# The IP address is invalid (if referring to the host by IP)
# The domain name cannot be resolved
# The port number provided is invalid (if a port is specified)
# Network connectivity is lost or a firewall blocks the connection
h2. Troubleshooting modular inputs that don't appear in the Splunk Manager
Look in the messages link in the top right of the page to see if you have a message like this:
<pre>
Unable to initialize modular input "ping" defined inside the app "network_toolkit": Introspecting scheme=web_input: script running failed (exited with code 1).
</pre>
You can search the internal log for related errors that indicate the modular input could not start:
<pre>
index=_internal "ModularInputs - Unable to initialize modular input"
</pre>
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.
Here is an example. Consider the modular input is in the following path: /opt/splunk/etc/apps/network_tools/bin/ping.py
To test this, go to the path /opt/splunk/etc/apps/network_tools/bin/ using the CLI:
<pre>
cd /opt/splunk/etc/apps/network_tools/bin
</pre>
Next, run Splunk's python against the file:
<pre>
/opt/splunk/bin/splunk cmd python ping.py
</pre>
This should show an error, such as:
<pre>
Traceback (most recent call last):
File "ping.py", line 1, in <module>
somethingnotdefined
NameError: name 'somethingnotdefined' is not defined
</pre>