Skip to content

Latest commit

 

History

History
19 lines (18 loc) · 509 Bytes

README.md

File metadata and controls

19 lines (18 loc) · 509 Bytes

DockerStats

Script for gathering Docker containers names and stats #!/bin/bash

Gathering docker containers stats for zabbix

delim='-------------------------------' stats=0 #while [ 1 ]; do declare -a name=( $(docker ps --format "table {{.ID}}\t{{.Names}}" | sed 1d |awk '{print $2}') ) for contName in ${name[@]} do stats=docker stats $contName --no-stream | awk '{print $2,$8}'|sed 1d| sed 's/%//g' echo "$contName" "$stats" #echo "$delim" done #sleep 5 #done