Hands-on task
API gateway availability in percent
The gateway writes lines TIME METHOD PATH CODE MS to /var/log/gateway/requests.log. Compute the availability SLI — the share of 2xx responses among all requests, in percent, as an integer rounded down — and write the number (without %) to /root/gateway_sli.txt.
- sli
- awk
- percentage
- code range
- END block