Introduction
Last9’s git based path mapping feature simplifies mapping log urls to services - which is similar to how you view your APIs - bunch of endpoints which denote a service.
It works as follows:
- Enable logging for your log source (ALB, Nginx, etc.)
- Onboard log sources by following a simple directory convention in your Last9 github repo.
- Update path mapping file by following a simple json file convention.
- Raise a PR.
- Last9 validates and deploys it.
- As soon as logs are ingested that match that specific path mapping - Last9 dashboard reflects the same.
Sample setup
Let us demonstrate this with a sample setup
- Onboard an ALB with the following requirement:
- Map
/image/jpeg
with image-jpeg-service.
- Map
/image/png
with image-png-service.
- Map
/status/*
with status-service.
Pre-requisites
- You have a Last9 github repo with Last9 Github app installed as per this guide.
- At least one ALB onboarded by Last9 so that you can use it as a reference. If it isn’t there and this is your first LB - Last9 team will help you onboard it.
Steps
-
Enable ALB logging by following this guide.
-
Update your Last9 github repo’s deploy.yaml
file. As Last9 team does the initial onboarding for the first ALB - you should already have the file present.
logs-to-metrics:
- ./logs-to-metrics/alb/test-alb
# add more log sources here