KangaCoders / newrelic_openvpn_agent

New Relic plugin to monitor OpenVPN
MIT License
12 stars 1 forks source link

Connections through a proxy server #6

Open pgmac opened 7 years ago

pgmac commented 7 years ago

Hi, I'm running the New Relic OpenVPN client on a server that has no direct internet connection. I am able to get the New Relic Server Agent working using a proxy connection. I've tried setting the proxy settings to the newrelic_openvpn_agent.yml file, thusly:

newrelic:
  license_key: <my license key>
  proxy_host: <my proxy server>
  proxy_port: <my proxy port>
agents:
  extvpn:
    openvpn_status_path: "/path/to/openvpn_status.log"

However, this doesn't appear to be working. I've tried setting the following New Relic environment variables as part of the system init script (the only way I start/stop the OpenVPN agent).

NEW_RELIC_PROXY_HOST=<my proxy server>
NEW_RELIC_PROXY_PORT=<my proxy port>

I also set the system HTTP_PROXY environment variable in the init script:

HTTP_PROXY="http://${NEW_RELIC_PROXY_HOST}:${NEW_RELIC_PROXY_PORT}"

None of these seems to be enabling access to push the data out to New Relic.

These are the errors coming through in my /var/log/newrelic-openvpn.log

[2017-07-03 03:05:34 UTC] HTTP Connection Error: #<Faraday::ConnectionFailed wrapped=#<Net::OpenTimeout: execution expired>> execution expired
[2017-07-03 03:05:34 UTC]   ****ERROR: FAILED: No response
[2017-07-03 03:05:34 UTC] Gathered 6 statistics

Are you able to help me get this data into New Relic, please?

I can do some code changes if required. My Ruby skills are not deep, but I'll hack almost anything together.

Regards, Paul