All Apps and Add-ons

Does this app support fetching data via proxy?

shandr
Path Finder

I have the same question here that was asked about this other app:
https://answers.splunk.com/answers/625373/does-this-app-support-fetching-data-via-proxy.html

Does anybody have a code snippet that can be dropped in to this Jira Issues Collector to allow it to connect when behind a proxy?

Below is the HTTP Error that is seen in index=_internal.

file=http.py, func_name=_initialize_connection, code_line_no=253
    INFO Proxy is not enabled for http connection.

file=http.py, func_name=_retry_send_request_if_needed, code_line_no=220
    INFO Invoking request to [https://xxxxxx.atlassian.net/xxxxxx] using [GET] method

file=http.py, func_name=_retry_send_request_if_needed, code_line_no=228
    ERROR Could not send request

File "/opt/splunk/etc/apps/TA-jira-issues-collector/bin/ta_jira_issues_collector/aob_py2/cloudconnectlib/core/engine.py", 
    line 291, in _send_request response = self._client.send(request) 
File "/opt/splunk/etc/apps/TA-jira-issues-collector/bin/ta_jira_issues_collector/aob_py2/cloudconnectlib/core/http.py", 
    line 275, in send url, request.method, request.headers, request.body 
File "/opt/splunk/etc/apps/TA-jira-issues-collector/bin/ta_jira_issues_collector/aob_py2/cloudconnectlib/core/http.py", 
    line 229, in _retry_send_request_if_needed raise HTTPError('HTTP Error %s' % str(err)) HTTPError: 
HTTP Error Unable to find the server at xxxxxx.atlassian.net
0 Karma
1 Solution

shandr
Path Finder

Solved by hard-coding proxy details in python script.

File engine.py class CloudConnectEngine def start

Between line _logger.info('Start to execute requests jobs.') and line job = Job(

Added below line because config.global_settings does not contain $http_proxy.

global_setting.proxy = { "enabled" : True , "type" : "http" , "host" : "proxy.mycompany.com" , "port" : "8080", "rdns" : "True" }

Technical notes
1. Reverse DNS will default to False
2. Proxy schema defines 'rdns' as a String in aob_py2/cloudconnectlib/configuration/schema_1_0_0.json
3. Needed to white-list: api.altassian.com, api.media.atlassian.com, api-private.atlassian.com, admin.atlassian.com, id.atlassian.com
4. To use an Atlassian API Token: Enter your token as your Password. Your Username is the email address that created the token.

To use the REST TA to access xxxx.atlassian.net (e.g. to GET /rest/api/3/serverInfo)
1. Encode both email and token together in format Username:Password at base64encode.org
2. Authentication Type: none
3. HTTP Header Properties: Authorization=Basic T3BzRW5na...

View solution in original post

0 Karma

shandr
Path Finder

Solved by hard-coding proxy details in python script.

File engine.py class CloudConnectEngine def start

Between line _logger.info('Start to execute requests jobs.') and line job = Job(

Added below line because config.global_settings does not contain $http_proxy.

global_setting.proxy = { "enabled" : True , "type" : "http" , "host" : "proxy.mycompany.com" , "port" : "8080", "rdns" : "True" }

Technical notes
1. Reverse DNS will default to False
2. Proxy schema defines 'rdns' as a String in aob_py2/cloudconnectlib/configuration/schema_1_0_0.json
3. Needed to white-list: api.altassian.com, api.media.atlassian.com, api-private.atlassian.com, admin.atlassian.com, id.atlassian.com
4. To use an Atlassian API Token: Enter your token as your Password. Your Username is the email address that created the token.

To use the REST TA to access xxxx.atlassian.net (e.g. to GET /rest/api/3/serverInfo)
1. Encode both email and token together in format Username:Password at base64encode.org
2. Authentication Type: none
3. HTTP Header Properties: Authorization=Basic T3BzRW5na...

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...