GoogleCloudPlatform / gcpdiag

gcpdiag is a command-line diagnostics tool for GCP customers.
https://gcpdiag.dev/
Apache License 2.0
288 stars 67 forks source link

Output format issue #46

Closed rvidxr666 closed 2 years ago

rvidxr666 commented 2 years ago

Hello!

I have an issue with adjusting a required output format. In the documentation I've noticed that gcpdiag have a support for multiple output formats (json, csv, terminal). But whenever I'm trying to issue the gcpdiag lint --output json --project PROJECT. I'm receiving the following error gcpdiag lint: error: unrecognized arguments: --output json. Could you please explain what can be the issue here?

Regards

joca318 commented 2 years ago

+1

details: gcpdiag 0.55

usage: gcpdiag lint [-h] [--auth-adc] [--auth-key FILE] [--auth-oauth] --project P [--billing-project P] [--show-skipped] [--hide-ok] [--include INCLUDE] [--exclude EXCLUDE] [--include-extended] [-v] [--within-days D] [--config FILE] [--logging-ratelimit-requests R] [--logging-ratelimit-period-seconds S] [--logging-page-size P] [--logging-fetch-max-entries E] [--logging-fetch-max-time-seconds S]

the output was: gcpdiag lint: error: unrecognized arguments: --output csv

Run diagnostics in GCP projects.

optional arguments: -h, --help show this help message and exit --auth-adc Authenticate using Application Default Credentials --auth-key FILE Authenticate using a service account private key file --auth-oauth Authenticate using OAuth user authentication (default) --project P Project ID of project to inspect --billing-project P Project used for billing/quota of API calls done by gcpdiag (default is the inspected project, requires 'serviceusage.services.use' permission) --show-skipped Show skipped rules --hide-ok Hide rules with result OK --include INCLUDE Include rule pattern (e.g.: gke, gke/*/2021*). Multiple pattern can be specified (comma separated, or with multiple arguments) --exclude EXCLUDE Exclude rule pattern (e.g.: BP, */*/2022*) --include-extended Include extended rules. Additional rules might generate false positives (default: False) -v, --verbose Increase log verbosity --within-days D How far back to search logs and metrics (default: 3 days) --config FILE Read configuration from FILE --logging-ratelimit-requests R Configure rate limit for logging queries (default: 60) --logging-ratelimit-period-seconds S Configure rate limit period for logging queries (default: 60 seconds) --logging-page-size P Configure page size for logging queries (default: 500) --logging-fetch-max-entries E Configure max entries to fetch by logging queries (default: 10000) --logging-fetch-max-time-seconds S Configure timeout for logging queries (default: 120 seconds)

dawidmalina commented 2 years ago

Thank you for reporting this issue. Let me investigate this problem.

dawidmalina commented 2 years ago

Hi @rvidxr666, @joca318 this feature was delivered to late and is not part of the 0.55 release - will be available in 0.56 version (should be release in the coming days). On the other hand documentation part was updated and that brings this confusion. I am sorry for the inconvenience.

schweikert commented 2 years ago

Ah, not Dawid is right :) we released 0.55 as a binary-only fix because of migration of artifacts. 0.56 will contain the fix.