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

jsonnet/telemeter: Record a "subscribed cluster" metric #297

Merged

Conversation

smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented Jan 16, 2020

There are a number of key dimensions joined against the subscription data
that almost all queries base on.

  1. Is it subscribed
  2. Is it internal
  3. Is it openshift dedicated
  4. Is it in a range of versions
  5. AND is it currently running (subscription_labels does not check that)

This recording rule collapses those into a single metric with cardinality
O(clusters) that should dramatically reduce the cost of queries.

Combined with the previous rule (available) the extremely common query
"which subscribed clusters are unhealthy" becomes

id_version:cluster_available == 0 + on(_id) max by (_id) (id_version_ebs_account_internal:cluster_subscribed == 1)

This also reduces the data that must be searched for almost all other joins
and some dashboards.

Question: how expensive is this recording rule?

We have defined the OpenShift SLI based on whether the cluster
version operator is reporting a failure or not over a period of
time. To better support queries that attempt to aggregate availability
over classes of cluster, create a recording rule that is 1 when
a cluster is available and 0 when the cluster is reporting unhealthy.
If the cluster is not reporting any metrics it would have no data
at that point in time. Include the current version of the cluster
since it is implicit at the time of the recording rule.

This can be used in more complex aggregates by joining on cluster
id.
There are a number of key dimensions joined against the subscription
data that almost all queries base on.

1. Is it subscribed
2. Is it internal
3. Is it openshift dedicated
4. Is it in a range of versions
5. AND is it currently running (subscription_labels does not check that)

This recording rule collapses those into a single metric with
cardinality O(clusters) that should dramatically reduce the cost of
queries.

Combined with the previous rule (available) the extremely common
query "which subscribed clusters are unhealthy" becomes

```
id_version:cluster_available == 0 + on(_id) max by (_id) (id_version_ebs_account_internal:cluster_subscribed == 1)
```

This also reduces the data that must be searched for almost all other
joins and some dashboards.
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 16, 2020
@smarterclayton
Copy link
Contributor Author

smarterclayton commented Jan 18, 2020

/retest

/assign @brancz

@openshift-ci-robot
Copy link
Contributor

@smarterclayton: GitHub didn't allow me to assign the following users: fbrancz.

Note that only openshift members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/retest

/assign @fbrancz

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@brancz
Copy link
Contributor

brancz commented Jan 20, 2020

/retest

5 similar comments
@smarterclayton
Copy link
Contributor Author

/retest

@brancz
Copy link
Contributor

brancz commented Jan 21, 2020

/retest

@brancz
Copy link
Contributor

brancz commented Jan 21, 2020

/retest

@brancz
Copy link
Contributor

brancz commented Jan 21, 2020

/retest

@smarterclayton
Copy link
Contributor Author

/retest

@brancz
Copy link
Contributor

brancz commented Jan 22, 2020

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brancz, 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 [brancz,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 1512156 into openshift:master Jan 22, 2020
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants