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

metrics: Report cluster_version as seconds since the epoch per type #103

Conversation

smarterclayton
Copy link
Contributor

Building on feedback from the first round, report cluster_version
for each type as seconds since the epoch. The value allows relevant
data to be extracted such as the age of the cluster, the age of the
current payload, when the most recent successful update was applied,
and when the most recent failure started occurring.

Example queries:

# the oldest clusters and what versions they are running
sort(cluster_version{type="cluster"})

# the most recently successfully updated clusters
sort_desc(cluster_version{type="completed"})

# the 20 clusters that recently started failing
topk(20, cluster_version{type="failure"})

# the clusters running the oldest payloads
sort(cluster_version{type="current"})

Building on feedback from the first round, report `cluster_version`
for each type as seconds since the epoch. The value allows relevant
data to be extracted such as the age of the cluster, the age of the
current payload, when the most recent successful update was applied,
and when the most recent failure started occurring.
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 25, 2019
@smarterclayton
Copy link
Contributor Author

/assign @abhinavdahiya

as from the previous pr

latest = condition.LastTransitionTime.Time
}
}
if cv.CreationTimestamp.After(latest) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
hmm, the placement for this check is odd, i think we are pretty sure that creation time is less than history and conditions...

@abhinavdahiya
Copy link
Contributor

This looks good, Thanks!

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, smarterclayton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,smarterclayton]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit a7b7fd0 into openshift:master Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants