How to Configure HTTP Proxies
  • 2 Minutes to read
  • Dark
    Light
  • PDF

How to Configure HTTP Proxies

  • Dark
    Light
  • PDF

Article Summary

If you have a network architecture that requires internet traffic to flow through a proxy server, this guide will help you ensure that Retrace can communicate out through your proxy server seamlessly.

Windows & Linux
This guide provides guidance on how to configure the Windows & Linux agents both. They are configured differently.

Configuring for Linux Agents

Before you proceed through these steps, you need to ensure that YUM or APT are configured to use the proxy as the Stackify Linux Agent installer will use these services.

An external configuration file will be located in the stackify-agent folder (the folder is created when you unzip the installer file, where you will install the agent from) named stackify-agent.conf. This file contains the proxy server information necessary for the agent to send HTTP traffic through the proxy.  The agent will use this configuration when creating all HTTP Client instances.

Note: The stackify-agent.conf file needs to be edited before the agent is installed.

Editing the stackify-agent.conf file

Uncomment the https.proxyHost, https.proxyPort and https.proxyCert (if applicable) lines in stackify-agent.conf and set the appropriate values based on the proxy installation. Proceed with normal agent installation.

This file will be copied to /usr/local/stackify/stackify-agent/stackify-agent.conf for the agent. It will be used for initial registration and for the stackify-agent service.

# The http.proxyHost and http.proxyPort properties define the proxy host
# and port for all HTTP connections.
#http.proxyHost=
#http.proxyPort=
#http.proxyCert=

Configuring for Windows Agents

Configuring the proxy setting in Windows is done by creating a file in the agent's folder (C:\Program Files (x86)\Stackify by default) called CustomAgent.config.  Below is an example of how to populate the .config file (you can create a file and just paste this directly into it):

<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
  <!-- To force the agent to use a proxy server, set it here -->
  <add key="ProxyServer" value="proxy_server_address:port" />
</appSettings>

Install the agent, and then create the CustomAgent.config file as described above in the agent’s folder. Once this is complete, restart the StackifyMonitoringService so that it will pick up the new file and start routing traffic through the proxy. Installing using this method will allow traffic to flow around the proxy server until you install the CustomAgent.config file and restart the agent.

Providing Authentication for Proxies

There are two options available for using a proxy with authentication:

Option 1: Put the username and password in the config file:

<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
   <add key="ProxyServer" value="http://username:password@proxy_server_address:port" />
</appSettings>

Option 2: Use Windows Authentication by running the windows service under a specific user account:

<?xml version="1.0" encoding="utf-8" ?>
<appSettings>  
   <add key="ProxyServer" value="http://proxy_server_address:port" />
   <add key="ProxyUseDefaultCredentials" value="true" />
</appSettings>

Was this article helpful?