Dear support,
due to our network design we are forced to use our Nagios XI instaces behind a proxy for both HTTP and HTTPS calls.
The proxy is setup under /etc/environment as well as under the Proxy Configuration under Nagios webpage where we are able to check for the updates outside and it is working properly.
What is not working as expected is the Amazon EC2 wizard: at the first page, where it is required the Access Key ID and the Secret Access Key the wizard hangs right after the "Get Available Instance" button is pressed.
The AWS rights looks correct, the user involved has the administrator rights but analyzing the network flow it looks like we are not able to reach the proxy with this call.
Is this wizard forced to use the proxy or not?
Thanks
Amazon EC2 Wizard and proxy
Re: Amazon EC2 Wizard and proxy
Based on the information I've found, it should inherit the environmental variables automatically:
PHP should inherit the values automatically if they are set for all users, please send me your:
Adding your proxy info to your /etc/environment (so all users pick it up, even without tty) should resolve the issue but since the wizard is going to use the apache user to do it you need to make sure the apache user has those set.
Try this and let us know if that resolves the issue:
https://serverfault.com/a/233227
Taken from here:So boto3 does not require the global config to set proxies. All you need to do is set the general https_proxy environment variable and requests/urllib3 should use the value stored in that environment variable. So something like:
export https_proxy=https://username:password@hostname:port
Code: Select all
https://github.com/boto/boto3/issues/338#issuecomment-153442206Code: Select all
/etc/environmentTry this and let us know if that resolves the issue:
https://serverfault.com/a/233227
Re: Amazon EC2 Wizard and proxy
Is not working to me,
and reading the link you sent it looks like many other users having the same problem:
https://github.com/boto/boto3/issues/33 ... -226714116
My proxy env are set under:
and I also added
but all of these settings looks to be override by boto3.
and reading the link you sent it looks like many other users having the same problem:
https://github.com/boto/boto3/issues/33 ... -226714116
My proxy env are set under:
Code: Select all
/etc/environment
http_proxy=http://xxxx.xxxx.com:8080/
https_proxy=http://xxxx.xxxx.com:8080/
Code: Select all
/etc/sysconfig/httpd
export http_proxy="http://xxxx.xxxx.com:8080/"
export https_proxy="http://xxxx.xxxx.com:8080/"
Re: Amazon EC2 Wizard and proxy
Try editing this file:
BELOW THIS CODE:
ADD THIS CODE:
Then test again (force a check) and see if if it works.
Code: Select all
/usr/local/nagios/libexec/check_ec2.pyCode: Select all
# Booleans
inclusive = FalseCode: Select all
# Set Proxy Envars
os.environ['HTTP_PROXY'] = 'http://xxxx.xxxx.com:8080/'
os.environ['HTTPS_PROXY'] = 'http://xxxx.xxxx.com:8080/'Re: Amazon EC2 Wizard and proxy
Great, that worked!
Thanks for your support.
Thanks for your support.