Skip to content

A small utility to retrieve a paginated log dump via Datadog's API.

Notifications You must be signed in to change notification settings

nsuarezcanton/datadog-log-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datadog-log-downloader

A Node.js utility for retrieving Datadog logs. In a sense, a small implementation of Collect multiple logs with Pagination.

Pre-requisites

  • Install Node.js.
  • Set the environment variables DD_API_KEY, DD_APP_KEY and DD_SITE_URL according to your account details.

Getting started

  • Install dependencies npm install.

Usage

cd datadog-log-downloader
query="*" from="now - 15m" to="now" npm start

or, if you want to place them in a file, you can:

query="*" from="now - 15m" to="now" npm start > log_dump.log

Notes

  • This script interacts with Datadog's "Get a list all of logs" endpoint.
  • The parameters above (query, from and to) accept the same kind of arguments as in Datadog's documentation. This gives you some flexibility in terms of how you'd like to express your timestamps.

About

A small utility to retrieve a paginated log dump via Datadog's API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published