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

Adding date time filter to node count RPC #3074

Closed
wants to merge 4 commits into from

Conversation

lancewf
Copy link
Contributor

@lancewf lancewf commented Mar 10, 2020

🔩 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

@lancewf lancewf force-pushed the lancewf/adding_date_filter_node_counts branch from 0e4c04c to f3b4fd6 Compare March 10, 2020 21:03
@@ -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.

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?

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?

Copy link
Contributor Author

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.

@lancewf lancewf closed this Mar 10, 2020
@lancewf lancewf deleted the lancewf/adding_date_filter_node_counts branch April 21, 2020 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants