You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
excerpt: Find out how to forward your logs from an OVHcloud Load Balancer to Logs Data Platform
4
-
updated: 2024-09-25
4
+
updated: 2025-05-26
5
5
---
6
6
7
7
## Objective
@@ -40,48 +40,27 @@ The forwarded logs are generated by [HAproxy](https://en.wikipedia.org/wiki/HAPr
40
40
41
41
### Log content for TCP based listeners : `TCP`, `HTTP`
42
42
43
-
| Field name | Description | Type |
44
-
|------------|-------------|---------|
45
-
| accept_date | The timestamp at which the request/connection was made | datetime (with millisecond resolution) e.g. 25/Mar/2024:14:07:19.536 |
46
-
| bytes_read_int | The number of bytes read by the server | Integer |
47
-
| bytes_uploaded_int | The number of bytes sent by the server to the client | Integer |
48
-
| client_ip | IP address of the client that initiated the TCP connection to the Load Balancer | IP |
49
-
| client_ip_city_name | The city computed by Geoip from `client_ip`| String (e.g. `Lille`) |
50
-
| client_ip_country_code | The ISO 3166 A-2 country code computed by Logstash Geoip from `client_ip` ISO | XX (e.g. `FR`) |
51
-
| client_ip_geolocation | The latitude, longitude computed by Logstash Geoip from `client_ip`| x.x,y.y (e.g. `50.624,3.0511`) XST6Y7U899O0|
52
-
| client_port_int | TCP port of the client that initiated the TCP connection to the Load Balancer | Integer |
53
-
| listener_id | The ID of the listener that received the request/connection | uuid |
54
-
| load_balancer_id | The ID of the Load Balancer that received the request/connection | uuid |
55
-
| member | The member to which the request / connection was sent | uuid |
56
-
| message | The original log message | String |
57
-
| pool | The pool that processed the request / connection | uuid |
58
-
| project_id | The ID of the Public Cloud project to which the Load Balancer belongs | uuid |
59
-
| region | The Public Cloud region to which the load balancer belongs | String |
60
-
| tcp_total_session_duration_time_int | The time in milliseconds the TCP session has been opened when this request is made | Integer |
61
-
| termination_state | The session termination indicator: 2 letters for TCP, 4 letters for HTTP all the details on [HAProxy documentation page](https://docs.haproxy.org/2.6/configuration.html#8.5){.external}| String (e.g. "----") |
62
-
| timestamp | The timestamp at which the log has been issued | String |
63
-
64
43
| Field name | Description | Type |
65
44
|------------|-------------|---------|
66
45
| service_name | The name of the Load Balancer that received the request/connection | String |
67
46
| date_time | The timestamp at which the request/connection was made | datetime (with millisecond resolution) e.g. 25/Mar/2024:14:07:19.536 |
68
-
| zone | The Public Cloud region to which the load balancer belongs | String |
47
+
| zone | The OVHcloud region to which the load balancer belongs | String |
69
48
| client_ip | IP address of the client that initiated the TCP connection to the Load Balancer | IP |
70
49
| client_port_int | TCP port of the client that initiated the TCP connection to the Load Balancer | Integer |
71
-
| frontend_name | Name of the frontend of your OVH
72
-
| frontend_ip |
73
-
| frontend_port_int |
74
-
| backend_name |
75
-
| backend_source_ip |
76
-
| backend_source_port_int |
50
+
| frontend_name | Name of the frontend of your Load Balancer | String |
51
+
| frontend_ip |IP address of the frontend of your Load Balancer | IP |
52
+
| frontend_port_int |TCP port of the frontent of your Load Balancer | Integer |
53
+
| backend_name |Name of the backend server connected to your Load Balancer | String |
54
+
| backend_source_ip |IP address of the backend server connected to your Load Balancer | IP |
55
+
| backend_source_port_int |TCP port of the backend server connected to your Load Balancer | Integer |
77
56
| server_ip |
78
57
| server_port_int |
79
58
| termination_state | The session termination indicator: 2 letters for TCP, 4 letters for HTTP, all the details on [HAProxy documentation page](https://docs.haproxy.org/2.6/configuration.html#8.5){.external}| String (e.g. "----") |
80
59
| bytes_read_int |
81
60
| bytes_uploaded_int |
82
61
| time_duration_int | The time in milliseconds the TCP session has been opened when this request is made | Integer |
83
62
84
-
### Additional content for `HTTP`& `TERMINATED_HTTPS`listeners
63
+
### Additional content for `HTTP` listeners
85
64
86
65
| Field name | Description | Type |
87
66
|------------|-------------|---------|
@@ -126,7 +105,7 @@ Use the following API call to create a subscription:
126
105
127
106
> [!api]
128
107
>
129
-
> @api {v1} /cloud POST /cloud/project/{serviceName}/region/{regionName}/loadbalancing/loadbalancer/{loadBalancerId}/log/subscription
108
+
> @api {v1} /ipLoadbalancing POST /ipLoadbalancing/{serviceName}/log/subscription
130
109
>
131
110
132
111
You will need to replace:
@@ -139,9 +118,9 @@ The POST request has a payload that requires:
139
118
-`streamId`: the target data stream of your LDP account where you want your Load Balancer logs to be forwarded to.
140
119
141
120
```shell
142
-
POST /cloud/project/{serviceName}/region/{regionName}/loadbalancing/loadbalancer/{loadBalancerId}/log/subscription
121
+
POST /ipLoadbalancing/{serviceName}/log/subscription
143
122
{
144
-
"kind": "string", // Currently the only supported value is 'haproxy'.
123
+
"kind": "string", // "http" or "tcp".
145
124
"streamId": "18d602ec-af40-4000-8e59-41ecc8c23f80" // The streamID of the targeted Stream.
146
125
}
147
126
```
@@ -166,30 +145,30 @@ Alternatively, once the operation is finished, the subscriptions can be retrieve
166
145
167
146
> [!api]
168
147
>
169
-
> @api {v1} /cloud GET /cloud/project/{serviceName}/region/{regionName}/loadbalancing/loadbalancer/{loadBalancerId}/log/subscription/
148
+
> @api {v1} /ipLoadbalancing GET /ipLoadbalancing/{serviceName}/log/subscription
170
149
>
171
150
172
151
Once you have the `subscriptionId`, you can get the details using the following API call:
173
152
174
153
> [!api]
175
154
>
176
-
> @api {v1} /cloud GET /cloud/project/{serviceName}/region/{regionName}/loadbalancing/loadbalancer/{loadBalancerId}/log/subscription/{subscriptionId}
155
+
> @api {v1} /ipLoadbalancing GET /ipLoadbalancing/{serviceName}/log/subscription/{subscriptionId}
177
156
>
178
157
179
158
```shell
180
-
GET /cloud/project/{serviceName}/region/{regionName}/loadbalancing/loadbalancer/{loadBalancerId}/log/subscription/{subscriptionId}
159
+
GET /ipLoadbalancing/{serviceName}/log/subscription/{subscriptionId}
0 commit comments