diff options
author | nicolargo <nicolas@nicolargo.com> | 2023-05-08 09:26:04 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2023-05-08 09:26:04 +0200 |
commit | e3a1a774ca4cd209910c7f11d4b13d665261afd5 (patch) | |
tree | b41bb99148aa31d28103228b2b4bee2bc4e4456f /docs/aoa/containers.rst | |
parent | 8782908b9c99967eea2a2da3565697a92ebfae14 (diff) |
Correct an issue in the Podman export (date not serializable)
Diffstat (limited to 'docs/aoa/containers.rst')
-rw-r--r-- | docs/aoa/containers.rst | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/aoa/containers.rst b/docs/aoa/containers.rst new file mode 100644 index 00000000..c969b1e8 --- /dev/null +++ b/docs/aoa/containers.rst @@ -0,0 +1,58 @@ +.. _containers: + +Containers +========== + +If you use ``containers``, Glances can help you to monitor your Docker or Podman containers. +Glances uses the containers API through the `docker-py`_ and `podman-py`_ libraries. + +You can install this dependency using: + +.. code-block:: console + + pip install glances[containers] + +.. image:: ../_static/containers.png + +It is possible to define limits and actions from the configuration file +under the ``[containers]`` section: + +.. code-block:: ini + + [containers] + disable=False + # Only show specific containers (comma separated list of container name or regular expression) + show=thiscontainer,andthisone,andthoseones.* + # Hide some containers (comma separated list of container name or regular expression) + hide=donotshowthisone,andthose.* + # Show only specific containers (comma separated list of container name or regular expression) + #show=showthisone,andthose.* + # Define the maximum containers size name (default is 20 chars) + max_name_size=20 + # Global containers' thresholds for CPU and MEM (in %) + cpu_careful=50 + cpu_warning=70 + cpu_critical=90 + mem_careful=20 + mem_warning=50 + mem_critical=70 + # Per container thresholds + containername_cpu_careful=10 + containername_cpu_warning=20 + containername_cpu_critical=30 + containername_cpu_critical_action=echo {{Image}} {{Id}} {{cpu}} > /tmp/container_{{name}}.alert + # By default, Glances only display running containers + # Set the following key to True to display all containers + all=False + # Define Podman sock + #podman_sock=unix:///run/user/1000/podman/podman.sock + +You can use all the variables ({{foo}}) available in the containers plugin. + +Filtering (for hide or show) is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ +.. _docker-py: https://github.com/containers/containers-py +.. _podman-py: https://github.com/containers/podman-py
\ No newline at end of file |