Handy tools to use Last9 opentelemetry better
A utility to convert Last9 UI log queries into authenticated curl commands for the Last9 Logs API.
- Supports both absolute (e.g.,
03jul25 22:31
) and relative (e.g.,last 5m
,5m
,2h
) time formats - Reads API host and credentials from a
.env
file - Outputs ready-to-use curl commands
- Copy
.env.example
to.env
and fill in your credentials and API host. - Install Python 3.7+.
python l9_logapi_convertor.py '{service="api"}' "last 5m"
python l9_logapi_convertor.py '{service="api"}' "5m"
python l9_logapi_convertor.py '{service="api"}' "03jul25 22:31" "03jul25 23:31"
- For relative time, only one time argument is needed.
- For absolute time, provide both start and end times.
See .env.example
for all supported variables:
LAST9_API_HOST
(orAPI_HOST
,LAST9_HOST
,HOST
)LAST9_USERNAME
LAST9_PASSWORD
python l9_logapi_convertor.py '{service="api"}' "10m"
MIT License