Comments (7)
I'll have to check into this. I've not developed behind a proxy and I am not sure of the Python standard library's use of the environment variable you set. Most likely if it's not respecting it, I'll have to add a proxy config section.
from newrelic-plugin-agent.
I got this working by manually adding proxy info to agent.py. Note that my https proxy needs you to talk to it via http so I forced this with an http://proxy
/usr/local/lib/python2.7/dist-packages/newrelic_plugin_agent/agent.py
line 179
proxyDict = {
"http" : "myserver:787",
"https" : "http://myserver:787"
}
try:
response = requests.post(self.PLATFORM_URL,
headers=self.http_headers,proxies=proxyDict,
data=json.dumps(body, ensure_ascii=False))
Ideally, this should pickup the NEW_PROXY_HOST and NEW_PROXY_PORT env variables mentioned here (https://newrelic.com/docs/python/python-agent-configuration#environment-variables). I will likely update this unless you guys prefer fixing this yourselves a different way.
from newrelic-plugin-agent.
Would love a pull request. Ideally it would allow for both a configuration option in the YAML file and it would pick up the right env variables.
On Saturday, June 29, 2013 at 11:16 PM, Scott Becker wrote:
I got this working by manually adding proxy info to agent.py. Note that my https proxy needs you to talk to it via http so I forced this with an http://proxy
/usr/local/lib/python2.7/dist-packages/newrelic_plugin_agent/agent.py
line 179
proxyDict = { "http" : "myserver:787", "https" : "http://myserver:787" } try: response = requests.post(self.PLATFORM_URL, headers=self.http_headers,proxies=proxyDict, data=json.dumps(body, ensure_ascii=False))
Ideally, this should pickup the NEW_PROXY_HOST and NEW_PROXY_PORT env variables mentioned here. I will likely update this unless you guys prefer fixing this yourselves a different way.—
Reply to this email directly or view it on GitHub (#31 (comment)).
from newrelic-plugin-agent.
Is anyone working on a pull request to support proxies? I really need this, so if not, I can do it. Thanks.
from newrelic-plugin-agent.
I am not working on it anytime soon.
from newrelic-plugin-agent.
This proxy patch doesn't seem to work for me.
If I set the ENV var https_proxy, in log I can see:
INFO 2013-07-10 15:37:02 6714 MainProcess MainThread requests.packages.urllib3.connectionpool _new_conn L202 : Starting new HTTP connection (1): proxy-dmz.mydomain.com (I hide real proxy name)
and then:
DEBUG 2013-07-10 15:37:03 6714 MainProcess MainThread requests.packages.urllib3.connectionpool _make_request L296 : "POST https://platform-api.newrelic.com/platform/v1/metrics HTTP/1.1" 501 1109
DEBUG 2013-07-10 15:37:03 6714 MainProcess MainThread newrelic_plugin_agent.agent send_components L185 : Response: 501: ( - and a message from proxy: MethodNotAllowed)
But if I use this patch I don't see anything in log: it seems that the parameter is ignored.
from newrelic-plugin-agent.
If your proxy server is returning 501, MethodNotAllowed, how is the parameter being ignored?
from newrelic-plugin-agent.
Related Issues (20)
- Unble to featch the data from bluemix instance
- Bad link on pypi page
- Request : Reconnect upon "connection reset by peer" condition
- mongodb database roles for newrelic user to monitor database
- force https for rabbitmq HOT 1
- newrelic and redis are running on server and generating logs but on newrelic console am not able to see the hostname under redis plugin
- Support pgbouncer over 1.8.0
- newrelic-plugin-agent issue on linux server
- L235 ConnectTimeoutError
- Enable 'php_apc' crashed newrelic_plugin_agent HOT 1
- New relic Plugin Agent Not starting
- Meetme Plugin Error - No metrics to send to NewRelic this interval HOT 2
- plugin does not seem to work with couch 2 stats format
- Startup fails with "AttributeError: 'tuple' object has no attribute 'major'"
- ImportError: No module named 'Queue' HOT 1
- not authorized on db to execute command { serverStatus: 1 }, but my user is full admin
- Not receiving data?
- Newrelic PostgreSQL Plugin agent failing HOT 2
- AttributeError: 'module' object has no attribute 'Controller' HOT 2
- Proposing a PR to fix a few small typos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newrelic-plugin-agent.