Skip to content

Commit 56d0c00

Browse files
Merge pull request #223 from sysdiglabs/staging
Staging Y22W23
2 parents 217882e + 91348f3 commit 56d0c00

26 files changed

+4420
-69
lines changed

apps/haproxy.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
- '2.1'
10+
- '2.3'
1011
shortDescription: "HAProxy is a free, open source load balancer"
1112
description: |
1213
HAProxy is free, open source software that provides a high availability load balancer and proxy server for TCP and HTTP-based applications that spreads requests across multiple servers.

apps/images/PHP-FPM.svg

Lines changed: 5 additions & 0 deletions
Loading

apps/php-fpm.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: v1
3+
kind: App
4+
name: "php-fpm"
5+
keywords:
6+
- PHP
7+
- Available
8+
availableVersions:
9+
- '7.2'
10+
shortDescription: "PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites."
11+
description: |
12+
PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.
13+
icon: https://raw.githubusercontent.com/sysdiglabs/promcat-resources/master/apps/images/PHP-FPM.svg
14+
website: https://www.php.net/manual/en/book.fpm.php
15+
available: true

resources/cassandra/INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
spec:
1212
containers:
1313
- name: cassandra-exporter
14-
image: gcr.io/mateo-burillo-ns/promcat-cassandra-exporter:latest
14+
image: quay.io/sysdig/promcat-cassandra-exporter:v0.9.10
1515
imagePullPolicy: Always
1616
volumeMounts:
1717
- mountPath: /var/lib/cassandra

resources/cassandra/include/patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
spec:
88
containers:
99
- name: cassandra-exporter
10-
image: gcr.io/mateo-burillo-ns/promcat-cassandra-exporter:latest
10+
image: quay.io/sysdig/promcat-cassandra-exporter:v0.9.10
1111
imagePullPolicy: Always
1212
volumeMounts:
1313
- mountPath: /var/lib/cassandra
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
# Alerts
2-
## UpTimeLessThan1Hour
3-
This alert detects when all of the instances of the ingress controller have an uptime of less tha 1 hour.
2+
## [Haproxy-Ingress] Uptime less than 1 hour
3+
This alert detects when all of the instances of the ingress controller have an uptime of less than 1 hour.
44

5-
## FrontendDown
5+
## [Haproxy-Ingress] Frontend Down
66
This alert detects when a frontend has all of its instances down for more than 10 minutes.
77

8-
## BackendDown
8+
## [Haproxy-Ingress] Backend Down
99
This alert detects when a backend has all of its instances down for more than 10 minutes.
1010

11-
## HighSessionsUsage
11+
## [Haproxy-Ingress] High Sessions Usage
1212
This alert triggers when the backend sessions overpass the 85% of the sessions capacity for 10 minutes.
1313

14-
## HigErrorRate
15-
This alert triggers when the is an error rate over 15% for over 10 minutes in a proxy.
14+
## [Haproxy-Ingress] High Error Rate
15+
This alert triggers when there is an error rate over 15% for over 10 minutes in a proxy.
1616

17-
## HighRequestDeniedRate and HighResponseDeniedRate
18-
These alerts detect when there is a denied rate of requests or responses over 10% for over 10 minutes in a proxy.
17+
## [Haproxy-Ingress] High Request Denied Rate
18+
These alerts detect when there is a denied rate of requests over 10% for over 10 minutes in a proxy.
1919

20-
## HighResponseTime
20+
## [Haproxy-Ingress] High Response Denied Rate
21+
These alerts detect when there is a denied rate of responses over 10% for over 10 minutes in a proxy.
22+
23+
## [Haproxy-Ingress] High Response Rate
2124
This alert triggers when a proxy has a mean response time higher than 250ms for over 10 minutes.
25+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Adding HAProxy Ingress
2+
To install the HAProxy, you can use the [official Helm chart](https://github.com/haproxytech/helm-charts):
3+
```sh
4+
helm repo add haproxytech https://haproxytech.github.io/helm-charts
5+
helm repo update
6+
```
7+
8+
# Install k8s HAProxy ingress controller and configuring Prometheus metrics
9+
This command will install haproxy-ingress helm chart with prometheus metrics and haproxy stats enabled
10+
```
11+
helm install haproxy-ingress haproxy-ingress/haproxy-ingress \
12+
--set-string "controller.stats.enabled = true" \
13+
--set-string "controller.metrics.enabled = true"
14+
```
15+
16+
Metrics will be exposed via 9101 port and /metrics path
17+
18+
# Pod and metrics check
19+
20+
To get the pods of the ingress:
21+
```
22+
kubectl get pods -l app.kubernetes.io/instance=haproxy-ingress -n haproxy-ingress
23+
```
24+
Port forward 9101 to your localhost
25+
26+
```
27+
kubectl port-forward -n haproxy-ingress pod-name 9101:9101
28+
```
29+
To count the metrics of a pod:
30+
```
31+
curl 'http://localhost:9101/metrics' | grep -v "# HELP\|# TYPE" | wc -l
32+
```

resources/haproxy-ingress/alerts.yaml

Lines changed: 66 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,75 @@ app: HAProxy Ingress
44
version: 1.0.0
55
appVersion:
66
- '2.1'
7+
- '2.3'
78
descriptionFile: ALERTS.md
89
configurations:
910
- kind: Prometheus
1011
data: |
1112
groups:
12-
- name: HAProxy-Ingress
13+
- name: Haproxy-Ingress
1314
rules:
14-
- alert: UpTimeLessThan1Hour
15-
expr: max(time() - haproxy_process_start_time_seconds) < 3600
16-
for: 10m
17-
labels:
18-
severity: page
19-
annotations:
20-
summary: Up Time of less than 1 hour
21-
- alert: FrontendDown
22-
expr: count by (proxy) (haproxy_frontend_status == 1) == 0
23-
for: 10m
24-
labels:
25-
severity: page
26-
annotations:
27-
summary: Frontend down {{$labels.proxy}}
28-
- alert: BackendDown
29-
expr: sum by (proxy) (haproxy_backend_status==1) == 0
30-
for: 10m
31-
labels:
32-
severity: page
33-
annotations:
34-
summary: No backend instances found for the proxy {{$labels.proxy}}
35-
- alert: HighSessionsUsage
36-
expr: max by (proxy)(rate(haproxy_backend_sessions_total[5m]) / haproxy_backend_limit_sessions) >0.85
37-
for: 10m
38-
labels:
39-
severity: page
40-
annotations:
41-
summary: Low number of sessions available in proxy {{$labels.proxy}}
42-
- alert: HigErrorRate
43-
expr: sum by (proxy)(rate(haproxy_backend_http_responses_total{code!="2xx"}[5m])) / sum by (proxy)(rate(haproxy_backend_http_responses_total[5m])) > 0.15
44-
for: 10m
45-
labels:
46-
severity: page
47-
annotations:
48-
summary: High HTTP error rate in proxy {{$labels.proxy}}
49-
- alert: HighRequestDeniedRate
50-
expr: sum by (proxy) (rate(haproxy_backend_requests_denied_total[5m])) / sum by (proxy)(rate(haproxy_backend_http_requests_total[5m])) > 0.15
51-
for: 10m
52-
labels:
53-
severity: page
54-
annotations:
55-
summary: High request denied error rate in proxy {{$labels.proxy}}
56-
- alert: HighResponseDeniedRate
57-
expr: sum by (proxy) (rate(haproxy_backend_responses_denied_total[5m])) / sum by (proxy)(rate(haproxy_backend_http_responses_total[5m])) > 0.15
58-
for: 10m
59-
labels:
60-
severity: page
61-
annotations:
62-
summary: High responses denied rate in proxy {{$labels.proxy}}
63-
- alert: HighResponseTime
64-
expr: max by (proxy) (haproxy_backend_response_time_average_seconds)> 0.25
65-
for: 10m
66-
labels:
67-
severity: page
68-
annotations:
69-
summary: High response time in proxy {{$labels.proxy}}
15+
- alert: '[Haproxy-Ingress] Uptime less than 1 hour'
16+
expr: |
17+
max(time() - haproxy_process_start_time_seconds) < 3600
18+
for: 10m
19+
labels:
20+
severity: critical
21+
annotations:
22+
description: This alert detects when all of the instances of the ingress controller have an uptime of less than 1 hour.
23+
- alert: '[Haproxy-Ingress] Frontend Down'
24+
expr: |
25+
count by (proxy) (haproxy_frontend_status == 1) == 0
26+
for: 10m
27+
labels:
28+
severity: critical
29+
annotations:
30+
description: This alert detects when a frontend has all of its instances down for more than 10 minutes.
31+
- alert: '[Haproxy-Ingress] Backend Down'
32+
expr: |
33+
sum by (proxy) (haproxy_backend_status == 1) == 0
34+
for: 10m
35+
labels:
36+
severity: critical
37+
annotations:
38+
description: This alert detects when a backend has all of its instances down for more than 10 minutes.
39+
- alert: '[Haproxy-Ingress] High Sessions Usage'
40+
expr: |
41+
max by (proxy)(rate(haproxy_backend_sessions_total[5m]) / haproxy_backend_limit_sessions) >0.85
42+
for: 10m
43+
labels:
44+
severity: critical
45+
annotations:
46+
description: This alert triggers when the backend sessions overpass the 85% of the sessions capacity for 10 minutes.
47+
- alert: '[Haproxy-Ingress] High Error Rate'
48+
expr: |
49+
sum by (proxy)(rate(haproxy_backend_http_responses_total{code!="2xx"}[5m])) / sum by (proxy)(rate(haproxy_backend_http_responses_total[5m])) > 0.15
50+
for: 10m
51+
labels:
52+
severity: critical
53+
annotations:
54+
description: This alert triggers when there is an error rate over 15% for over 10 minutes in a proxy.
55+
- alert: '[Haproxy-Ingress] High Request Denied Rate'
56+
expr: |
57+
sum by (proxy) (rate(haproxy_backend_requests_denied_total[5m])) / sum by (proxy)(rate(haproxy_backend_http_requests_total[5m])) > 0.15
58+
for: 10m
59+
labels:
60+
severity: critical
61+
annotations:
62+
description: These alerts detect when there is a denied rate of requests over 10% for over 10 minutes in a proxy.
63+
- alert: '[Haproxy-Ingress] High Response Denied Rate'
64+
expr: |
65+
sum by (proxy) (rate(haproxy_backend_responses_denied_total[5m])) / sum by (proxy)(rate(haproxy_backend_http_responses_total[5m])) > 0.15
66+
for: 10m
67+
labels:
68+
severity: critical
69+
annotations:
70+
description: These alerts detect when there is a denied rate of responses over 10% for over 10 minutes in a proxy.
71+
- alert: '[Haproxy-Ingress] High Response Rate'
72+
expr: |
73+
max by (proxy) (haproxy_backend_response_time_average_seconds)> 0.25
74+
for: 10m
75+
labels:
76+
severity: critical
77+
annotations:
78+
description: This alert triggers when a proxy has a mean response time higher than 250ms for over 10 minutes.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
apiVersion: v1
2+
kind: Dashboard
3+
app: HAProxy Ingress
4+
version: 1.0.0
5+
appVersion:
6+
- '2.3'
7+
configurations:
8+
- name: HAProxy K8s Ingress Overview
9+
kind: Sysdig
10+
image: haproxy-ingress/images/haproxy-sysdig-ingress-overview-2.3.png
11+
description: |
12+
This dashboard offers information on:
13+
* Up Time
14+
* Instances
15+
* Frontend OK
16+
* Frontend FULL
17+
* Frontend STOPPED
18+
* Backend DOWN
19+
* Connections and Sessions
20+
* SSL Connections
21+
* Active Jobs
22+
* Request and Response Errors
23+
* Tasks
24+
* Active and Connected Peers
25+
* Process Run Queue
26+
* Connection ans Session Denied
27+
* Frontend Bytes In
28+
* Frontend Connections
29+
* Frontend Bytes Out
30+
* Frontend Requests (TCP and HTTP)
31+
file: include/dashboard-Sysdig-HAProxy-K8s-Ingress-Overview-2.3.json
32+
- name: HAProxy Proxy Golden Signals
33+
kind: Sysdig
34+
image: haproxy-ingress/images/haproxy-sysdig-proxy-golden-signals-2.3.png
35+
description: |
36+
This dashboard has the option to select a proxy and offers information on:
37+
* Instances UP
38+
* Instances Down
39+
* Sessions Usage
40+
* Queued Requests
41+
* HTTP Error Rate
42+
* Denial Rate
43+
* HTTP Error by Code
44+
* Data Transfers Aborted
45+
* Mean Response Time
46+
* Mean Connect and Queue Time
47+
* Throughput
48+
* IOPS
49+
* Request and Response Size
50+
file: include/dashboard-Sysdig-HAProxy-Proxy-Golden-Signals-2.3.json

resources/haproxy-ingress/description.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ app: HAProxy Ingress
44
version: 1.0.0
55
appVersion:
66
- '2.1'
7+
- '2.3'
78
descriptionFile: README.md

0 commit comments

Comments
 (0)