Skip to content

Commit be8c741

Browse files
Merged from staging
2 parents 24f9258 + 6ee458a commit be8c741

File tree

205 files changed

+46
-78734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+46
-78734
lines changed

apps/kubernetes-control-plane.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ name: "Kubernetes control plane"
55
keywords:
66
- Kubernetes
77
- Available
8-
availableVersions:
9-
- '1.14.0'
10-
- '1.18.0'
8+
availableVersions:
119
- '1.22.0'
1210
shortDescription: Open-source system for automating deployment, scaling, and management of containerized applications.
1311
description: |

future-apps/openshift/INSTALL.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
11
# Gather the metrics from the prometheus deployed by Openshift
22

3-
You can either follow the steps given below or just download the script that includes all the commands and execute:
4-
```sh
5-
sh installation.sh
6-
```
7-
8-
The Prometheus is behind an oauth proxy so you have to create the secret with the token:
9-
10-
1. Get the token:
11-
```sh
12-
export SECRET=`oc get secret -n openshift-monitoring | grep prometheus-k8s-token | head -n 1 | awk '{ print $1 }'`
13-
14-
export TOKEN=`echo $(oc get secret $SECRET -n openshift-monitoring -o json | jq -r '.data.token') | base64 -d`
15-
```
16-
2. Create the secret in `sysdig-agent` namespace:
17-
```sh
18-
oc -n sysdig-agent create secret generic prometheus-k8s-token --from-literal=token=$TOKEN
19-
```
20-
3. Edit the daemonset of sysdig to mount the secret:
21-
```sh
22-
oc -n sysdig-agent patch ds sysdig-agent -p '{"spec":{"template":{"spec":{"volumes":[{"name":"prometheus-k8s-token","secret":{"defaultMode":420,"secretName":"prometheus-k8s-token"}}]}}}}'
23-
24-
oc -n sysdig-agent patch ds sysdig-agent -p '{"spec":{"template":{"spec":{"containers":[{"name":"sysdig-agent","volumeMounts": [{"mountPath": "/opt/draios/kubernetes/prometheus/secrets","name": "prometheus-k8s-token"}]}]}}}}'
25-
```
26-
4. Apply the recording rules:
27-
```sh
28-
oc apply -f rules.yaml
29-
```
30-
5. Apply the sysdig configuration:
31-
```
32-
oc edit cm sysdig-agent
33-
```
3+
Metrics are automatically gathered by Prometheus Cluster Monitoring, you can query them in the Prometheus built-in console.

future-apps/openshift/README-v3.11.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Red Hat® OpenShift® offers a consistent hybrid cloud foundation for building and scaling containerized applications.
33
Benefit from streamlined platform installation and upgrades from one of the enterprise Kubernetes leaders.
44

5-
Openshift provides a prometheus with all targets and metrics but doesn't provide any dashboard with this information.
6-
You can gather the metrics with our agent and show all metrics in our dashboards or even in the grafana dashboards with
7-
the Sysdig datasource as a Prometheus datasource.
8-
95
For more information, see the exporter config tab.
106

117
# Metrics

future-apps/openshift/README-v4.3.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Red Hat® OpenShift® offers a consistent hybrid cloud foundation for building and scaling containerized applications.
33
Benefit from streamlined platform installation and upgrades from one of the enterprise Kubernetes leaders.
44

5-
Openshift provides a prometheus with all targets and metrics but doesn't provide any dashboard with this information.
6-
You can gather the metrics with our agent and show all metrics in our dashboards or even in the grafana dashboards with
7-
the Sysdig datasource as a Prometheus datasource.
8-
95
For more information, see the exporter config tab.
106

117
# Metrics

future-apps/openshift/dashboards-v3.11.yaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,6 @@ version: 1.0.0
55
appVersion:
66
- '3.11'
77
configurations:
8-
- name: Ocp3 / Controller manager
9-
kind: Sysdig
10-
image: openshift/images/controller_manager_sysdig.png
11-
description: |
12-
This dashboard offers information on:
13-
* Controller manager
14-
file: include/dashboard-Sysdig-Ocp3---Controller-manager-3.11.json
15-
- name: Ocp3 / Api
16-
kind: Sysdig
17-
image: openshift/images/api_sysdig.png
18-
description: |
19-
This dashboard offers information on:
20-
* Api Server
21-
file: include/dashboard-Sysdig-Ocp3---Api-3.11.json
22-
- name: Ocp3 / Kubelet
23-
kind: Sysdig
24-
image: openshift/images/kubelet_sysdig.png
25-
description: |
26-
This dashboard offers information on:
27-
* Kubelet
28-
file: include/dashboard-Sysdig-Ocp3---Kubelet-3.11.json
298
- name: Ocp3 / Api
309
kind: Grafana
3110
image: openshift/images/api_grafana.png

future-apps/openshift/dashboards-v4.3.yaml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,6 @@ version: 1.0.0
55
appVersion:
66
- '4.3'
77
configurations:
8-
- name: Ocp4 / Controller manager
9-
kind: Sysdig
10-
image: openshift/images/controller_manager_sysdig.png
11-
description: |
12-
This dashboard offers information on:
13-
* Controller manager
14-
file: include/dashboard-Sysdig-Ocp4---Controller-manager-4.3.json
15-
- name: Ocp4 / Api
16-
kind: Sysdig
17-
image: openshift/images/api_sysdig.png
18-
description: |
19-
This dashboard offers information on:
20-
* Api Server
21-
file: include/dashboard-Sysdig-Ocp4---Api-4.3.json
22-
- name: Ocp4 / Kubelet
23-
kind: Sysdig
24-
image: openshift/images/kubelet_sysdig.png
25-
description: |
26-
This dashboard offers information on:
27-
* Kubelet
28-
file: include/dashboard-Sysdig-Ocp4---Kubelet-4.3.json
29-
- name: Ocp4 / Scheduler
30-
kind: Sysdig
31-
image: openshift/images/scheduler_sysdig.png
32-
description: |
33-
This dashboard offers information on:
34-
* Scheduler
35-
file: include/dashboard-Sysdig-Ocp4---Scheduler-4.3.json
36-
- name: Ocp4 / etcd
37-
kind: Sysdig
38-
image: openshift/images/etcd_sysdig.png
39-
description: |
40-
This dashboard offers information on:
41-
* etcd
42-
file: include/dashboard-Sysdig-Ocp4---etcd-4.3.json
43-
- name: Ocp4 / coreDNS
44-
kind: Sysdig
45-
image: openshift/images/coreDNS_sysdig.png
46-
description: |
47-
This dashboard offers information on:
48-
* CoreDNS
49-
file: include/dashboard-Sysdig-Ocp4---CoreDNS-4.3.json
508
- name: Ocp4 / Api
519
kind: Grafana
5210
image: openshift/images/api_grafana.png

future-apps/openshift/setup-guide-v3.11.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,5 @@ app: Openshift
44
version: 1.0.0
55
appVersion:
66
- '3.11'
7-
configurations:
8-
- name: installation.sh
9-
file: include/installation-v3.11.sh
10-
- name: sysdig-agent.yaml
11-
file: include/sysdig-agent.yaml
12-
- name: rules.yaml
13-
file: include/rules-v3.11.yaml
7+
configurations: []
148
descriptionFile: INSTALL.md

future-apps/openshift/setup-guide-v4.3.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,5 @@ app: Openshift
44
version: 1.0.0
55
appVersion:
66
- '4.3'
7-
configurations:
8-
- name: installation.sh
9-
file: include/installation-v4.3.sh
10-
- name: sysdig-agent.yaml
11-
file: include/sysdig-agent.yaml
12-
- name: rules.yaml
13-
file: include/rules-v4.3.yaml
7+
configurations: []
148
descriptionFile: INSTALL.md

future-apps/rancher/INSTALL.md

Lines changed: 1 addition & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
# Prerequisites
22
## Enable monitoring
33
Rancher can deploy a Prometheus server. To get a default monitoring you have to enable it in the monitoring tab.
4-
## Mount the etcd certificates in the sysdig agent
5-
```sh
6-
kubectl -n sysdig-agent patch ds sysdig-agent -p '{"spec":{"template":{"spec":{"volumes":[{"hostPath":{"path":"/etc/kubernetes/pki/etcd-manager-main","type":"DirectoryOrCreate"},"name":"etcd-certificates"}]}}}}'
74

8-
kubectl -n sysdig-agent patch ds sysdig-agent -p '{"spec":{"template":{"spec":{"containers":[{"name":"sysdig-agent","volumeMounts": [{"mountPath": "/etc/kubernetes/pki/etcd-manager","name": "etcd-certificates"}]}]}}}}'
9-
```
105
# Gather the metrics from the prometheus deployed by Rancher
11-
For the control plane metrics, the services are not created by default. To get them in the Prometheus server you have to create new services and seviceMonitors. To gather that metrics with the Sysdig agent, you have to create the rules to filter them, and then federate the metrics with the agent itself.
12-
13-
You can either follow the steps given below or download the script and execute:
14-
```sh
15-
sh installation.sh
16-
```
17-
And then apply the configuration changes for the `sysdig-agent`.
6+
For the control plane metrics, the services are not created by default. To get them in the Prometheus server you have to create new services and seviceMonitors.
187

198
1. Apply the services:
209
```bash
@@ -24,108 +13,3 @@ kubectl apply -f services.yaml
2413
```bash
2514
kubectl apply -f service-monitor.yaml
2615
```
27-
## Configuring the Sysdig Agent
28-
29-
In order to collect the metrics you have to enable `promscrape_fastproto` to do. Therefore, ensure that your `dragent.yaml` includes the following values:
30-
```yaml
31-
metrics_excess_log: true
32-
k8s_cluster_name: yourClusterName
33-
10s_flush_enable: true
34-
app_checks_enabled: false
35-
use_promscrape: true
36-
new_k8s: true
37-
promscrape_fastproto: true
38-
prometheus:
39-
enabled: true
40-
prom_service_discovery: true
41-
log_errors: true
42-
max_metrics: 200000
43-
max_metrics_per_process: 200000
44-
max_tags_per_metric: 100
45-
ingest_raw: true
46-
ingest_calculated: false
47-
```
48-
49-
See the example `sysdig-agent.yaml` file given below:
50-
51-
With the promscrape v2 enabled you can scrape the etcd. To do so, ensure that your `sysdig-agent.yaml` includes the prometheus job as given below:
52-
```yaml
53-
- job_name: etcd
54-
scheme: https
55-
tls_config:
56-
insecure_skip_verify: true
57-
cert_file: /etc/kubernetes/pki/etcd-manager/etcd-clients-ca.crt
58-
key_file: /etc/kubernetes/pki/etcd-manager/etcd-clients-ca.key
59-
kubernetes_sd_configs:
60-
- role: pod
61-
relabel_configs:
62-
- action: keep
63-
source_labels: [__meta_kubernetes_pod_host_ip]
64-
regex: __HOSTIPS__
65-
- action: keep
66-
source_labels:
67-
- __meta_kubernetes_namespace
68-
- __meta_kubernetes_pod_name
69-
separator: '/'
70-
regex: 'kube-system/etcd-manager-main.+'
71-
- source_labels:
72-
- __address__
73-
action: replace
74-
target_label: __address__
75-
regex: (.+?)(\\:\\d)?
76-
replacement: $1:4001
77-
# Holding on to pod-id and container name so we can associate the metrics
78-
# with the container (and cluster hierarchy)
79-
- action: replace
80-
source_labels: [__meta_kubernetes_pod_uid]
81-
target_label: sysdig_k8s_pod_uid
82-
- action: replace
83-
source_labels: [__meta_kubernetes_pod_container_name]
84-
target_label: sysdig_k8s_pod_container_name
85-
```
86-
Additionally, you will need a job corresponding to the control plane:
87-
```yaml
88-
- job_name: control-plane
89-
honor_labels: true
90-
metrics_path: '/federate'
91-
params:
92-
'match[]':
93-
- '{sysdig="true"}'
94-
kubernetes_sd_configs:
95-
- role: pod
96-
relabel_configs:
97-
- action: keep
98-
source_labels: [__meta_kubernetes_pod_host_ip]
99-
regex: __HOSTIPS__
100-
- action: keep
101-
source_labels:
102-
- __meta_kubernetes_namespace
103-
- __meta_kubernetes_pod_name
104-
separator: '/'
105-
regex: 'cattle-prometheus/prometheus-cluster-monitoring-0'
106-
- source_labels:
107-
- __address__
108-
action: replace
109-
target_label: __address__
110-
regex: (.+?)(\\:\\d)?
111-
replacement: $1
112-
# Holding on to pod-id and container name so we can associate the metrics
113-
# with the container (and cluster hierarchy)
114-
- action: replace
115-
source_labels: [__meta_kubernetes_pod_uid]
116-
target_label: sysdig_k8s_pod_uid
117-
- action: replace
118-
source_labels: [__meta_kubernetes_pod_container_name]
119-
target_label: sysdig_k8s_pod_container_name
120-
```
121-
122-
See the examples below.
123-
124-
3. Apply the rules:
125-
```
126-
kubectl apply -f rules.yaml
127-
```
128-
4. Apply the sysdig configuration:
129-
```
130-
kubectl apply -f sysdig-agent.yaml
131-
```

future-apps/rancher/dashboards.yaml

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,6 @@ version: 1.0.0
55
appVersion:
66
- '2.5.0'
77
configurations:
8-
- name: Rancher / Api
9-
kind: Sysdig
10-
image: rancher/images/api_sysdig.png
11-
description: |
12-
This dashboard offers information on:
13-
* Api Server
14-
file: include/dashboard-Sysdig-Rancher---Api.json
15-
- name: Rancher / Controller manager
16-
kind: Sysdig
17-
image: rancher/images/controller_manager_sysdig.png
18-
description: |
19-
This dashboard offers information on:
20-
* Controller manager
21-
file: include/dashboard-Sysdig-Rancher---Controller_Manager.json
22-
- name: Rancher / Kubelet
23-
kind: Sysdig
24-
image: rancher/images/kubelet_sysdig.png
25-
description: |
26-
This dashboard offers information on:
27-
* Kubelet
28-
file: include/dashboard-Sysdig-Rancher---Kubelet.json
29-
- name: Rancher / Scheduler
30-
kind: Sysdig
31-
image: rancher/images/scheduler_sysdig.png
32-
description: |
33-
This dashboard offers information on:
34-
* Scheduler
35-
file: include/dashboard-Sysdig-Rancher---Scheduler.json
36-
- name: Rancher / Proxy
37-
kind: Sysdig
38-
image: rancher/images/proxy_sysdig.png
39-
description: |
40-
This dashboard offers information on:
41-
* Proxy server
42-
file: include/dashboard-Sysdig-Rancher---Proxy.json
43-
- name: Rancher / CoreDNS
44-
kind: Sysdig
45-
image: rancher/images/coredns_sysdig.png
46-
description: |
47-
This dashboard offers information on:
48-
* CoreDns
49-
file: include/dashboard-Sysdig-Rancher---CoreDNS.json
50-
- name: Rancher / etcd
51-
kind: Sysdig
52-
image: rancher/images/etcd_sysdig.png
53-
description: |
54-
This dashboard offers information on:
55-
* Etcd
56-
file: include/dashboard-Sysdig-Rancher---etcd.json
578
- name: Rancher / Api
589
kind: Grafana
5910
image: rancher/images/api_grafana.png

0 commit comments

Comments
 (0)