Skip to main content

Software proxy

To block direct access to the external network from the monitored servers and allow external access through a single channel, you can configure a TCP/UDP proxy server to send data to the WhaTap server.

If it is difficult for you to configure a proxy server, you can use the software-based WhatTap software proxy provided by WhaTap. This allows you to control multiple servers indirectly via WhatTap software proxy to the external network. You can also use the general-purpose proxy such as HAProxy.

Software proxy

Agent Installation

If you proceed with installation according to the agent installation guide, you can download the whatap.agent.java.tar.gz file. After unzipping, store the whatap.agent.proxy-X.Y.Z.jar file to a server repository that can communicate with the WhaTap collection server. If you already have an agent installed, you can use the files in the repository.

Tip

To set the port number to pass through a proxy when installing the server agent in a Windows environment, execute the following command.

whatap_infra.exe /SILENT /SERIAL={Access key} /PROXYIP={Proxy server IP} /PROXYPORT=6600

Agent CONFIG.

In this document, the bandwidth of the server where the agent has been located is called Private Subnet, and the bandwidth of the server where the software proxy has been located is called Public Subnet.

Public Subnet

After copying the whatap.agent.proxy-X.Y.Z.jar file to an appropriate path, create a proxy.conf file to set the WhaTap collection server IP and port. The path where the whatap.agent.proxy-X.Y.Z.jar file has been located is $PROXY_HOME.

$PROXY_HOME/proxy.conf
whatap.server.host=52.78.209.94/52.78.224.235 ## Address of the WhaTap application monitoring collection server
listen_port=6600 ## Port to which the proxy listens

Private Subnet

$WHATAP_HOME is the path where the agent has been installed. In $WHATAP_HOME/whatap.conf, change whatap.server.host to the IP of the Public Subnet server.

$WHATAP_HOME/whatap.conf
whatap.server.host={Public Subnet proxy server IP}

For stability, you can configure multiple proxies on Public Subnets. Enter forward slash (/) as the delimiter.

$WHATAP_HOME/whatap.conf
whatap.server.host={Public Subnet proxy server IP #1}/{Public Subnet proxy server IP #2} 

Running the agent

Run the software proxy through the java command or by creating a proxy.sh (proxy.bat) file.

java command
java -jar whatap.agent.proxy-X.Y.Z.jar &
proxy.sh (Windows: proxy.bat)
#!/usr/bin/env bash 
EXE_JAR=`ls *.proxy* | sort -V | tail -1`
${JAVA_HOME}/bin/java ${JAVA_OPTS} -jar $EXE_JAR
sh proxy.sh &
Note

When creating and running the proxy.sh (proxy.bat) file, grant execution role with the $ chmod +x proxy.sh command.

Ending the software proxy

If a software proxy is running, it creates $PROXY_HOME/{PID}.proxy.run files. If you delete this file, the software proxy is ended.

HAProxy

It explains how to build a proxy server by using HAProxy.

Private Subnet

$WHATAP_HOME/whatap.conf
license=<project access key>
whatap.server.host=192.168.203.60 ## Proxy server IP

Public Subnet

See the following to configure the haproxy.cfg file.

/etc/haproxy/haproxy.cfg
frontend proxy_in
mode tcp
bind *:6600
default_backend proxy_out
log global
option httplog

backend proxy_out
mode tcp
server server1 13.124.11.223:6600 maxconn 32
server server2 13.209.172.35:6600 maxconn 32
Note

13.124.11.223:6600 and 13.209.172.35:6600 are the WhaTap application monitoring collection server's IP address and port.

Nginx reverse proxy

It explains how to build a proxy server by using Nginx reverse proxy.

Private Subnet

$WHATAP_HOME/whatap.conf
license=<project access key>
whatap.server.host=192.168.203.60 ## Proxy server IP

Public Subnet

See the following to configure the nginx.conf file.

/etc/nginx/nginx.conf
stream {
upstream tcp_proxy {
server 13.124.11.223:6600;
server 13.209.172.35:6600;
}
server {
listen 6600;
proxy_pass tcp_proxy;
}
}
Note

13.124.11.223:6600 and 13.209.172.35:6600 are the WhaTap application monitoring collection server's IP address and port.

Checking the agent installation

If there is a connection between the server where the agent has been installed and the collection server, you can check it at Whatap Monitoring Service.