-
Notifications
You must be signed in to change notification settings - Fork 84
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
doc: introduces a REST use-cases section #471
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i added an examples section under aggregates endpoint
maybe we should move that here?
doc/source/rest.j2
Outdated
Use-cases examples | ||
================== | ||
|
||
1. I want the top N instances for project_id "BD3A1E52-1C62-44CB-BF04-660BD88CD74D" that consume the most cpu last hour. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/I want/List/
doc/source/rest.j2
Outdated
@@ -931,6 +931,22 @@ reporting values such as the number of new |measures| to process for each | |||
|
|||
{{ scenarios['get-status']['doc'] }} | |||
|
|||
Use-cases examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Use-cases/Use case/
doc/source/rest.j2
Outdated
|
||
To do so, I will use the :ref:`Dynamic aggregates API <aggregates>`. I will use | ||
|start|, |stop|, |granularity| and |groupby| parameters. The entire query will | ||
looke like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i imagine everything will probably go through aggregates endpoint so maybe drop this intro.
doc/source/rest.j2
Outdated
|
||
{{ scenarios['use-case1-top-cpuutil-per-instances']['doc'] }} | ||
|
||
I have ensured that |stop| - |start| = |granularity| to get only one point per |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following is configured so that |stop| - |start| = |granularity| will get only one point per instance.
doc/source/rest.j2
Outdated
instances. | ||
|
||
This will give all informations we need to order by cpu.util timeseries and | ||
pick only the N we are interrested in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will give all information needed to order by cpu.util timeseries which can be filtered down to N results.
Tests FAILURE for HEAD 6ca14b4
|
6ca14b4
to
6ac38f8
Compare
Pull-request updated, HEAD is now 6ac38f8 |
Tests FAILURE for HEAD 6ac38f8
|
Tests SUCCESS for HEAD 6ac38f8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, i was thinking of moving all examples to your original location so it's more visible but this works. :)
doc/source/rest.j2
Outdated
only one point per instance. | ||
|
||
This will give all information needed to order by cpu.util timeseries which can | ||
be filtered down to N results.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/.././
we can maybe move the example REST below the text but it's not important.
6ac38f8
to
7d5755d
Compare
Pull-request updated, HEAD is now 7d5755d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chungg will confirm my change :D
doc/source/rest.j2
Outdated
@@ -838,6 +838,17 @@ Operations between metrics can also be done, such as: | |||
|
|||
{{ scenarios['get-aggregates-between-metrics']['doc'] }} | |||
|
|||
List top N instances for that consume the most cpu last hour |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List the top N resources that consume the most CPU during last hour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/during last/during the last/
doc/source/rest.j2
Outdated
The following is configured so that `stop` - `start` = `granularity` will get | ||
only one point per instance. | ||
|
||
This will give all information needed to order by cpu.util timeseries which can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the information
cpu.util
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with or without 'the' works. i guess with 'the' is more correct.
Tests SUCCESS for HEAD 7d5755d
|
We should list all REST API use-case that people is asking for, to not get issue opened for new feature when it's already possible to get the data. It's not always clear what API call I need to do to get all informations I need for a use-cases. This change starts a new section and add one example. Related gnocchixyz#465.
7d5755d
to
380e355
Compare
Pull-request updated, HEAD is now 380e355 |
Tests SUCCESS for HEAD 380e355
|
We should list all REST API use-case that people is asking for, to
not get issue opened for new feature when it's already possible to get
the data.
It's not always clear what API call I need to do to get all informations
I need for a use-cases.
This change starts a new section and add one example.
Related #465.