I have tried this and get the 'Connection refused'
ConnectionError: HTTPSConnectionPool(host='login.windows.net', port=443): Max retries exceeded with url: /************/oauth2/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f749994ad90>: Failed to establish a new connection: [Errno 111] Connection refused',))
What I did was use the OS environment var by adding this at the top of the azure_billing.py:
import os
proxy='http://10.10.1.10:3128'
sproxy='http://10.10.1.10:1080'
os.environ['HTTP_PROXY'] = proxy
os.environ['HTTPS_PROXY'] = sproxy
This allowed it to reach the https://management.azure.com, but now I am getting this error:
2019-04-16 16:10:21,171 INFO pid=8102 tid=MainThread file=connectionpool.py:_new_conn:758 | Starting new HTTPS connection (1): 127.0.0.1
2019-04-16 16:10:21,269 INFO pid=8102 tid=MainThread file=connectionpool.py:_new_conn:758 | Starting new HTTPS connection (1): 127.0.0.1
2019-04-16 16:10:21,375 ERROR pid=8102 tid=MainThread file=base_modinput.py:log_error:307 | Traceback (most recent call last):
File "/opt/splunk/etc/apps/TA-Azure-billing/bin/ta_azure_billing/modinput_wrapper/base_modinput.py", line 113, in stream_events
self.parse_input_args(input_definition)
File "/opt/splunk/etc/apps/TA-Azure-billing/bin/ta_azure_billing/modinput_wrapper/base_modinput.py", line 152, in parse_input_args
self._parse_input_args_from_global_config(inputs)
File "/opt/splunk/etc/apps/TA-Azure-billing/bin/ta_azure_billing/modinput_wrapper/base_modinput.py", line 171, in _parse_input_args_from_global_config
ucc_inputs = global_config.inputs.load(input_type=self.input_type)
File "/opt/splunk/etc/apps/TA-Azure-billing/bin/ta_azure_billing/splunktaucclib/global_config/configuration.py", line 270, in load
input_item['entity']
File "/opt/splunk/etc/apps/TA-Azure-billing/bin/ta_azure_billing/splunktaucclib/global_config/configuration.py", line 175, in _load_endpoint
**query
File "/opt/splunk/etc/apps/TA-Azure-billing/bin/ta_azure_billing/solnlib/packages/splunklib/binding.py", line 298, in wrapper
return request_fun(self, *args, **kwargs)
File "/opt/splunk/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/splunk/etc/apps/TA-Azure-billing/bin/ta_azure_billing/solnlib/packages/splunklib/binding.py", line 232, in _handle_auth_error
raise AuthenticationError(msg, he)
AuthenticationError: Autologin succeeded, but there was an auth error on next request. Something is very wrong.
... View more