Collecting OpenShift Cluster, Master, Node, and Project information .
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 3
Issue
- Support has asked for a sosreport for an OpenShift Master / Node, to begin investigating an issue, however what other cluster information should we be collecting?
- What addition data can I gather on an OpenShift Cluster, Master, Node, or specific Project.
Resolution
For OpenShift 4, refer to gathering data about your cluster and How to provide an sosreport from a RHEL CoreOS OpenShift 4 node.
OpenShift 3
- OpenShift Cluster
- OpenShift Master
- OpenShift Node (i.e. worker or infra)
- OpenShift Project
OpenShift Cluster
When gathering cluster information in addition to a sosreport from at least one Master.
# oc get node,hostsubnet -o wide
# oc describe nodes
# oc get all,events -o wide -n default
OpenShift Master
Gather a sosreport and metrics from the Master.
# sosreport
# oc get --raw /metrics --server https://`hostname` --config=/etc/origin/master/admin.kubeconfig
# oc get --raw /metrics --server https://`hostname`:8444 --config=/etc/origin/master/admin.kubeconfig
# ovs-ofctl -O OpenFlow13 dump-flows br0
OpenShift Node
Gather a sosreport and the SDN flows on the Node.
# sosreport
# ovs-ofctl -O OpenFlow13 dump-flows br0
Gather Metrics from a Node, run the following on a Master host.
# NODE_NAME=<NODE_HOSTNAME>
# oc get --raw /metrics --server https://$NODE_NAME:10250 --config=/etc/origin/master/admin.kubeconfig
# oc get --raw /metrics/cadvisor --server https://$NODE_NAME:10250 --config=/etc/origin/master/admin.kubeconfig
# oc describe node $NODE_NAME
OpenShift Project
Often Support will ask for project based information to see what is going on with in a project or (across all projects/namespaces).
This data can be gathered from the output of these commands (run commands from a cluster-admin account like system:admin, this is usually the default when you run oc as root from a master):
# oc get all,events -o wide -n <project>
# oc get all,events -o yaml -n <project>
Logs from any applications may also be needed.
- Logs from current pod:
# oc logs <POD_NAME> - Logs from previous instance of the container in a pod if it exists:
# oc logs -p <POD_NAME>
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.