Skip to content

Commit ae1e904

Browse files
Merge pull request #185 from sysdiglabs/harbor
Update harbor
2 parents 9855cc0 + 3816382 commit ae1e904

20 files changed

+2005
-8
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.
File renamed without changes.

resources/harbor/ALERTS-v2.2.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
26+
## ProjectQuotaIsRaisingTheLimit
27+
This alerts trigger when the usage of the storage of any project is getting close to the limit
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

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/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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ appVersion:
77
configurations:
88
- name: Harbor
99
kind: Grafana
10-
image: harbor/images/harbor_grafana.png
10+
image: harbor/images/harbor_grafana-v1.1.png
1111
description: |
1212
This dashboard offers information on:
1313
* Harbor Storage
1414
* Harbor Projects
1515
* Harbor Tasks
16-
file: include/dashboard-Grafana-Harbor-1.1.json
16+
file: include/dashboard-Grafana-Harbor-v1.1.json
1717
- name: Harbor
1818
kind: Sysdig
19-
image: harbor/images/harbor_sysdig.png
19+
image: harbor/images/harbor_sysdig-v1.1.png
2020
description: |
2121
This dashboard offers information on:
2222
* Harbor Storage
2323
* Harbor Projects
2424
* Harbor Tasks
25-
file: include/dashboard-Sysdig-Harbor-1.1.json
25+
file: include/dashboard-Sysdig-Harbor-v1.1.json
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: v1
2+
kind: Dashboard
3+
app: Harbor
4+
version: 1.0.0
5+
appVersion:
6+
- '2.2'
7+
configurations:
8+
- name: Harbor
9+
kind: Grafana
10+
image: harbor/images/harbor_grafana-v1.1.png
11+
description: |
12+
This dashboard offers information on:
13+
* Harbor Storage
14+
* Harbor Projects
15+
* Harbor Tasks
16+
file: include/dashboard-Grafana-Harbor-v1.1.json
17+
- name: Harbor
18+
kind: Sysdig
19+
image: harbor/images/harbor_sysdig-v2.2.png
20+
description: |
21+
This dashboard offers information on:
22+
* Harbor Storage
23+
* Harbor Projects
24+
* Harbor Tasks
25+
* Harbor Registry
26+
file: include/dashboard-Sysdig-Harbor-v2.2.json

0 commit comments

Comments
 (0)