Skip to content

Commit ee17b56

Browse files
authored
Merge pull request #55 from zenoss/develop
Finished release 2.2.0
2 parents b1cba07 + 38ca79e commit ee17b56

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4036
-177
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,9 @@ coverage.xml
5252
# Sphinx documentation
5353
docs/_build/
5454

55-
local_settings.py
55+
local_settings.py
56+
57+
# txsshclient build artifacts
58+
src/txsshclient-1.0.1/build/
59+
src/txsshclient-1.0.1/dist/
60+
src/txsshclient-1.0.1/*.egg-info/

GNUmakefile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
PYTHON=$(shell which python)
22
HERE=$(PWD)
33
ZP_DIR=$(HERE)/ZenPacks/zenoss/Docker
4+
SRC_DIR=$(HERE)/src
5+
TXSSHCLIENT_DIR=$(SRC_DIR)/txsshclient-1.0.1
6+
BIN_DIR=$(ZP_DIR)/bin
7+
LIB_DIR=$(ZP_DIR)/lib
48

5-
default: build
9+
default: egg
610

711
egg:
812
python setup.py bdist_egg
913

14+
.PHONY: build analytics
15+
1016
build:
11-
python setup.py bdist_egg
12-
python setup.py build
17+
rm -rf $(TXSSHCLIENT_DIR)/build
18+
cd $(TXSSHCLIENT_DIR); python setup.py build --build-lib build/lib
19+
mkdir -p $(ZP_DIR)/lib/sshclient
20+
touch $(ZP_DIR)/lib/__init__.py
21+
cp -r $(TXSSHCLIENT_DIR)/build/lib/sshclient/* $(ZP_DIR)/lib/sshclient/
1322

1423
clean:
1524
rm -rf build dist *.egg-info
25+
cd $(TXSSHCLIENT_DIR) ; rm -rf build dist *.egg-info ; cd $(SRC_DIR)
26+
cd $(LIB_DIR) ; rm -Rf *.egg site.py easy-install.pth ; cd $(SRC_DIR)
27+
find . -name '*.pyc' | xargs rm -f
1628

1729
analytics:
1830
rm -f ZenPacks/zenoss/Docker/analytics/analytics-bundle.zip

README.html

Lines changed: 59 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -21,44 +21,28 @@
2121
<h1 id="title">Docker ZenPack</h1>
2222
<p>This ZenPack provides support for monitoring <a href="https://www.docker.com/">Docker</a> and <a href="https://podman.io">Podman</a> containers running on Linux devices.</p>
2323

24-
<p>Docker versions through 20.10.2 and Podman versions through 3.4.2 are known to be supported in Docker ZenPack as of March, 2022.</p>
24+
<p>Docker versions through 28.4.0 and Podman versions through 4.9.4 are known to be supported in Docker ZenPack as of February, 2026.</p>
2525

2626
<h2 id="releases">Releases</h2>
2727

28-
<dl id="release-2.1.1">
29-
<dt>Version 2.1.1 <a class="external" rel="nofollow">Download</a></dt>
30-
<dd>Released: 2022-06-08</dd>
31-
<dd>Compatible with Zenoss Zenoss Cloud, 6.6</dd>
28+
<dl id="release-2.2.0">
29+
<dt>Version 2.2.0 <a class="external" rel="nofollow">Download</a></dt>
30+
<dd>Released: </dd>
31+
<dd>Compatible with Zenoss Zenoss Cloud, 6.9</dd>
3232
<dd>Requires:
33-
<a href="/product/zenpacks/zenpacklib">ZenPackLib ZenPack</a>
33+
<a href="https://github.com/zenoss/ZenPackLib">ZenPackLib</a>
3434
</dd>
3535
</dl>
3636

37-
<dl id="release-2.1.0">
38-
<dt>Version 2.1.0 <a class="external" rel="nofollow">Download</a></dt>
39-
<dd>Released: 2022-03-18</dd>
37+
<dl id="release-2.1.1">
38+
<dt>Version 2.1.1 <a class="external" rel="nofollow">Download</a></dt>
39+
<dd>Released: 2022-06-08</dd>
4040
<dd>Compatible with Zenoss Zenoss Cloud, 6.6</dd>
4141
<dd>Requires:
4242
<a href="/product/zenpacks/zenpacklib">ZenPackLib ZenPack</a>
4343
</dd>
4444
</dl>
4545

46-
<dl id="release-2.0.5">
47-
<dt>Version 2.0.5 <a class="external" href="http://wiki.zenoss.org/download/zenpacks/ZenPacks.zenoss.Docker/2.0.5/ZenPacks.zenoss.Docker-2.0.5.egg" rel="nofollow">Download</a></dt>
48-
<dd>Released: 2020-10-20</dd>
49-
<dd>Compatible with Zenoss Zenoss Cloud, 6.4</dd>
50-
<dd>Requires:
51-
<a href="/product/zenpacks/zenpacklib">ZenPackLib ZenPack</a>
52-
</dd>
53-
</dl>
54-
55-
<dl id="release-1.1.0">
56-
<dt>Version 1.1.0 <a class="external" href="http://wiki.zenoss.org/download/zenpacks/ZenPacks.zenoss.Docker/1.1.0/ZenPacks.zenoss.Docker-1.1.0.egg" rel="nofollow">Download</a></dt>
57-
<dd>Released: 2015-04-15</dd>
58-
<dd>Compatible with Zenoss 4.2 - 5.0</dd>
59-
<dd>No additional requirements.</dd>
60-
</dl>
61-
6246
<h2 id="contents">Contents</h2>
6347
<ol>
6448
<li><a href="#features">Features</a>
@@ -292,101 +276,76 @@ <h4 id="container-statistics-monitoring">Container Statistics Monitoring</h4>
292276
<p>When zDockerMonitorContainerStats or zPodmanMonitorContainerStats is enabled, the statistics of each Docker/Podman container will be collected once every five minutes by running the following commands.</p>
293277

294278
<ul>
295-
<li>/usr/bin/env sudo find /sys/fs/cgroup/cpuacct/ -printf "\n%p\n" -exec cat {} 2>/dev/null \;</li>
296-
<li>/usr/bin/env sudo find /sys/fs/cgroup/memory/ -printf "\n%p\n" -exec cat {} 2>/dev/null \;</li>
297-
<li>/usr/bin/env sudo find /sys/fs/cgroup/blkio/ -printf "\n%p\n" -exec cat {} 2>/dev/null \;</li>
279+
<li>"/usr/bin/env sudo -u ${here/zContainerCommandUser} docker stats --no-stream --no-trunc --format '{{.Name}},{{.ID}},{{.CPUPerc}},{{.MemUsage}},{{.MemPerc}},{{.NetIO}},{{.BlockIO}},{{.PIDs}}'"</li>
280+
<li>"/usr/bin/env sudo -u ${here/zContainerCommandUser} podman stats --no-stream --format '{{.Name}},{{.ID}},{{.CPUPerc}},{{.MemUsage}},{{.MemPerc}},{{.NetIO}},{{.BlockIO}},{{.PIDs}}'"</li>
298281
</ul>
299282

300-
<p>These three commands capture the cgroup CPU, memory, and IO usage respectively. They will work regardless of whether the cgroupfs or systemd driver are used.</p>
283+
<p>These three commands capture the docker stats and podman stats CPU, memory, and IO usage. They will work regardless of whether the cgroupfs or systemd driver are used.</p>
284+
<p><strong>Note</strong>: You can use zContainerCommandUser property to specify the user to run the commands as. By default, the commands are run as the root user. For non-root users, monitoring is only available for OSs with cgroup v2.</p>
301285

302286
<p>The following datapoints are parsed from the results of these commands.</p>
303287

304288
<dl>
305-
<dt>cpuacct_usage</dt>
306-
<dd><b>Description</b>: Total usage include user and system time.</dd>
307-
<dd><b>Provenance</b>: Value of cpuacct.usage for container divided by number of CPUs found in cpuacct.usage_percpu, divided by 10,000,000 to convert from nanoseconds to centiseconds. Presented as a rate.</dd>
308-
<dd><b>Units</b>: ticks per second (works out to a 0-100/sec rate)</dd>
309-
<dd><b>Aliases</b>: cpu__ticks</dd>
289+
<dt>CPUPerc</dt>
290+
<dd><b>Description</b>: CPU usage percentage.</dd>
291+
<dd><b>Provenance</b>: Value of CPUPerc for container.</dd>
292+
<dd><b>Units</b>: percentage</dd>
310293
</dl>
311294

312295
<dl>
313-
<dt>cpuacct_usage_user</dt>
296+
<dt>MemPerc</dt>
314297
<dd><b>Description</b>: User time.</dd>
315-
<dd><b>Provenance</b>: Value of user in cpuacct.stat divided by number of CPUs found in cpuacct.usage_percpu. Presented as a rate.</dd>
316-
<dd><b>Units</b>: ticks per second (works out to 0-100/sec rate)</dd>
317-
<dd><b>Aliases</b>: cpu_user__ticks</dd>
298+
<dd><b>Provenance</b>: Value of MemPerc for container.</dd>
299+
<dd><b>Units</b>: percentage</dd>
318300
</dl>
319301

320302
<dl>
321-
<dt>cpuacct_usage_system</dt>
322-
<dd><b>Description</b>: System time.</dd>
323-
<dd><b>Provenance</b>: Value of system in cpuacct.stat divided by number of CPUs found in cpuacct.usage_percpu. Presented as a rate.</dd>
324-
<dd><b>Units</b>: ticks per second (works out to 0-100/sec rate)</dd>
325-
<dd><b>Aliases</b>: cpu_system__ticks</dd>
326-
</dl>
327-
328-
<dl>
329-
<dt>cpuacct_processes</dt>
330-
<dd><b>Description</b>: Number of processes running in container.</dd>
331-
<dd><b>Provenance</b>: Value in cgroup.procs for container.</dd>
332-
<dd><b>Units</b>: process count</dd>
333-
</dl>
334-
335-
<dl>
336-
<dt>memory_limit</dt>
337-
<dd><b>Description</b>: Memory usage limit for container. (n/a indicates no limit)</dd>
338-
<dd><b>Provenance</b>: Value in memory.limit_in_bytes for container.</dd>
339-
<dd><b>Units</b>: bytes or n/a</dd>
340-
</dl>
341-
342-
<dl>
343-
<dt>memory_usage</dt>
303+
<dt>MemUsageUsed</dt>
344304
<dd><b>Description</b>: Memory usage for container.</dd>
345-
<dd><b>Provenance</b>: Value in memory.usage_in_bytes for container.</dd>
305+
<dd><b>Provenance</b>: Value of MemUsageUsed for container.</dd>
346306
<dd><b>Units</b>: bytes</dd>
347-
<dd><b>Aliases</b>: mem_usage__bytes</dd>
348307
</dl>
349308

350309
<dl>
351-
<dt>blkio_bytes_total</dt>
352-
<dd><b>Description</b>: Rate of IO read and write bytes for container.</dd>
353-
<dd><b>Provenance</b>: Sum of total value in blkio.io_service_bytes_recursive and blkio.throttle.io_service_bytes. Presented as a rate.</dd>
354-
<dd><b>Units</b>: bytes per second</dd>
310+
<dt>MemUsageLimit</dt>
311+
<dd><b>Description</b>: Memory usage limit for container. (n/a indicates no limit)</dd>
312+
<dd><b>Provenance</b>: Value of MemUsageLimit for container.</dd>
313+
<dd><b>Units</b>: bytes or n/a</dd>
355314
</dl>
356315

357316
<dl>
358-
<dt>blkio_bytes_read</dt>
317+
<dt>BlockIORead</dt>
359318
<dd><b>Description</b>: Rate of IO read bytes for container.</dd>
360-
<dd><b>Provenance</b>: Sum of read value in blkio.io_service_bytes_recursive and blkio.throttle.io_service_bytes. Presented as a rate.</dd>
319+
<dd><b>Provenance</b>: Value of BlockIORead for container.</dd>
361320
<dd><b>Units</b>: bytes per second</dd>
362321
</dl>
363322

364323
<dl>
365-
<dt>blkio_bytes_write</dt>
366-
<dd><b>Description</b>: Rate of IO write bytes bytes for a container.</dd>
367-
<dd><b>Provenance</b>: Sum of write value in blkio.io_service_bytes_recursive and blkio.throttle.io_service_bytes. Presented as a rate.</dd>
324+
<dt>BlockIOWrite</dt>
325+
<dd><b>Description</b>: Rate of IO write bytes for container.</dd>
326+
<dd><b>Provenance</b>: Value of BlockIOWrite for container.</dd>
368327
<dd><b>Units</b>: bytes per second</dd>
369328
</dl>
370329

371330
<dl>
372-
<dt>blkio_io_total</dt>
373-
<dd><b>Description</b>: Rate of IO read and write operations for container.</dd>
374-
<dd><b>Provenance</b>: Sum of total value in blkio.io_serviced_recursive and blkio.throttle.io_service_bytes. Presented as a rate.</dd>
375-
<dd><b>Units</b>: operations per second</dd>
331+
<dt>NetIORead</dt>
332+
<dd><b>Description</b>: Rate of IO read and write bytes for container.</dd>
333+
<dd><b>Provenance</b>: Value of NetIORead for container.</dd>
334+
<dd><b>Units</b>: bytes per second</dd>
376335
</dl>
377336

378337
<dl>
379-
<dt>blkio_io_read</dt>
380-
<dd><b>Description</b>: Rate of IO read operations for container.</dd>
381-
<dd><b>Provenance</b>: Sum of read value in blkio.io_serviced_recursive and blkio.throttle.io_service_bytes. Presented as a rate.</dd>
382-
<dd><b>Units</b>: operations per second</dd>
338+
<dt>NetIOWrite</dt>
339+
<dd><b>Description</b>: Rate of IO write bytes for container.</dd>
340+
<dd><b>Provenance</b>: Value of NetIOWrite for container.</dd>
341+
<dd><b>Units</b>: bytes per second</dd>
383342
</dl>
384343

385344
<dl>
386-
<dt>blkio_io_write</dt>
387-
<dd><b>Description</b>: Rate of IO write operations for container.</dd>
388-
<dd><b>Provenance</b>: Sum of write value in blkio.io_serviced_recursive and blkio.throttle.io_service_bytes. Presented as a rate.</dd>
389-
<dd><b>Units</b>: operations per second</dd>
345+
<dt>PIDs</dt>
346+
<dd><b>Description</b>: Number of processes running in container.</dd>
347+
<dd><b>Provenance</b>: Value of PIDs for container.</dd>
348+
<dd><b>Units</b>: process count</dd>
390349
</dl>
391350

392351
<p>The following graphs are built using these datapoints.</p>
@@ -395,39 +354,37 @@ <h4 id="container-statistics-monitoring">Container Statistics Monitoring</h4>
395354
<div class="thumbnail"><a href="/sites/default/files/zenpack/Docker/Docker_container_cpu_usage.png"><img src="/sites/default/files/zenpack/Docker/Docker_container_cpu_usage.png"></a></div>
396355
<dl>
397356
<dt>CPU Usage (percent)</dt>
398-
<dd>Total</dd>
399-
<dd>User</dd>
400-
<dd>System</dd>
357+
<dd>CPU</dd>
401358
</dl>
402359

403360
<br class="clear">
404361
<div class="thumbnail"><a href="/sites/default/files/zenpack/Docker/Docker_container_memory_usage.png"><img src="/sites/default/files/zenpack/Docker/Docker_container_memory_usage.png"></a></div>
405362
<dl>
406363
<dt>Memory Usage (bytes)</dt>
407-
<dd>Limit</dd>
408364
<dd>Used</dd>
365+
<dd>Limit</dd>
409366
</dl>
410367

411368
<br class="clear">
412-
<div class="thumbnail"><a href="/sites/default/files/zenpack/Docker/Docker_container_io_rate.png"><img src="/sites/default/files/zenpack/Docker/Docker_container_io_rate.png"></a></div>
369+
<div class="thumbnail"><a href="/sites/default/files/zenpack/Docker/Docker_container_block_io.png"><img src="/sites/default/files/zenpack/Docker/Docker_container_block_io.png"></a></div>
413370
<dl>
414-
<dt>IO Rate (operations/sec)</dt>
415-
<dd>Total</dd>
371+
<dt>Block IO (bytes/sec)</dt>
416372
<dd>Read</dd>
417373
<dd>Write</dd>
418374
</dl>
419375

420376
<br class="clear">
421-
<div class="thumbnail"><a href="/sites/default/files/zenpack/Docker/Docker_container_io_throughput.png"><img src="/sites/default/files/zenpack/Docker/Docker_container_io_throughput.png"></a></div>
377+
<div class="thumbnail"><a href="/sites/default/files/zenpack/Docker/Docker_container_net_io.png"><img src="/sites/default/files/zenpack/Docker/Docker_container_net_io.png"></a></div>
422378
<dl>
423-
<dt>IO Throughput (bytes/sec)</dt>
424-
<dd>Total</dd>
379+
<dt>Net IO (bytes/sec)</dt>
425380
<dd>Read</dd>
426381
<dd>Write</dd>
427382
</dl>
428383

429384
<br class="clear">
430385

386+
<p><strong></strong>Note</strong>: Starting from version 2.2.0 Docker ZenPack support modeling and monitoring of Docker and Podman containers which are running on the OSs with cgroup v2.</p>
387+
431388
<h4 id="container-size-monitoring">Container Size Monitoring</h4>
432389
<p>When zDockerMonitorContainerSize or zPodmanMonitorContainerSize is enabled, the real size and virtual size of each Docker/Podman container will be monitored once every ten minutes by running the following command.</p>
433390

@@ -611,6 +568,7 @@ <h2 id="installed-items">Installed Items</h2>
611568
<dd>zPodmanMonitorContainerStatus</dd>
612569
<dd>zPodmanMonitorContainerStats</dd>
613570
<dd>zPodmanMonitorContainerSize</dd>
571+
<dd>zContainerCommandUser</dd>
614572
</dl>
615573

616574
<dl>
@@ -645,6 +603,13 @@ <h2 id="installed-items">Installed Items</h2>
645603

646604
<h2 id="changes">Changes</h2>
647605

606+
<h3 id="changes-2.2.0">2.2.0</h3>
607+
<ul>
608+
<li>Update the Docker ZenPack to work with cgroup V2 (ZPS-9076)</li>
609+
<li>Update ZenPack to support modeling and monitoring Podman containers running for non-root users (ZPS-8697)</li>
610+
<li>Tested with Zenoss 6.9.0, Zenoss Cloud and Service Impact 5.7.2</li>
611+
</ul>
612+
648613
<h3 id="changes-2.1.1">2.1.1</h3>
649614
<ul>
650615
<li>Improved error handling to support Podman Containers.</li>

0 commit comments

Comments
 (0)