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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...