How can we monitor openshift Cluster Nodes in checkmk?. Does checkmk support openshift products?

How can we monitor openshift Cluster Nodes in checkmk?. Does checkmk support openshift products?.

Direct OpenShift support is in development or testing at the moment.
You can ask @martin.hirschvogel about the status.

You can already monitor OpenShift at the moment. It has some limitations though which we are currently fixing. I will write a KB article on that and share that shortly.

The cluster collectors are currently not supported in OpenShift due to missing scc’s.
You can however still get a good status monitoring of your cluster, e.g. Pod status, Deployment replicas.
To get there, you need to adapt section 3 of the official how-to guide in our documentation as you only have to set-up a ServiceAccount with respective roles in OpenShift.

Setting up the RBAC to access the API.

  1. oc create namespace checkmk-monitoring
  2. oc apply -f https://raw.githubusercontent.com/tribe29/checkmk_kube_agent/main/deploy/kubernetes/checkmk-serviceaccount.yaml
  3. export TOKEN=$(oc get secret $(oc get serviceaccount checkmk -o=jsonpath=‘{.secrets[0].name}’ -n checkmk-monitoring) -n checkmk-monitoring -o=jsonpath=‘{.data.token}’ | base64 --decode);
  4. export CA_CRT=“$(oc get secret $(oc get serviceaccount checkmk -o=jsonpath=‘{.secrets[0].name}’ -n checkmk-monitoring) -n checkmk-monitoring -o=jsonpath=‘{.data.ca.crt}’ | base64 --decode)”;

After that, follow the steps in section 4 with the following exceptions.

4.1 You don’t have to retrieve the password again as you stored the password (token) before in $TOKEN.
4.2 You don’t have to retrieve the certificate again as you stored the password (token) before in $CA_CRT. Use echo "$CA_CRT" to retrieve it to preserve proper line breaks.
4.5 Do not configure the option “Enrich with usage data from Checkmk Cluster Collector”.

The KB article will be released soon.

EDIT: Unfortunately there are two secrets belonging to that serviceaccount. Typically the relevant one is the first one, which typically looks like checkmk-token-xyz12. You might have to change thus the number in .secrets[0] to .secrets[1]. I thus updated the export commands accordingly.

2 Likes

https://kb.checkmk.com/display/KB/Monitoring+OpenShift+with+Checkmk

EDIT: Fixed a copy&paste thingy in the KB article

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.