ddcat

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 3 Imported by: 0

README

ddcat

test

CLI to display Datadog Logs.

Usage

Usage: ddcat --api-key=STRING --app-key=STRING <query>

Arguments:
  <query>    Search query. see https://docs.datadoghq.com/logs/explorer/search_syntax/

Flags:
  -h, --help                   Show context-sensitive help.
      --api-key=STRING         Datadog API key ($DD_API_KEY).
      --app-key=STRING         Datadog APP key ($DD_APP_KEY).
      --indexes=INDEXES,...    Indexes to search.
      --from=STRING            The minimum time for the requested logs.
      --to=STRING              The maximum time for the requested logs.
      --sort="timestamp"       Sort parameters when querying logs ('timestamp', '-timestamp').
      --with-attrs             Include attributes in displayed logs.
      --with-tags              Include tags in displayed logs
      --version
$ ddcat --from 'now-1m' 'service:web OK'
{"timestamp":"2023-07-26T20:10:30+09:00","status":"info","service":"web","message":"GET /user/info 200 OK"}
{"timestamp":"2023-07-26T20:10:31+09:00","status":"info","service":"web","message":"POST /entry 200 OK"}
{"timestamp":"2023-07-26T20:10:32+09:00","status":"info","service":"web","message":"GET /entry 200 OK"}
...

Installation

brew install kanmu/tools/ddcat

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string, appKey string) *Client

func (*Client) ListLogs

func (client *Client) ListLogs(req datadogV2.LogsListRequest, callback func(datadogV2.LogsListResponse)) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL