Skip to content

muktaa/last9-utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

last9-utilities

Handy tools to use Last9 opentelemetry better

Last9 Log API Converter

A utility to convert Last9 UI log queries into authenticated curl commands for the Last9 Logs API.

Features

  • 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

Setup

  1. Copy .env.example to .env and fill in your credentials and API host.
  2. Install Python 3.7+.

Usage

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.

Environment Variables

See .env.example for all supported variables:

  • LAST9_API_HOST (or API_HOST, LAST9_HOST, HOST)
  • LAST9_USERNAME
  • LAST9_PASSWORD

Example

python l9_logapi_convertor.py '{service="api"}' "10m"

MIT License

About

Handy tools to use Last9 opentelemetry better

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages