Fix collect_info script
Fix missing journal ctl utc key. Rework kube* logs collection. Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
70f8780e38
commit
cc1d26f939
1 changed files with 20 additions and 29 deletions
|
@ -22,40 +22,40 @@
|
|||
- name: k8s_info
|
||||
cmd: kubectl get all --all-namespaces -o wide
|
||||
- name: errors_info
|
||||
cmd: journalctl -p err --utc --no-pager
|
||||
cmd: journalctl -p err --no-pager
|
||||
- name: etcd_info
|
||||
cmd: etcdctl --debug cluster-health
|
||||
- name: weave_info
|
||||
cmd: weave report | jq "."
|
||||
- name: weave_logs
|
||||
cmd: docker logs weave > weave.log
|
||||
cmd: docker logs weave
|
||||
- name: kubedns_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=kubedns -o name`;
|
||||
do kubectl logs $i --namespace kube-system kubedns > kubedns.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=kubedns -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system kubedns; done"
|
||||
- name: apiserver_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-apiserver -o name`;
|
||||
do kubectl logs $i --namespace kube-system > kube-apiserver.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-apiserver -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system; done"
|
||||
- name: controller_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-controller -o name`;
|
||||
do kubectl logs $i --namespace kube-system > kube-controller.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-controller -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system; done"
|
||||
- name: scheduler_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-scheduler -o name`;
|
||||
do kubectl logs $i --namespace kube-system > kube-scheduler.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-scheduler -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system; done"
|
||||
- name: proxy_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-proxy -o name`;
|
||||
do kubectl logs $i --namespace kube-system > kube-proxy.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-proxy -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system; done"
|
||||
- name: nginx_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-nginx -o name`;
|
||||
do kubectl logs $i --namespace kube-system > kube-nginx.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=kube-nginx -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system; done"
|
||||
- name: flannel_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l app=flannel -o name`;
|
||||
do kubectl logs $i --namespace kube-system flannel-container > flannel.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l app=flannel -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system flannel-container; done"
|
||||
- name: canal_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=canal-node -o name`;
|
||||
do kubectl logs $i --namespace kube-system flannel > flannel.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=canal-node -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system flannel; done"
|
||||
- name: calico_policy_logs
|
||||
cmd: sh -c "for i in `kubectl get pods --all-namespaces -l k8s-app=calico-policy -o name`;
|
||||
do kubectl logs $i --namespace kube-system calico-policy-controller > calico-policy-controller.log; done"
|
||||
cmd: "for i in `kubectl get pods --all-namespaces -l k8s-app=calico-policy -o jsonpath={.items..metadata.name}`;
|
||||
do kubectl logs ${i} --namespace kube-system calico-policy-controller; done"
|
||||
|
||||
logs:
|
||||
- /var/log/syslog
|
||||
|
@ -68,15 +68,6 @@
|
|||
- /var/log/calico/bird6/current
|
||||
- /var/log/calico/felix/current
|
||||
- /var/log/calico/confd/current
|
||||
- weave.log
|
||||
- kubedns.log
|
||||
- kube-apiserver.log
|
||||
- kube-controller.log
|
||||
- kube-scheduler.log
|
||||
- kube-proxy.log
|
||||
- kube-nginx.log
|
||||
- flannel.log
|
||||
- calico-policy-controller.log
|
||||
|
||||
tasks:
|
||||
- name: Storing commands output
|
||||
|
|
Loading…
Reference in a new issue