|
| 1 | +# Prerequisites |
| 2 | + |
| 3 | +### Openshift 3.11 |
| 4 | + |
| 5 | +Once the Sysdig agent is deployed, check if it is running on all nodes (compute, master, and infra): |
| 6 | + |
| 7 | +``` |
| 8 | +oc get nodes |
| 9 | +oc get pods -n sysdig-agent -o wide |
| 10 | +``` |
| 11 | + |
| 12 | +Apply this patch in case the Agent is not running on infra/master. |
| 13 | + |
| 14 | +``` |
| 15 | +oc patch namespace sysdig-agent --patch-file='sysdig-agent-namespace-patch.yaml' |
| 16 | +``` |
| 17 | + |
| 18 | +sysdig-agent-namespace-patch.yaml file |
| 19 | +```yaml |
| 20 | +apiVersion: v1 |
| 21 | +kind: Namespace |
| 22 | +metadata: |
| 23 | + annotations: |
| 24 | + openshift.io/node-selector: "" |
| 25 | +``` |
| 26 | +
|
| 27 | +OpenShift integrates security by default. Therefore, if you want Sysdig agent to scrape HAProxy router metrics, provide it with the necessary permissions. To do so: |
| 28 | +
|
| 29 | +``` |
| 30 | +oc apply -f router-clusterrolebinding-sysdig-agent-oc3.yaml |
| 31 | +``` |
| 32 | + |
| 33 | +router-clusterrolebinding-sysdig-agent-oc3.yaml file |
| 34 | +```yaml |
| 35 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 36 | +kind: ClusterRole |
| 37 | +metadata: |
| 38 | + name: haproxy-route-monitoring |
| 39 | +rules: |
| 40 | +- apiGroups: |
| 41 | + - route.openshift.io |
| 42 | + resources: |
| 43 | + - routers/metrics |
| 44 | + verbs: |
| 45 | + - get |
| 46 | +--- |
| 47 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 48 | +kind: ClusterRoleBinding |
| 49 | +metadata: |
| 50 | + labels: |
| 51 | + app: sysdig-agent |
| 52 | + name: sysdig-router-monitoring |
| 53 | +roleRef: |
| 54 | + apiGroup: rbac.authorization.k8s.io |
| 55 | + kind: ClusterRole |
| 56 | + name: haproxy-route-monitoring |
| 57 | +subjects: |
| 58 | +- kind: ServiceAccount |
| 59 | + name: sysdig-agent |
| 60 | + namespace: sysdig-agent # Remember to change to the namespace where you have the Sysdig agents deployed |
| 61 | +``` |
| 62 | +
|
| 63 | +### Openshift 4.X |
| 64 | +
|
| 65 | +OpenShift integrates security by default. Therefore, if you want Sysdig agent to scrape HAProxy router metrics, provide it with the necessary permissions. To do so: |
| 66 | +
|
| 67 | +``` |
| 68 | +oc apply -f router-clusterrolebinding-sysdig-agent-oc4.yaml |
| 69 | +``` |
| 70 | + |
| 71 | +router-clusterrolebinding-sysdig-agent-oc4.yaml file |
| 72 | +```yaml |
| 73 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 74 | +kind: ClusterRoleBinding |
| 75 | +metadata: |
| 76 | + name: router-monitoring-sysdig-agent |
| 77 | +roleRef: |
| 78 | + apiGroup: rbac.authorization.k8s.io |
| 79 | + kind: ClusterRole |
| 80 | + name: router-monitoring |
| 81 | +subjects: |
| 82 | +- kind: ServiceAccount |
| 83 | + name: sysdig-agent |
| 84 | + namespace: sysdig-agent # Remember to change to the namespace where you have the Sysdig agents deployed |
| 85 | +``` |
1 | 86 | # Installation |
2 | 87 |
|
3 | 88 | The application is ready to be scraped |
0 commit comments