If you have a network architecture that requires internet traffic to flow through a proxy server, this guide will help you ensure that Stackify can communicate out through your proxy server seamlessly.
Configuring for Linux Agents
An external configuration file will be located in the installer folder (the folder created when you unzip the installer file, where you will install the agent from) named stackify-proxy.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.
Above is what you should see when you list files in the Stackify-agent-install-32bit directory after downloading and unzipping the latest installer package.
Note: The stackify-proxy.conf file needs to be edited before the agent is installed.
Editing the stackify-proxy.conf File
Uncomment the https.proxyHost, https.proxyPort and https.proxyCert (if applicable) lines in stackify-proxy.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-proxy.conf for the agent. It will be used for initial registration and for the stackify-agent service.
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>
There are two options for implementing this custom configuration. You can use either, so choose the approach that you’re most comfortable with or that will be most convenient.
1. First 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.
2. First create the folder where you will be installing the Stackify agent (C:\Program Files (x86)\Stackify by default), create the CustomAgent.config file in the folder, and then install in the usual manner. This will ensure that from the very first communication the agent picks up the proxy configuration and routes traffic appropriately.
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 of the running 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>