OddEye Proxy

OddEye Proxy is a small and high performance proxy application that act as moc OddEye API server for agents running in internet restricted environments.
It accepts requests from oe-agent, stores metrics in RabbitMQ and pushes it to real OddEye API servers.


Install uWSGI

uWSGI is available as a package in several OS/distributions, but we recommend to install it from source. We need uWSGI with Python3 support.

Installation of dependencies on Debian / Ubuntu systems

apt-get install build-essential python3
apt-get install python3-dev

Installation of dependencies on CentOS / Redhat systems

yum groupinstall "Development Tools"
yum install python
yum install python-devel

Install uWSGI

From source:

tar -zxvf uwsgi-lts.tar.gz
cd uwsgi-${VERSION}
python3 --build
cp uwsgi ${ODDEYE_PROXY_HOME}/sbin

Via pip

pip3 install

Install pika python3 module so OddEye Proxy can connect to RabbitMQ.

 apt-get install python3-pika python3-pika-pool

Or via pip.

pip3 install pika

Install RabbitMQ

Now we need to install RabbitMQ. If you already have RabbitMQ installation at your environment, you can skip this steps.

Debian / Ubuntu

apt-get install rabbitmq

CentOS / Redhat

yum -y install epel-release
yum -y update
yum -y install erlang socat
rpm --import
rpm -Uvh rabbitmq-server-${VERSION}.noarch.rpm
systemctl start rabbitmq-server
systemctl enable rabbitmq-server

Enable RabbitMQ web console

rabbitmq-plugins enable rabbitmq_management

Create admin user

rabbitmqctl add_user admin StrongPassword
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

You can manage RabbitMQ here : http://Your_Server_IP:15672/

Run OddEye Proxy

Now we need to configure OddEye Proxy. conf/config already ships with reasonable defaults, Just make sure to replace [app]xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and [uwsgi] uid/gid with actual values. You can find your UID at Profile section of OddEye Dashboard

uuid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
rabbit_port: 5672
rabbit_user: admin
rabbit_pass: admin

After configuring OddEye Proxy use to start daemons.

${ODDEYE_PROXY_HOME}/ startweb # Starts uWSGI web application 
${ODDEYE_PROXY_HOME}/ startd # Starts RabbitMQ consumer and pushes queued items to OddEye API
${ODDEYE_PROXY_HOME}/ startall # Starts both uWSGI and daemon 

${ODDEYE_PROXY_HOME}/ stopweb # Stops uWSGI web application 
${ODDEYE_PROXY_HOME}/ stopd # Stops RabbitMQ consumer and pushes queued items to OddEye API
${ODDEYE_PROXY_HOME}/ stopall # Stops both uWSGI and daemon