File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,14 +100,11 @@ function dump_logs {
100100 export FLEETCTL_TUNNEL=$DEISCTL_TUNNEL
101101 fleetctl -strict-host-key-checking=false list-units
102102 # application unit logs
103- get_logs appssample_v2.web.1
104- get_logs appssample_v2.run.1
105- get_logs buildsample_v2.web.1
106- get_logs buildsample_v3.cmd.1
107- get_logs deispullsample_v2.cmd.1
108- get_logs deispullsample_v2.worker.1
109- get_logs pssample_v2.worker.1
110- get_logs pssample_v2.worker.2
103+ for APP in ` fleetctl -strict-host-key-checking=false list-units --no-legend --fields=unit | grep -v " deis-" ` ; do
104+ CURRENT_APP=$( echo $APP | sed " s/\.service//" )
105+ # echo "$CURRENT_APP"
106+ get_journal_logs $CURRENT_APP
107+ done
111108 # etcd keyspace
112109 get_logs deis-controller " etcdctl ls / --recursive" etcdctl-dump
113110 # component logs
@@ -170,3 +167,8 @@ function get_logs {
170167 fi
171168 fleetctl -strict-host-key-checking=false ssh " $TARGET " docker logs " $CONTAINER " > $FAILED_LOGS_DIR /$FILENAME .log
172169}
170+
171+ function get_journal_logs {
172+ TARGET=" $1 "
173+ fleetctl -strict-host-key-checking=false journal --lines=1000 " $TARGET " > $FAILED_LOGS_DIR /$TARGET .log
174+ }
You can’t perform that action at this time.
0 commit comments