-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add node status conditions metrics #155
Conversation
3101680
to
f9db301
Compare
I would also update the JsonSchema files for e2e test to capture this, with the basic kubelet conditions. |
95269ca
to
21d1242
Compare
48f0d5b
to
0d6b3d6
Compare
Done, I think 😄 |
f8c1a3a
to
b73df28
Compare
21d1242
to
03c208f
Compare
b73df28
to
f5a5d0a
Compare
124dabe
to
6885e7a
Compare
344de7d
to
6454a43
Compare
E2E tests seem great to me, thanks! |
Right now, if namespace metrics are processed, we still iterate over pod-specific metrics, which will have "namespace" label. Those metrics will be added to the namespace entity collection and will be overwritten by next incoming metric of the same name. To avoid putting unrelated data and overwritting it, this commit adds conditions, which only puts relevant metrics for each raw group. This means, "node" group won't have Pod-specific metrics and "namespace" group won't have "pod", "daemonset" and others "more-specific" metrics. This saves some computation time and makes it easier to debug if one dumps entire raw groups struct. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
ec17e3d
to
f49fbf1
Compare
Looking great, thanks @invidian! |
f49fbf1
to
fddced0
Compare
Right now, when processed metric family has more than one metric, it will overwrite the content of the previous metric. This commit changes this behavior and now if there is more then one metric in a single metric family, value of the metric will be converted to collection and appended, making all the metrics available for further processing. Right now, only user of this code is KSM metrics and no metrics are duplicated with recently introduced filtering, however incoming node state conditions metrics (#138) will require multiple metrics coming from GroupMetricsBySpec for processing. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
This commit adds a WithLabelValueInMetricNameAndWithLabelValueMappedToMetricValue function, which allows to generate a set of metrics with label value in the metric name. This will be used to generate node status conditions metrics (#138), but may potentially be used also to generate HPA condition metrics. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
This will be required to test node status condition metrics. Refs #138 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Right now integration creates multiple MetricSets from each job, which makes it harder in e2e tests to validate those metrics against the schema. This commit improves that by merging multiple MetricSets into one before validating against JSON schema. In SDK version 3+ this will no longer be needed. Refs #141 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
For node condition metric, which may have "unknown" value, we agreed to send -1 to the backend, so we do not lose this information. Refs #138 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Closes #138 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
fddced0
to
24b71d0
Compare
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.
Thanks!
Includes commits from #148. Proper diff to look at is here: invidian/improvements...invidian/add-node-status-metricsDraft as the following things are missing: