Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipe shall allow to export the node utilization report #1628

Open
sidoruka opened this issue Dec 3, 2020 · 4 comments
Open

pipe shall allow to export the node utilization report #1628

sidoruka opened this issue Dec 3, 2020 · 4 comments
Assignees
Labels
goal/dorado ✨ kind/enhancement New feature or request state/has-doc Issues that have documentation state/verify Issues that are already addressed and require validation sys/cli Issues related to the pipe cli
Milestone

Comments

@sidoruka
Copy link
Contributor

sidoruka commented Dec 3, 2020

Background
At the moment, Cloud Pipeline allows viewing the nodes utilization reports in the GUI. But in some cases, users would like to export this information for further usage in an automated manner.

Approach

  • Implement a new command in the CLI, which shall export the CSV file with the node usage metrics:
  • Command shall have the following signature:
pipe cluster monitor --instance-id <CLOUD_INSTANCE_ID> \
                                   --run-id <RUN_ID> \
                                   --from <DATE_FROM> \
                                   --to <DATE_TO> \
                                   --interval <REPORT_BREAKDOWN_INTERVAL> \
                                   --output <RESULT_FILE_NAME>
  • One of --instance-id and --run-id options shall be specified. If a --run-id is set - then the instance id shall be retrieved from the respective job. Both options cannot be set together.
  • --from/--to - dates to generate the report:
    • If --to is not set - use current date
    • If --from is not set - use --to minus 1 day
  • --interval - same periods list as we have in the GUI:
1m
5m
15m
30m
1h
4h
12h
  • --output - where to place the resulting file. If not set - create it in cwd with the auto-generated name using the query parameters: <cluster_monitor_$RUN_ID/$INSTANCE_ID_$FROM_$TO_$INTERVAL.csv>
@sidoruka sidoruka added the kind/enhancement New feature or request label Dec 3, 2020
@sidoruka sidoruka added goal/dorado ✨ sys/cli Issues related to the pipe cli labels Dec 3, 2020
@sidoruka sidoruka added this to the v0.17 milestone Dec 3, 2020
@sidoruka
Copy link
Contributor Author

sidoruka commented Dec 3, 2020

Backport to release/0.16

@mzueva
Copy link
Collaborator

mzueva commented Dec 10, 2020

@sidoruka backported to release/0.16

@NShaforostov
Copy link
Collaborator

Verified.
Works well.

Were tested:

  • export node utilization report by run ID
  • export node utilization report by instance ID
  • export node utilization report with different non-required options (--output, --date-from, --date-to, --interval, --report-type)
  • comparison with the same report exported via the GUI

@NShaforostov
Copy link
Collaborator

Docs were updated via #1516.

@NShaforostov NShaforostov added the state/has-doc Issues that have documentation label Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal/dorado ✨ kind/enhancement New feature or request state/has-doc Issues that have documentation state/verify Issues that are already addressed and require validation sys/cli Issues related to the pipe cli
Projects
None yet
Development

No branches or pull requests

4 participants