Skip to content

Commit 8e962c4

Browse files
Merge pull request #187 from sysdiglabs/staging
Staging
2 parents 386ff45 + 5a8c5af commit 8e962c4

26 files changed

+2094
-19
lines changed

apps/harbor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ keywords:
77
- Available
88
availableVersions:
99
- '1.1'
10+
- '2.2'
1011
shortDescription: "Harbor is an open source container image registry that secures images with role-based access control"
1112
description: |
1213
Harbor is an open source container image registry that secures images with role-based access control, scans images for vulnerabilities, and signs images as trusted.

resources/harbor/ALERTS-v1.1.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Alerts
2+
## HarborIsDown
3+
This alert trigger when the service is down
4+
5+
## ProjectQuotaIsRaisingTheLimit
6+
This alerts trigger when the usage of the storage of any project is getting close to the limit

resources/harbor/ALERTS-v2.2.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Alerts
2+
## HarborCoreIsDown
3+
This alert trigger when Harbor Core Is Down
4+
5+
## HarborDatabaseIsDown
6+
This alert trigger when Harbor Database Is Down
7+
8+
## HarborRegistryIsDown
9+
This alert trigger when Harbor Registry Is Down
10+
11+
## HarborRedisIsDown
12+
This alert trigger when Harbor Redis Is Down
13+
14+
## HarborTrivyIsDown
15+
This alert trigger when Harbor Trivy Is Down
16+
17+
## HarborJobServiceIsDown
18+
This alert trigger when Harbor JobService Is Down
19+
20+
## Harborp99latencyishigherthan10seconds
21+
This alert trigger when Harbor p99 latency is higher than 10 seconds
22+
23+
## HarborErrorRateisHigh
24+
This alert trigger when Harbor Error Rate is High
25+
## ProjectQuotaIsRaisingTheLimit
26+
This alerts trigger when the usage of the storage of any project is getting close to the limit

resources/harbor/ALERTS.md

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.

resources/harbor/INSTALL-v2.2.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Installing the exporter
2+
Harbor is already instrumented so you don't have to add any extra exporter.

resources/harbor/README.md renamed to resources/harbor/README-v1.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Harbor is an open-source container registry, originally developed by VMware and
44
hosted container registries such as DockerHub, Quay, ECR, GCR or ACR; when you need a self-hosted registry, Harbor is a great choice.
55
Harbor provides great features such as RBAC, replication and image scanning.
66

7-
#Prometheus and exporters
7+
# Prometheus and exporters
88

99
Harbor doesn’t expose Prometheus metrics natively (although there is an issue for it: #4557). However, Max Cai wrote a Prometheus exporter
1010
that queries Harbor API and generates a bunch of useful metrics.

resources/harbor/README-v2.2.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Harbor
2+
3+
Harbor is an open-source container registry, originally developed by VMware and now under the CNCF umbrella. Although many of us typically use
4+
hosted container registries such as DockerHub, Quay, ECR, GCR or ACR; when you need a self-hosted registry, Harbor is a great choice.
5+
Harbor provides great features such as RBAC, replication and image scanning.
6+
7+
# Prometheus and exporters
8+
9+
Harbor is already instrumented so you don't have to add any extra exporter.
10+
11+
```
12+
helm install harbor harbor/harbor
13+
```
14+
15+
16+
# Attributions
17+
Configuration files and dashboards are maintained by [Sysdig team](https://sysdig.com/).

resources/harbor/alerts.yaml renamed to resources/harbor/alerts-v1.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ app: Harbor
44
version: 1.0.0
55
appVersion:
66
- '1.1'
7-
descriptionFile: ALERTS.md
7+
descriptionFile: ALERTS-v1.1.md
88
configurations:
99
- kind: Prometheus
1010
data: |

resources/harbor/alerts-v2.2.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
apiVersion: v1
2+
kind: Alert
3+
app: Harbor
4+
version: 1.0.0
5+
appVersion:
6+
- '2.2'
7+
descriptionFile: ALERTS-v2.2.md
8+
configurations:
9+
- kind: Prometheus
10+
data: |
11+
groups:
12+
- name: Harbor
13+
rules:
14+
- alert: HarborCoreIsDown
15+
expr: harbor_up{component="core"} == 0
16+
for: 5m
17+
labels:
18+
severity: high
19+
annotations:
20+
summary: Harbor Core Is Down
21+
22+
- alert: HarborDatabaseIsDown
23+
expr: harbor_up{component="database"} == 0
24+
for: 5m
25+
labels:
26+
severity: high
27+
annotations:
28+
summary: Harbor Database Is Down
29+
30+
- alert: HarborRegistryIsDown
31+
expr: harbor_up{component="registry"} == 0
32+
for: 5m
33+
labels:
34+
severity: high
35+
annotations:
36+
summary: Harbor Registry Is Down
37+
38+
- alert: HarborRedisIsDown
39+
expr: harbor_up{component="redis"} == 0
40+
for: 5m
41+
labels:
42+
severity: high
43+
annotations:
44+
summary: Harbor Redis Is Down
45+
46+
- alert: HarborTrivyIsDown
47+
expr: harbor_up{component="trivy"} == 0
48+
for: 5m
49+
labels:
50+
severity: high
51+
annotations:
52+
summary: Harbor Trivy Is Down
53+
54+
- alert: HarborJobServiceIsDown
55+
expr: harbor_up{component="jobservice"} == 0
56+
for: 5m
57+
labels:
58+
severity: high
59+
annotations:
60+
summary: Harbor JobService Is Down
61+
62+
- alert: ProjectQuotaIsRaisingTheLimit
63+
expr: ((harbor_project_quota_usage_byte > 0) / harbor_quotas_size_bytes) > 0.95
64+
for: 5m
65+
labels:
66+
severity: high
67+
annotations:
68+
summary: Project Quota Is Raising The Limit
69+
70+
- alert: Harborp99latencyishigherthan10seconds
71+
expr: |
72+
histogram_quantile(0.99,
73+
sum
74+
(rate(registry_http_request_duration_seconds_bucket[30m])
75+
)
76+
) > 10
77+
for: 5m
78+
labels:
79+
severity: medium
80+
annotations:
81+
summary: Harbor p99 latency is higher than 10 seconds
82+
83+
- alert: HarborErrorRateisHigh
84+
expr: |
85+
sum(rate(registry_http_requests_total[5m]))/sum(rate(registry_http_requests_total[5m]))
86+
for: 5m
87+
labels:
88+
severity: medium
89+
annotations:
90+
summary: Harbor Error Rate is High

0 commit comments

Comments
 (0)