Skip to content

A flag for setting the log level and more verbose log output #220

Closed
@maelvls

Description

@maelvls

I am stuck with a non-working preflight agent on my cluster. Before going further (i.e., using mitmproxy to see what is going on with the HTTP request being made to plaform.jetstack.io), I wondered: is there a "debug" mode that would make the logs a bit more verbose?

By verbose, I would probably expect to see some of the request being made: see the 200 OK and so on. And maybe also some of the payload and the HTTP headers on the request and response.

The agent does not seem to have any --level or -v flag though:

% preflight agent -h
The agent will periodically gather data for the configured data
	gatherers and send it to a remote backend for evaluation

Usage:
  preflight agent [flags]
  preflight agent [command]

Available Commands:
  info        print several internal parameters of the agent

Flags:
  -c, --agent-config-file agent.yaml   Config file location, default is agent.yaml in the current working directory. (default "./agent.yaml")
      --backoff-max-time duration      Max time for retrying failed data gatherers (given as XhYmZs). (default 10m0s)
  -k, --credentials-file string        Location of the credentials file. For OAuth2 based authentication.
  -h, --help                           help for agent
      --input-path string              Input file path, if used, it will read data from a local file instead of gathering data from clusters
      --one-shot                       Runs agent a single time if true, or continously if false
      --output-path string             Output file path, if used, it will write data to a local file instead of uploading to the preflight server
  -p, --period duration                Override time between scans in the configuration file (given as XhYmZs).
      --strict                         Runs agent in strict mode. No retry attempts will be made for a missing data gatherer's data.

Use "preflight agent [command] --help" for more information about a command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.priority/backlogHigher priority than priority/awaiting-more-evidence.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions