Container-Native Metering
Revenium's container-native metering agent offers real-time, zero-latency monitoring and metering of API and microservice traffic across without requiring API gateways, sidecars or code modification
Last updated
Revenium's container-native metering agent offers real-time, zero-latency monitoring and metering of API and microservice traffic across without requiring API gateways, sidecars or code modification
Last updated
With Revenium's container agent, API and microservice traffic can be monitored and metered on Linux bare metal, virtual machines and containers. This provides real-time, zero-latency visibility into API traffic across an enterprise without the need for API Gateways, sidecars, code modification or other invasive approaches.
For testing purposes, our container-based instructions are simple to implement, though for production use cases, we recommend a native installation on the host server to allow for all container traffic to be metered without individual modification. There are also security reasons for this recommendation which are explained in the section below.
Each of the installation options is outlined below.
Replace HTTP_PORT with the port your APIs are bound to and REVENIUM_API_KEY with your .
Its also possible to install the agent manually using apt:
The agent can be run from /usr/bin/isotope and accepts the following command line parameters.
The following shows the agent listening on ports 8080 and 8443 on the "eth0" and "docker0" interfaces and emitting statistics to stdout every 5 seconds. Additionally, it defines a port mapping that will decode requests on port 9091 to port 8080 so that external traffic arriving on port 9091 mapped to port 8080 can be captured. Lastly, it defines the header (clientName) that will send the client identifier to Revenium so that you can easily identify API traffic by Subscriber.
/usr/bin/isotope --ports 8080,8443 --interfaces eth0,docker0 --port-mappings 9091:8080 --api-key REVENIUM_API_KEY --statistics-interval 5 --metering-header clientName
An entrypoint script can be used to integrate the Revenium agent into an API's Docker image. Download the entrypoint script template into the directory with your Dockerfile using the command below.
Next modify the entrypoint script with the HTTP port your API is listening on and your Revenium API Key and save the entrypoint
file in the directory with your Dockerfile and docker-compose.yml file.
Next, add the entrypoint to your Dockerfile. An example Dockerfile is shown below with lines 14 & 15 added to show what you will need to insert this into your own environment.
Once you have inserted the lines above into your Dockerfile, proceed to build and run the docker images as you normally would with commands like docker build
and docker run
/ docker-compose up
.
Once launched, the agent will be running in the background and logging to /var/log/isotope.log
To observe transactions being recorded in Revenium navigate to Transactions -> Analytics Transaction Logs.
You will also see analytics data from your transactions presented under the "API Analytics" section of the left navigation menu.
can also be appended to the entrypoint script. In the example immediately below we are configuring the agent to listen for HTTP API traffic on ports 8080 and 9090 and also specifying the correlation header we'll use to map API requests to responses. Lastly, it defines the header (clientName) that will send the client identifier to Revenium so that you can easily identify API traffic by Subscriber.
Docker containers running eBPF programs usually require running the program in "privileged" mode and mounting the host's BPF filesystem (/sys/fs/bpf). Production deployments should run the agent on the container host (using the ) in order to monitor API traffic across all containers without requiring privileged access.
If you prefer to test in a sample docker environment before implementing this agent into your own application, you can easily do so using our on GitHub. The stack will create one container to send API traffic, one to receive traffic and a synthetic load generator, all of which are connected to your own Revenium account (linked by providing your in the configuration).