Fixup docker blkio container name & docker doc

This commit is contained in:
Cameron Sparr 2016-04-18 16:20:46 -06:00
parent 36d330fea0
commit 7828bc09cf
3 changed files with 33 additions and 30 deletions

View File

@ -29,10 +29,10 @@ for the stat structure can be found
Every effort was made to preserve the names based on the JSON response from the Every effort was made to preserve the names based on the JSON response from the
docker API. docker API.
Note that the docker_cpu metric may appear multiple times per collection, based Note that the docker_container_cpu metric may appear multiple times per collection,
on the availability of per-cpu stats on your system. based on the availability of per-cpu stats on your system.
- docker_mem - docker_container_mem
- total_pgmafault - total_pgmafault
- cache - cache
- mapped_file - mapped_file
@ -66,7 +66,8 @@ on the availability of per-cpu stats on your system.
- usage - usage
- failcnt - failcnt
- limit - limit
- docker_cpu - container_id
- docker_container_cpu
- throttling_periods - throttling_periods
- throttling_throttled_periods - throttling_throttled_periods
- throttling_throttled_time - throttling_throttled_time
@ -75,7 +76,8 @@ on the availability of per-cpu stats on your system.
- usage_system - usage_system
- usage_total - usage_total
- usage_percent - usage_percent
- docker_net - container_id
- docker_container_net
- rx_dropped - rx_dropped
- rx_bytes - rx_bytes
- rx_errors - rx_errors
@ -84,7 +86,8 @@ on the availability of per-cpu stats on your system.
- rx_packets - rx_packets
- tx_errors - tx_errors
- tx_bytes - tx_bytes
- docker_blkio - container_id
- docker_container_blkio
- io_service_bytes_recursive_async - io_service_bytes_recursive_async
- io_service_bytes_recursive_read - io_service_bytes_recursive_read
- io_service_bytes_recursive_sync - io_service_bytes_recursive_sync
@ -125,20 +128,20 @@ on the availability of per-cpu stats on your system.
- docker_metadata - docker_metadata
- unit=bytes - unit=bytes
- docker_cpu specific: - docker_container_mem specific:
- cont_id (container ID) - container_image
- cont_image (container image) - container_name
- cont_name (container name) - docker_container_cpu specific:
- container_image
- container_name
- cpu - cpu
- docker_net specific: - docker_container_net specific:
- cont_id (container ID) - container_image
- cont_image (container image) - container_name
- cont_name (container name)
- network - network
- docker_blkio specific: - docker_container_blkio specific:
- cont_id (container ID) - container_image
- cont_image (container image) - container_name
- cont_name (container name)
- device - device
### Example Output: ### Example Output:
@ -156,8 +159,8 @@ on the availability of per-cpu stats on your system.
> docker,unit=bytes pool_blocksize=65540i 1456926671065383978 > docker,unit=bytes pool_blocksize=65540i 1456926671065383978
> docker_data,unit=bytes available=24340000000i,total=107400000000i,used=14820000000i 1456926671065383978 > docker_data,unit=bytes available=24340000000i,total=107400000000i,used=14820000000i 1456926671065383978
> docker_metadata,unit=bytes available=2126999999i,total=2146999999i,used=20420000i 145692667106538 > docker_metadata,unit=bytes available=2126999999i,total=2146999999i,used=20420000i 145692667106538
> docker_mem,cont_id=5705ba8ed8fb47527410653d60a8bb2f3af5e62372297c419022a3cc6d45d848,\ > docker_container_mem,
cont_image=spotify/kafka,cont_name=kafka \ container_image=spotify/kafka,container_name=kafka \
active_anon=52568064i,active_file=6926336i,cache=12038144i,fail_count=0i,\ active_anon=52568064i,active_file=6926336i,cache=12038144i,fail_count=0i,\
hierarchical_memory_limit=9223372036854771712i,inactive_anon=52707328i,\ hierarchical_memory_limit=9223372036854771712i,inactive_anon=52707328i,\
inactive_file=5111808i,limit=1044578304i,mapped_file=10301440i,\ inactive_file=5111808i,limit=1044578304i,mapped_file=10301440i,\
@ -168,21 +171,21 @@ total_inactive_file=5111808i,total_mapped_file=10301440i,total_pgfault=63762i,\
total_pgmafault=0i,total_pgpgin=73355i,total_pgpgout=45736i,\ total_pgmafault=0i,total_pgpgin=73355i,total_pgpgout=45736i,\
total_rss=105275392i,total_rss_huge=4194304i,total_unevictable=0i,\ total_rss=105275392i,total_rss_huge=4194304i,total_unevictable=0i,\
total_writeback=0i,unevictable=0i,usage=117440512i,writeback=0i 1453409536840126713 total_writeback=0i,unevictable=0i,usage=117440512i,writeback=0i 1453409536840126713
> docker_cpu,cont_id=5705ba8ed8fb47527410653d60a8bb2f3af5e62372297c419022a3cc6d45d848,\ > docker_container_cpu,
cont_image=spotify/kafka,cont_name=kafka,cpu=cpu-total \ container_image=spotify/kafka,container_name=kafka,cpu=cpu-total \
throttling_periods=0i,throttling_throttled_periods=0i,\ throttling_periods=0i,throttling_throttled_periods=0i,\
throttling_throttled_time=0i,usage_in_kernelmode=440000000i,\ throttling_throttled_time=0i,usage_in_kernelmode=440000000i,\
usage_in_usermode=2290000000i,usage_system=84795360000000i,\ usage_in_usermode=2290000000i,usage_system=84795360000000i,\
usage_total=6628208865i 1453409536840126713 usage_total=6628208865i 1453409536840126713
> docker_cpu,cont_id=5705ba8ed8fb47527410653d60a8bb2f3af5e62372297c419022a3cc6d45d848,\ > docker_container_cpu,
cont_image=spotify/kafka,cont_name=kafka,cpu=cpu0 \ container_image=spotify/kafka,container_name=kafka,cpu=cpu0 \
usage_total=6628208865i 1453409536840126713 usage_total=6628208865i 1453409536840126713
> docker_net,cont_id=5705ba8ed8fb47527410653d60a8bb2f3af5e62372297c419022a3cc6d45d848,\ > docker_container_net,\
cont_image=spotify/kafka,cont_name=kafka,network=eth0 \ container_image=spotify/kafka,container_name=kafka,network=eth0 \
rx_bytes=7468i,rx_dropped=0i,rx_errors=0i,rx_packets=94i,tx_bytes=946i,\ rx_bytes=7468i,rx_dropped=0i,rx_errors=0i,rx_packets=94i,tx_bytes=946i,\
tx_dropped=0i,tx_errors=0i,tx_packets=13i 1453409536840126713 tx_dropped=0i,tx_errors=0i,tx_packets=13i 1453409536840126713
> docker_blkio,cont_id=5705ba8ed8fb47527410653d60a8bb2f3af5e62372297c419022a3cc6d45d848,\ > docker_container_blkio,
cont_image=spotify/kafka,cont_name=kafka,device=8:0 \ container_image=spotify/kafka,container_name=kafka,device=8:0 \
io_service_bytes_recursive_async=80216064i,io_service_bytes_recursive_read=79925248i,\ io_service_bytes_recursive_async=80216064i,io_service_bytes_recursive_read=79925248i,\
io_service_bytes_recursive_sync=77824i,io_service_bytes_recursive_total=80293888i,\ io_service_bytes_recursive_sync=77824i,io_service_bytes_recursive_total=80293888i,\
io_service_bytes_recursive_write=368640i,io_serviced_recursive_async=6562i,\ io_service_bytes_recursive_write=368640i,io_serviced_recursive_async=6562i,\

View File

@ -411,7 +411,7 @@ func gatherBlockIOMetrics(
for device, fields := range deviceStatMap { for device, fields := range deviceStatMap {
iotags := copyTags(tags) iotags := copyTags(tags)
iotags["device"] = device iotags["device"] = device
acc.AddFields("docker_blkio", fields, iotags, now) acc.AddFields("docker_container_blkio", fields, iotags, now)
} }
} }

View File

@ -49,7 +49,7 @@ func TestDockerGatherContainerStats(t *testing.T) {
"io_service_bytes_recursive_read": uint64(100), "io_service_bytes_recursive_read": uint64(100),
"io_serviced_recursive_write": uint64(101), "io_serviced_recursive_write": uint64(101),
} }
acc.AssertContainsTaggedFields(t, "docker_blkio", blkiofields, blkiotags) acc.AssertContainsTaggedFields(t, "docker_container_blkio", blkiofields, blkiotags)
// test docker_container_mem measurement // test docker_container_mem measurement
memfields := map[string]interface{}{ memfields := map[string]interface{}{