Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #786 from openshift-cherrypick-robot/cherry-pick-7…
…69-to-release-4.10 [release-4.10] Bug 2083242: IR-253: add prometheus rules for image registry operations metrics
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Exported metrics | ||
|
||
## `imageregistry:operations_count:sum` | ||
|
||
| Operation | Resource type | | ||
| --------- | ------------------ | | ||
| `get` | `blob`, `manifest` | | ||
| `create` | `blob`, `manifest` | | ||
|
||
## `imageregistry:imagestreamtags_count:sum` | ||
|
||
| Source | Location | Description | | ||
| ---------- | -------------------- | ------------------------------------------------------------- | | ||
| `imported` | `openshift`, `other` | Image Stream Tags imported in 'openshift' or other namespaces | | ||
| `pushed` | `openshift`, `other` | Image Stream Tags pushed to 'openshift' or other namespaces | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: image-registry-rules | ||
namespace: openshift-image-registry | ||
annotations: | ||
include.release.openshift.io/ibm-cloud-managed: "true" | ||
include.release.openshift.io/self-managed-high-availability: "true" | ||
include.release.openshift.io/single-node-developer: "true" | ||
spec: | ||
groups: | ||
- name: imageregistry.operations.rules | ||
rules: | ||
- expr: | | ||
label_replace( | ||
label_replace( | ||
sum by (operation) (imageregistry_request_duration_seconds_count{operation="BlobStore.ServeBlob"}), "operation", "get", "operation", "(.+)" | ||
), "resource_type", "blob", "resource_type", "" | ||
) | ||
record: imageregistry:operations_count:sum | ||
- expr: | | ||
label_replace( | ||
label_replace( | ||
sum by (operation) (imageregistry_request_duration_seconds_count{operation="BlobStore.Create"}), "operation", "create", "operation", "(.+)" | ||
), "resource_type", "blob", "resource_type", "" | ||
) | ||
record: imageregistry:operations_count:sum | ||
- expr: | | ||
label_replace( | ||
label_replace( | ||
sum by (operation) (imageregistry_request_duration_seconds_count{operation="ManifestService.Get"}), "operation", "get", "operation", "(.+)" | ||
), "resource_type", "manifest", "resource_type", "" | ||
) | ||
record: imageregistry:operations_count:sum | ||
- expr: | | ||
label_replace( | ||
label_replace( | ||
sum by (operation) (imageregistry_request_duration_seconds_count{operation="ManifestService.Put"}), "operation", "create", "operation", "(.+)" | ||
), "resource_type", "manifest", "resource_type", "" | ||
) | ||
record: imageregistry:operations_count:sum |