Skip to content

[BUG] metrics query not working #29

@manishprivet

Description

@manishprivet

Describe the bug

The account I authorized pup with has permissions to view the metrics, and I can verify that by opening the metric explorer on the app.datadoghq.com page. However, pup metrics query is returning a 400 for even the simplest of queries.

To Reproduce

Steps to reproduce the behavior:

  1. Run command pup metrics query
  2. With arguments --query "avg:system.cpu.user{*}" --from "1h" --to "now" --output json
  3. See error Error: failed to query metrics: 400 Bad Request (status: 400)

Expected behavior

It should return the metrics data in JSON

Environment

  • OS: macOS
  • Pup version: pup version dev (pup --version returns this only)
  • Go version: 1.23.1
  • Authentication method: Oauth2

Command output

❯ pup metrics query --query "avg:system.cpu.user{*}" --from "1h" --to "now" --output json
Error: failed to query metrics: 400 Bad Request (status: 400)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions