Access Logging

This section highlights the observability features of the Application Load Balancer (ALB) access logging. The ALB supports comprehensive logging that offer visibility into the application traffic. When enabled, all logs are transmitted to our observability system, where they can be queried and analyzed for valuable insights. Central logging must be enabled for this functionality, ensuring effective monitoring and troubleshooting of application traffic. This allows for proactive identification and resolution of potential issues, enhancing overall application performance and reliability.

Access Logs

Once central logging is enabled, logs from your ALB will be sent to the logging service. You can access and analyze these logs using a dedicated Grafana instance.

Enable Central Logging

  • Requirement: Enabling central logging is mandatory for the ALB to send logs.

  • Configuration: Send a POST request to the ALB endpoint to enable central logging. Here's an example using curl:

curl -X "POST" "https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/applicationloadbalancers" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TOKEN' \
-d '{
  "type": "applicationloadbalancer",
  "metadata": {},
  "properties": {
    "name": "My Application Load Balancer",
    "listenerLan": 1,
    "ips": [
      "81.173.1.2",
      "22.231.2.2",
      "22.231.2.3"
    ],
    "targetLan": 2,
    "lbPrivateIps": [
      "81.173.1.5/24",
      "22.231.2.5/24"
    ],
    "centralLogging": true,
    "loggingFormat": "%{+Q}o %{-Q}ci - - [%trg] %r %ST %B \"\" \"\" %cp %ms %ft %b %s %TR %Tw %Tc %Tr %Ta %tsc %ac %fc %bc %sc %rc %sq %bq %CC %CS %hrl %hsl"
  },
  "entities": {
    "forwardingrules": {
      "type": "collection",
      "offset": 0,
      "limit": 1000,
      "_links": {}
    }
  }
}'

Last updated

Was this helpful?