-
Notifications
You must be signed in to change notification settings - Fork 114
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
Adding date time filter to node count RPC #3074
Conversation
Signed-off-by: Lance Finfrock <[email protected]>
…_date_filter_node_counts
…_date_filter_node_counts
Signed-off-by: Lance Finfrock <[email protected]>
0e4c04c
to
f3b4fd6
Compare
@@ -6,6 +6,10 @@ option go_package = "github.com/chef/automate/api/external/cfgmgmt/request"; | |||
message NodesCounts { | |||
// List of filters to be applied to the node count results. | |||
repeated string filter = 1; | |||
// Earliest node checkin time to return for the node counts. |
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 know this is still in draft, i'm just doing some early review..
can you add an example of the format of the time string?
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.
also: api requires us to say
- count of nodes that have checked in over the given time period
- total count of nodes that have ever checked in
will the API response, as is, return that information for us? so in other words, is the total nodes count returned unaffected by the time range? and then just the success/failure counts are affected by the time range?
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.
No, that is not how it is working. The start and end dates are not required. So, to get all the nodes check in ever, send a request with no start and end date. To get the number of nodes that have check in in the last 24 hours send a request with the start with a timestamp from 24 hours ago and the end with the timestamp from now. This would require two requests to get both.
I will add the example date format to the proto.
🔩 Description: What code changed, and why?
To provide support for the "daily check-in" count for the desktop offering a start and end date has been added to the NodesCounts RPC. The start and end date filters on the node's check-in DateTime.
⛓️ Related Resources
#2995
👍 Definition of Done
Have an API that provides the number of nodes that have checked in and the number of nodes that have check-in within the last 24 hours.
👟 How to Build and Test the Change
to be added before going out of Draft.
✅ Checklist