LogoLogo
  • Overview
    • Introduction
    • Getting Started
    • Nimbus Hub
    • Log Optimization
      • Reduce Optimizations
      • Lint Optimizations
    • Working with NTL
      • Working with Transforms
    • Working with Aggregated Logs
    • Examples
    • Concepts
    • FAQ
    • Architecture
  • Additional Features
    • Configuration Overrides
    • Pause All
    • Error Detection
    • Private Link
  • Integrations
    • Datadog
      • AWS Lambda Extension
      • AWS Lambda Forwarder
      • DD Agent
      • DD Log Forwarding Destination
      • Heroku
      • Journald
      • OpenTelemetry
  • Resources
    • Nimbus Attributes
    • Changelog
    • SLA
    • Bug Bounty
    • Support
  • Preview Features
    • Metric Optimization
    • Datadog CLI
Powered by GitBook
On this page
  • setup
  • logs
  • Usage

Was this helpful?

Export as PDF
  1. Preview Features

Datadog CLI

The Datadog CLI lets you query logs from your terminal. If you're querying aggregated logs, this also gives you the option to disaggregate them into individual log lines.

setup

git clone git@github.com:nimbushq/dd-cli.git
cd dd-cli
yarn && yarn build
npm link

logs

nimbus logs

Search across dd logs. The following environmental variables need to be set in
order to run this command: DD_SITE, DD_API_KEY, DD_APP_KEY

Options:
      --version                             Show version number        [boolean]
      --help                                Show help                  [boolean]
  -q, --query                               dd log query     [string] [required]
  -f, --from                                time in the following format:
                                            2024-02-14T11:35:00-08:00
                                                             [string] [required]
      --to, --t, desc: "time in the
      following format:
      2024-02-14T11:35:00-08:00"                             [string] [required]
  -i, --indexes                             log indexes to search
                                                     [array] [default: ["main"]]
  -d, --disaggregate                        disaggregate aggregated logs
                                                                       [boolean]

Usage

Replace env variables with your org specific values

# regular query
env DD_SITE="***" DD_API_KEY="***" DD_APP_KEY="***" dd-cli logs -q "service:elb " -f "2024-02-14T11:35:00-08:00" -t "2024-02-14T11:38:00-08:00"

# query with log disaggregation
env DD_SITE="***" DD_API_KEY="***" DD_APP_KEY="***" dd-cli logs -q "service:elb " -f "2024-02-14T11:35:00-08:00" -t "2024-02-14T11:38:00-08:00" -d

Last updated 1 year ago

Was this helpful?