Realtime Telemetry Log Streaming
Send your proxy access logs to Graylog or SigNoz as they happen. Watch many XProxy servers in one place, build dashboards and get alerts on errors.
You need: a Graylog or SigNoz server that your XProxy box can reach. The guide shows how to install one.
In short
XProxy reads its proxy log. Every new line goes to your log server as soon as it is written.
Graylog gets GELF over UDP. SigNoz gets OTLP over HTTP. You use one of them.
Filter by device, port, website or error code. Build dashboards and alerts in your tool.
Set it up
Step 1 of 6
Graylog is the server that collects your logs. Already have one? Skip this step.
On an Ubuntu server (18.04, 20.04 or 22.04), run:
curl x-proxy.io/graylog | bashThe script installs Graylog with Docker and asks for an admin password (press Enter to use admin). When it ends, open http://<server-ip>:9000 and log in as admin.
What XProxy sends
- It reads the proxy log files (
xproxy.log) in the Log Path folder. It sends only new lines, the moment they are written. - Every line becomes one message: your Service Name, a
|, then the original line. - The message is marked as an error when
error_codeis not00000. - The parts of the line also arrive as separate fields, so you can search and group by them:
| Field | Type | What it is |
|---|---|---|
log_date | Text | Date of the line, day/month |
log_time | Text | Time of the line, HH:MM:SS |
proxy_service | Text | Service tag of the line, for example MAIN |
modem_position | Text | Position (slot) of the device that served the request |
proxy_protocol | Text | Protocol label in the line. It can be empty |
proxy_port | Number | Port of your XProxy that the client used |
proxy_user | Text | Login the client used. Empty when it logged in by IP |
client_ip | Text | IP of the client that used the proxy |
client_port | Number | Port of that client |
destination_host | Text | Website or host the client asked for |
destination_port | Number | Port of that host |
action | Text | CONNECT for an HTTPS tunnel, or the HTTP method (GET, POST, ...) of a plain HTTP request |
error_code | Text | 00000 means success. Any other code is an error |
received_bytes | Number | Bytes from the website to the client |
sent_bytes | Number | Bytes from the client to the website |
log_file | Text | Name of the log file the line came from |
service_name | Text | The Service Name from your form |
Handy searches
| You want | Graylog | SigNoz |
|---|---|---|
| One service or region | service_name:xproxy-us-east | service.name = "xproxy-us-east" |
| Only errors | NOT error_code:00000 | error_code != "00000" |
| Only HTTPS tunnels | action:CONNECT | action = "CONNECT" |
| One device | modem_position:3 | modem_position = "3" |
| One proxy port | proxy_port:4001 | proxy_port = 4001 |
modem_position is text, so SigNoz wants quotes around the number. Query syntax can differ a little between versions of your tool.
What you can do with it
| You want to | How |
|---|---|
| Count the different clients | Count unique client_ip. |
| Track the error rate | Count lines where error_code is not 00000. |
| Find top websites and bandwidth | Group by destination_host and add up received_bytes and sent_bytes. |
| Watch one dongle or port | Filter by modem_position or proxy_port. |
| Get an alert | Alert on a sudden rise of errors, or when a server sends no logs for a while. |
Many servers
- Give every server its own Host Identifier (Graylog) and every region or group its own Service Name.
- Keep the names the same style. For example start with
prod-orstg-to tell setups apart. - Decide how long to keep logs in your tool. Graylog and SigNoz have their own retention settings.
Error codes
error_code has five digits. The leading zeros are on purpose: they keep sorting and filtering simple.
| Code | Meaning |
|---|---|
00000 | Success. The connection closed normally |
00001–00009 | Login or access rule errors |
00010 | Traffic limit reached |
00011–00019 | Connection errors (socket, bind, connect) |
00020–00029 | Internal errors, such as memory |
00030–00039 | HTTP CONNECT redirection errors |
00050–00069 | SOCKS5 redirection errors |
00090–00099 | Timeouts and network problems |
00100 | Host not found |
00200–00299 | UDP port mapping errors |
00300–00399 | TCP port mapping errors |
00400–00499 | SOCKS proxy errors |
00500–00599 | HTTP proxy errors |
Something not working?
| You see | What to do |
|---|---|
| No logs at all | Check that Enable Telemetry is on and you clicked Save. Send traffic through a proxy port: only new lines are sent. Check that Proxy Access Logs are on in Proxy Settings, and that Log Path is the folder that holds xproxy.log. |
| Save says an endpoint or key is required | SigNoz needs the endpoint and the ingestion key. Graylog needs the server. Both need a Service Name and a Log Path. |
| Graylog shows nothing | Check that the GELF UDP input is running on port 12201, and that your firewall allows UDP 12201 from your XProxy box. |
| SigNoz test fails | The endpoint must have port 4318 and be reachable from the box. Check the ingestion key. |
Questions
Why is proxy_user empty?
The client logged in by IP, so there is no username.
What is the difference between CONNECT and GET or POST?
CONNECT opens a tunnel, used for HTTPS. A plain HTTP request shows its method instead, such as GET or POST.
How do I alert on errors?
Make a rule on error_code not equal to 00000 over a time window. Group by service_name or modem_position to see where it comes from.

