Bug #2504
Bug #2500: Doesn't work on Splunk 8.0
Fix modular input
Start date:
11/10/2019
Due date:
% Done:
100%
History
#1 Updated by Luke Murphey about 5 years ago
Questions: *
Observations:- I updated to the new modular input library
- There is no output
- Inputs can be created properly. Inputs can be edited too
- The file can run manually without error
- There are no related logs.
- The modular input logs indicate an exception:
2019-11-10 22:01:48,539 ERROR Execution failed Traceback (most recent call last): File "/Users/lmurphey/Splunk/800/etc/apps/website_monitoring/bin/modular_input.zip/modular_input/modular_input_base_class.py", line 1092, in execute self.do_run(in_stream, log_exception_and_continue=True) File "/Users/lmurphey/Splunk/800/etc/apps/website_monitoring/bin/modular_input.zip/modular_input/modular_input_base_class.py", line 961, in do_run if ServerInfo.is_shc_captain(input_config.session_key) == False: File "/Users/lmurphey/Splunk/800/etc/apps/website_monitoring/bin/modular_input.zip/modular_input/shortcuts.py", line 31, in wrapper return function(*args, **kwargs) File "/Users/lmurphey/Splunk/800/etc/apps/website_monitoring/bin/modular_input.zip/modular_input/server_info.py", line 155, in is_shc_captain if not cls.is_on_shc(session_key): File "/Users/lmurphey/Splunk/800/etc/apps/website_monitoring/bin/modular_input.zip/modular_input/shortcuts.py", line 31, in wrapper return function(*args, **kwargs) File "/Users/lmurphey/Splunk/800/etc/apps/website_monitoring/bin/modular_input.zip/modular_input/server_info.py", line 105, in is_on_shc response, _ = splunk.rest.simpleRequest('/services/shcluster/status?output_mode=json', sessionKey=session_key) AttributeError: 'module' object has no attribute 'rest'
- I can reproduce this with:
import os import sys path_to_mod_input_lib = os.path.join('/Users/lmurphey/git/splunk-website-monitoring/src/bin/', 'modular_input.zip') sys.path.insert(0, path_to_mod_input_lib) from modular_input import Field, ModularInput, URLField, DurationField, IntegerField, BooleanField, RangeField import splunk splunk.rest
- This occurs for import of splunk that don't import the sub-imports specifically.
#2 Updated by Luke Murphey about 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100