Skip to content

Commit ddcd07c

Browse files
DloritedaviddetorresDavid de TorresDavid Lorite
authored
Deploy to master (#130)
* Updated postgres Sysdig Dashboards * Added SSL auth to PostgreSQL * Nginx ingress (#128) * Add nginx ingress controller * Add alerts and scope to the dashboards Co-authored-by: David Lorite <[email protected]> * Nginx ingress (#129) * Add nginx ingress controller * Add alerts and scope to the dashboards * Fix version Co-authored-by: David Lorite <[email protected]> * Update alerts Update alerts with the same changes as the master branch * Add url for the image nginx controller Co-authored-by: David de Torres <[email protected]> Co-authored-by: David de Torres <[email protected]> Co-authored-by: David Lorite <[email protected]>
1 parent 7e57bb7 commit ddcd07c

17 files changed

+3124
-0
lines changed

apps/images/nginx-ingress.png

4.41 KB
Loading

apps/nginx-ingress.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: "Nginx-Ingress"
5+
keywords:
6+
- Kubernetes
7+
- Available
8+
availableVersions:
9+
- '2.7.0'
10+
shortDescription: "The open source web server that powers 400 million websites."
11+
description: |
12+
NGINX Ingress Controller is a best-in-class traffic management solution for cloud‑native apps in Kubernetes and containerized environments.
13+
icon: https://raw.githubusercontent.com/sysdiglabs/promcat-resources/master/apps/images/nginx-ingress.png
14+
website: https://www.nginx.com/products/nginx-ingress-controller/
15+
available: true

resources/nginx-ingress/ALERTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Alerts
2+
## NginxHighHttp4xxErrorRate
3+
Nginx high HTTP 4xx error rate (instance {{ $labels.instance }})
4+
5+
## NginxHighHttp5xxErrorRate
6+
Nginx high HTTP 5xx error rate (instance {{ $labels.instance }})
7+
8+
## NginxLatencyHigh
9+
Nginx latency high (instance {{ $labels.instance }})
10+

resources/nginx-ingress/INSTALL.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Installing the exporter
2+
Nginx ingress controller is already instrumented so you don't have to add any extra exporter, the only thing you have to take care is make sure your nginx ingress controller is already exposing these metrics.
3+
For exmaple if you are deploying your nginx ingress controller with helm you have to make sure you have these values.
4+
5+
```yaml
6+
controller:
7+
metrics:
8+
port: 10254
9+
# if this port is changed, change healthz-port: in extraArgs: accordingly
10+
enabled: true
11+
podAnnotations:
12+
prometheus.io/scrape: "true"
13+
prometheus.io/port: "10254"
14+
```
15+
16+
# Sysdig Agent configuration
17+
For the Sysdig Agent to discover and scrape it automatically, enable the promscrape option in the agent configuration. You will get an example of the sysdig agent in the section below
18+
19+
```yaml
20+
dragent.yaml: |-
21+
use_promscrape: true
22+
prometheus:
23+
enabled: true
24+
prom_service_discovery: true
25+
```

resources/nginx-ingress/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Nginx Ingress Controller
2+
NGINX Ingress Controller is a best-in-class traffic management solution for cloud‑native apps in Kubernetes and containerized environments.
3+
4+
# Metrics
5+
Nginx offers the following metrics:
6+
- nginx_ingress_controller_requests
7+
- nginx_ingress_controller_nginx_process_connections
8+
- nginx_ingress_controller_request_size_sum
9+
- nginx_ingress_controller_response_size_sum
10+
- nginx_ingress_controller_nginx_process_resident_memory_bytes
11+
- nginx_ingress_controller_nginx_process_cpu_seconds_total
12+
- nginx_ingress_controller_ssl_expire_time_seconds
13+
14+
For further information, consult the [official Nginx web](https://www.nginx.com/products/nginx-ingress-controller/).
15+
16+
# Attributions
17+
Configuration files and dashboards maintained by [Sysdig team](https://sysdig.com/).
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
apiVersion: v1
2+
kind: Alert
3+
app: "Nginx-Ingress"
4+
version: 1.0.0
5+
appVersion:
6+
- '2.7.0'
7+
configurations:
8+
- kind: Prometheus
9+
data: |
10+
- alert: NginxHighHttp4xxErrorRate
11+
expr: sum(rate(nginx_ingress_controller_requests{status=~"4.."}[1m])) / sum(rate(nginx_ingress_controller_requests[1m])) * 100 > 5
12+
for: 5m
13+
labels:
14+
severity: critical
15+
annotations:
16+
summary: Nginx high HTTP 4xx error rate (instance {{ $labels.instance }})
17+
description: Too many HTTP requests with status 4xx (> 5%)
18+
- alert: NginxHighHttp5xxErrorRate
19+
expr: sum(rate(nginx_ingress_controller_requests{status=~"^5.."}[1m])) / sum(rate(nginx_ingress_controller_requests[1m])) * 100 > 5
20+
for: 5m
21+
labels:
22+
severity: critical
23+
annotations:
24+
summary: Nginx high HTTP 5xx error rate (instance {{ $labels.instance }})
25+
description: Too many HTTP requests with status 5xx (> 5%)
26+
- alert: NginxLatencyHigh
27+
expr: histogram_quantile(0.99, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket[30m])) by (host, node)) > 10
28+
for: 5m
29+
labels:
30+
severity: warning
31+
annotations:
32+
summary: Nginx latency high (instance {{ $labels.instance }})
33+
description: Nginx p99 latency is higher than 10 seconds
34+
- kind: Sysdig
35+
data: |-
36+
{
37+
"alert": {
38+
"condition": "sum(rate(nginx_ingress_controller_requests{status=~\"4..\"}[1m])) / sum(rate(nginx_ingress_controller_requests[1m])) * 100 > 5",
39+
"customNotification": {
40+
"titleTemplate": "{{__alert_name__}} is {{__alert_status__}}",
41+
"useNewTemplate": false
42+
},
43+
"enabled": true,
44+
"name": "NginxHighHttp4xxErrorRate",
45+
"rateOfChange": false,
46+
"reNotify": false,
47+
"reNotifyMinutes": 5,
48+
"severity": 4,
49+
"severityLabel": "LOW",
50+
"severityLevel": null,
51+
"timespan": 600000000,
52+
"type": "PROMETHEUS"
53+
}
54+
}
55+
- kind: Sysdig
56+
data: |-
57+
{
58+
"alert": {
59+
"condition": "sum(rate(nginx_ingress_controller_requests{status=~\"^5..\"}[1m])) / sum(rate(nginx_ingress_controller_requests[1m])) * 100 > 5",
60+
"customNotification": {
61+
"titleTemplate": "{{__alert_name__}} is {{__alert_status__}}",
62+
"useNewTemplate": false
63+
},
64+
"enabled": true,
65+
"name": "NginxHighHttp5xxErrorRate",
66+
"rateOfChange": false,
67+
"reNotify": false,
68+
"reNotifyMinutes": 5,
69+
"severity": 4,
70+
"severityLabel": "LOW",
71+
"severityLevel": null,
72+
"timespan": 600000000,
73+
"type": "PROMETHEUS"
74+
}
75+
}
76+
- kind: Sysdig
77+
data: |-
78+
{
79+
"alert": {
80+
"condition": "histogram_quantile(0.99, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket[30m])) by (host, node)) > 10",
81+
"customNotification": {
82+
"titleTemplate": "{{__alert_name__}} is {{__alert_status__}}",
83+
"useNewTemplate": false
84+
},
85+
"enabled": true,
86+
"name": "NginxLatencyHigh",
87+
"rateOfChange": false,
88+
"reNotify": false,
89+
"reNotifyMinutes": 5,
90+
"severity": 4,
91+
"severityLabel": "LOW",
92+
"severityLevel": null,
93+
"timespan": 600000000,
94+
"type": "PROMETHEUS"
95+
}
96+
}
97+
descriptionFile: ALERTS.md
98+
description: |
99+
# Alerts
100+
## NoIntancesUp
101+
This alert detects when there is no instances with a certain label 'app' for more than 10 minutes.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: v1
2+
kind: Dashboard
3+
app: "Nginx-Ingress"
4+
version: 1.0.0
5+
appVersion:
6+
- '2.7.0'
7+
configurations:
8+
- name: Nginx App Overview
9+
kind: Sysdig
10+
image: nginx-ingress/images/nginx-sysdig-ingress-overview.png
11+
description: |
12+
This dashboard offers information on:
13+
- requests
14+
- nginx_process_connections
15+
- request_size_sum
16+
- response_size_sum
17+
- nginx_process_resident_memory_bytes
18+
- nginx_process_cpu_seconds_total
19+
- ssl_expire_time_seconds
20+
file: include/dashboard-Sysdig-Nginx-Ingress-Controller.json
21+
- name: Nginx App Overview
22+
kind: Grafana
23+
image: nginx-ingress/images/nginx-grafana-ingress-overview.png
24+
description: |
25+
This dashboard offers information on:
26+
- requests
27+
- nginx_process_connections
28+
- request_size_sum
29+
- response_size_sum
30+
- nginx_process_resident_memory_bytes
31+
- nginx_process_cpu_seconds_total
32+
- ssl_expire_time_seconds
33+
file: include/dashboard-Grafana-Nginx-Ingress-Controller.json
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: Description
3+
app: "Nginx-Ingress"
4+
version: 1.0.0
5+
appVersion:
6+
- '2.7.0'
7+
descriptionFile: README.md
741 KB
Loading
684 KB
Loading

0 commit comments

Comments
 (0)