summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2021-01-23 11:10:27 +0100
committernicolargo <nicolas@nicolargo.com>2021-01-23 11:10:27 +0100
commit0d35d5477bd1afbbb0bd990592fb69e7bae3743b (patch)
tree6f84805151a45589ae2c9333c9b90677a81c9b5c
parentcdb6bfbb70cd5efb9f5e040e4247111e106367d4 (diff)
parent1b36ed92a213e56a5801a4d962de7e9164def927 (diff)
version 3.1.6v3.1.6
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md31
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md20
-rw-r--r--.github/workflows/main.yml85
-rw-r--r--.travis.yml28
-rw-r--r--NEWS.rst48
-rw-r--r--README.rst42
-rw-r--r--conf/glances.conf36
-rw-r--r--docker-compose/Dockerfile3
-rw-r--r--docker-compose/docker-compose.yml17
-rw-r--r--docker-compose/glances.conf616
-rw-r--r--docker-files/Dockerfile34
-rw-r--r--docker-files/dev.Dockerfile39
-rw-r--r--docker-files/devel-alpine/Dockerfile5
-rw-r--r--docker-files/devel-arm/Dockerfile27
-rw-r--r--docker-files/devel/Dockerfile25
-rw-r--r--docker-files/master/Dockerfile43
-rw-r--r--docs/aoa/docker.rst7
-rw-r--r--docs/aoa/fs.rst4
-rw-r--r--docs/aoa/ps.rst3
-rw-r--r--docs/aoa/sensors.rst3
-rw-r--r--docs/cmds.rst2
-rw-r--r--docs/conf.py5
-rw-r--r--docs/config.rst8
-rw-r--r--docs/docker.rst1
-rw-r--r--docs/gw/influxdb.rst50
-rw-r--r--docs/gw/json.rst2
-rw-r--r--docs/gw/rabbitmq.rst1
-rw-r--r--docs/man/glances.115
-rw-r--r--glances/__init__.py4
-rw-r--r--glances/config.py16
-rw-r--r--glances/exports/glances_influxdb.py2
-rw-r--r--glances/exports/glances_influxdb2.py136
-rw-r--r--glances/main.py10
-rw-r--r--glances/outputs/glances_curses.py192
-rw-r--r--glances/outputs/static/.gitignore1
-rw-r--r--glances/outputs/static/css/style.scss4
-rw-r--r--glances/outputs/static/js/components/plugin-amps/controller.js2
-rw-r--r--glances/outputs/static/js/components/plugin-amps/view.html4
-rw-r--r--glances/outputs/static/js/components/plugin-docker/controller.js2
-rw-r--r--glances/outputs/static/js/components/plugin-gpu/view.html17
-rw-r--r--glances/outputs/static/js/components/plugin-process/controller.js2
-rw-r--r--glances/outputs/static/js/components/plugin-processlist/controller.js27
-rw-r--r--glances/outputs/static/js/components/plugin-processlist/view.html4
-rw-r--r--glances/outputs/static/package-lock.json40
-rw-r--r--glances/outputs/static/package.json4
-rw-r--r--glances/outputs/static/public/glances.js326
-rw-r--r--glances/outputs/static/public/glances.map.js2
-rw-r--r--glances/outputs/static/yarn.lock3907
-rw-r--r--glances/plugins/glances_diskio.py12
-rw-r--r--glances/plugins/glances_docker.py18
-rw-r--r--glances/plugins/glances_fs.py2
-rw-r--r--glances/plugins/glances_gpu.py6
-rw-r--r--glances/plugins/glances_ip.py3
-rw-r--r--glances/plugins/glances_memswap.py35
-rw-r--r--glances/plugins/glances_network.py14
-rw-r--r--glances/plugins/glances_now.py16
-rw-r--r--glances/plugins/glances_plugin.py86
-rw-r--r--glances/plugins/glances_processlist.py47
-rw-r--r--glances/plugins/glances_quicklook.py10
-rw-r--r--glances/processes.py13
-rw-r--r--glances/static_list.py2
-rw-r--r--optional-requirements.txt6
-rw-r--r--requirements.txt2
-rwxr-xr-xsetup.py3
64 files changed, 1861 insertions, 4316 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..8130bd8d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,31 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Start Glances with the followings options '...'
+2. Press the key '....'
+3. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. GNU/Linux Ubuntu 20.04]
+ - Glances Version [output of glances -V]
+ - Glances logs file [output of tail -10 <glances logs file>]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 00000000..bbcbbe7d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..d58e3e41
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,85 @@
+name: CI
+
+env:
+ DEFAULT_DOCKER_IMAGE: nicolargo/glances
+ NODE_ENV: ${{ (contains('refs/heads/master', github.ref) || startsWith(github.ref, 'refs/tags/v')) && 'prod' || 'dev' }}
+ PUSH_BRANCH: ${{ 'refs/heads/develop' == github.ref || 'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/v') }}
+ DOCKER_PLATFORMS: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386
+
+on:
+ pull_request:
+ branches: [ develop ]
+ push:
+ branches: [ master, develop ]
+ tags:
+ - v*
+
+jobs:
+ buildx:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Cache Docker layers
+ uses: actions/cache@v2
+ with:
+ path: /tmp/.buildx-cache
+ key: ${{ runner.os }}-buildx-${{ env.NODE_ENV }}-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-buildx-${{ env.NODE_ENV }}
+
+ - name: Configure ENVs
+ env:
+ DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE || env.DEFAULT_DOCKER_IMAGE }}
+ DOCKERFILE: ${{ env.NODE_ENV == 'prod' && './docker-files/Dockerfile' || './docker-files/dev.Dockerfile' }}
+ run: |
+ ls -la /tmp/.buildx-cache || true
+ VERSION=latest
+
+ if [[ $GITHUB_REF == refs/tags/* ]]; then
+ VERSION=${GITHUB_REF#refs/tags/v}
+ fi
+
+ if [[ $GITHUB_REF == refs/heads/develop ]]; then
+ VERSION=dev
+ fi
+
+ echo "DOCKERFILE=${DOCKERFILE}" >> $GITHUB_ENV
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
+ echo "TAGS=${DOCKER_IMAGE}:${VERSION}" >> $GITHUB_ENV
+ echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
+ echo "VCS_REF=${GITHUB_SHA::8}" >> $GITHUB_ENV
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+ with:
+ platforms: all
+
+ - name: Set up Docker Buildx
+ id: buildx
+ uses: docker/setup-buildx-action@v1
+ with:
+ version: latest
+
+ - name: Login to DockerHub
+ uses: docker/login-action@v1
+ if: ${{ env.PUSH_BRANCH == 'true' }}
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+
+ - name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ push: ${{ env.PUSH_BRANCH == 'true' }}
+ tags: ${{env.TAGS}}
+ build-args: |
+ VERSION=${{env.VERSION}}
+ BUILD_DATE=${{env.BUILD_DATE}}
+ VCS_REF=${{env.VCS_REF}}
+ context: .
+ file: ${{env.DOCKERFILE}}
+ platforms: ${{env.DOCKER_PLATFORMS}}
+ cache-from: type=local,src=/tmp/.buildx-cache
+ cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
diff --git a/.travis.yml b/.travis.yml
index b8d1f2cd..7ec03af1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,12 +23,22 @@ after_success:
- coveralls
deploy:
- provider: pypi
- user: nicolargo
- password:
- secure: Fms23jiiKKq6qJMsZYrmBz5mC753VGrjCxzVrsioENfH3KaFf6kUc9fTYntaLvjLPTNBkU3R2IORfVOikJKmNWqWVZOdJ/nq8zPl6o9MgdNcX7qWTvY8Fi9MW7tIZHrehhm0LvWFVq8ZSc8iYzw3/741lvBh8vpJZSQs3sq/1QI=
- on:
- tags: true
- branch: master
- distributions: sdist bdist_wheel
- repo: nicolargo/glances
+ - provider: pypi
+ user: nicolargo
+ password:
+ secure: Fms23jiiKKq6qJMsZYrmBz5mC753VGrjCxzVrsioENfH3KaFf6kUc9fTYntaLvjLPTNBkU3R2IORfVOikJKmNWqWVZOdJ/nq8zPl6o9MgdNcX7qWTvY8Fi9MW7tIZHrehhm0LvWFVq8ZSc8iYzw3/741lvBh8vpJZSQs3sq/1QI=
+ on:
+ tags: true
+ branch: master
+ distributions: sdist bdist_wheel
+ repo: nicolargo/glances
+ - provider: pypi
+ server: https://test.pypi.org/legacy/
+ user: nicolargo
+ password:
+ secure: kxchYP3VJWe74jun0rJjuEFFpnO2sF3WHsK5Axlz4flJ6dtX0OPeZd9SlqgMX7cv9FHcXxyukVKrw4PHVqUNcWoaKM8TNeddKkGeSjcVY5C7NIExXh5es4SguozdT4cckoJUyN2xXc7cUAM68CHWfxijR6NiDMXIuMJrZumye6c=
+ on:
+ tags: false
+ branch: develop
+ distributions: sdist bdist_wheel
+ repo: nicolargo/glances
diff --git a/NEWS.rst b/NEWS.rst
index 3ba6e845..37570a3b 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -2,6 +2,54 @@
Glances Version 3
==============================================================================
+Version 3.1.6
+=============
+
+Enhancements and new features:
+
+ * Kill a process from the Curses interface #1444
+ * Manual refresh on F5 in the Curses interface #1753
+ * Hide function in sensors section #1590
+ * Enhancement Request: .conf parameter for AMP #1690
+ * Password for Web/Browser mode #1674
+ * Unable to connect to Influxdb 2.0 #1776
+ * ci: fix release process and improve build speeds #1782
+ * Cache cpuinfo output #1700
+ * sort by clicking improvements and bug #1578
+ * Allow embedded AMP python script to be placed in a configurable location #1734
+ * Add attributes to stdout/stdout-csv plugins #1733
+ * Do not shorten container names #1723
+
+Bugs corrected:
+
+ * Version tag for docker image packaging #1754
+ * Unusual characters in cmdline cause lines to disappear and corrupt the display #1692
+ * UnicodeDecodeError on any command with a utf8 character in its name #1676
+ * Docker image is not up to date install #1662
+ * Add option to set the strftime format #1785
+ * fix: docker dev build contains all optional requirements #1779
+ * GPU information is incomplete via web #1697
+ * [WebUI] Fix display of null values for GPU plugin #1773
+ * crash on startup on Illumos when no swap is configured #1767
+ * Glances crashes with 2 GPUS bug #1683
+ * [Feature Request] Filter Docker containers#1748
+ * Error with IP Plugin : object has no attribute #1528
+ * docker-compose #1760
+ * [WebUI] Fix sort by disk io #1759
+ * Connection to MQTT server failst #1705
+ * Misleading image tag latest-arm needs contributor packaging #1419
+ * Docker nicolargo/glances:latest missing arm builds? #1746
+ * Alpine image is broken packaging #1744
+ * RIP Alpine? needs contributor packaging #1741
+ * Manpage improvement documentation #1743
+ * Make build reproducible packaging #1740
+ * Automated multiarch builds for docker #1716
+ * web ui of glances is not coming #1721
+ * fixing command in json.rst #1724
+ * Fix container rss value #1722
+ * Alpine Image is broken needs test packaging #1720
+ * Fix gpu plugin to handle multiple gpus with different reporting capabilities bug #1634
+
Version 3.1.5
=============
diff --git a/README.rst b/README.rst
index 8c39d020..b66d4184 100644
--- a/README.rst
+++ b/README.rst
@@ -9,9 +9,13 @@ Glances - An eye on your system
:target: https://github.com/nicolargo/glances/
:alt: Github stars
+.. image:: https://img.shields.io/docker/pulls/nicolargo/glances
+ :target: https://hub.docker.com/r/nicolargo/glances/
+ :alt: Docker pull
+
.. image:: https://pepy.tech/badge/glances/month
:target: https://pepy.tech/project/glances
- :alt: Downloads
+ :alt: Pypi downloads
.. image:: https://img.shields.io/travis/nicolargo/glances/master.svg?maxAge=3600&label=Linux%20/%20BSD%20/%20macOS
:target: https://travis-ci.org/nicolargo/glances
@@ -24,8 +28,8 @@ Glances - An eye on your system
.. image:: https://scrutinizer-ci.com/g/nicolargo/glances/badges/quality-score.png?b=develop
:target: https://scrutinizer-ci.com/g/nicolargo/glances/?branch=develop
-.. image:: https://img.shields.io/badge/Donate-PayPal-green.svg
- :target: https://www.paypal.me/nicolargo
+.. image:: https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&link=https://github.com/sponsors/nicolargo
+ :target: https://github.com/sponsors/nicolargo
.. image:: https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40nicolargo
:target: https://twitter.com/nicolargo
@@ -65,7 +69,8 @@ Optional dependencies:
- ``docker`` (for the Docker monitoring support) [Linux/macOS-only]
- ``elasticsearch`` (for the Elastic Search export module)
- ``hddtemp`` (for HDD temperature monitoring support) [Linux-only]
-- ``influxdb`` (for the InfluxDB export module)
+- ``influxdb`` (for the InfluxDB version 1 export module)
+- ``influxdb-client`` (for the InfluxDB version 2 export module) [Only for Python >= 3.6]
- ``kafka-python`` (for the Kafka export module)
- ``netifaces`` (for the IP plugin)
- ``nvidia-ml-py3`` (for the GPU plugin)
@@ -161,6 +166,13 @@ If you need to install Glances in a specific user location, use:
export PYTHONUSERBASE=~/mylocalpath
pip install --user glances
+The current develop branch is also published to the test.pypi.org package index.
+If you want to test the develop version, enter:
+
+.. code-block:: console
+
+ pip install -i https://test.pypi.org/simple/ Glances
+
Docker: the funny way
---------------------
@@ -168,24 +180,30 @@ A Glances container is available. It includes the latest development
HEAD version. You can use it to monitor your server and all your other
containers!
-Get the Glances container:
+Get the Glances container (latest develop branch):
.. code-block:: console
- docker pull nicolargo/glances
+ docker pull nicolargo/glances:dev
+
+Note, you can choose another branch with :
+
+- nicolargo/glances:latest for the last master branch (included multiple architectures 386, amd64, arm/v7 and arm64)
+- nicolargo/glances:dev for the last develop branch (included multiple architectures 386, amd64, arm/v7 and arm64)
+- nicolargo/glances:<version> for the specific <version> (included multiple architectures 386, amd64, arm/v7 and arm64)
Run the container in *console mode*:
.. code-block:: console
- docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it docker.io/nicolargo/glances
+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it nicolargo/glances:dev
Additionally, if you want to use your own glances.conf file, you can
create your own Dockerfile:
.. code-block:: console
- FROM nicolargo/glances
+ FROM nicolargo/glances:dev
COPY glances.conf /glances/conf/glances.conf
CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
@@ -194,7 +212,7 @@ docker run options:
.. code-block:: console
- docker run -v `pwd`/glances.conf:/glances/conf/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it docker.io/nicolargo/glances
+ docker run -v `pwd`/glances.conf:/glances/conf/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it nicolargo/glances:dev
Where \`pwd\`/glances.conf is a local directory containing your glances.conf file.
@@ -203,7 +221,7 @@ variable setting parameters for the glances startup command):
.. code-block:: console
- docker run -d --restart="always" -p 61208-61209:61208-61209 -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host docker.io/nicolargo/glances
+ docker run -d --restart="always" -p 61208-61209:61208-61209 -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host nicolargo/glances:dev
GNU/Linux
---------
@@ -416,8 +434,7 @@ Donation
If this project help you, you can give me a tip ;)
-.. image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
- :target: https://www.paypal.me/nicolargo
+See the sponsors_ page.
Author
======
@@ -440,3 +457,4 @@ Glances is distributed under the LGPL version 3 license. See ``COPYING`` for mor
.. _forum: https://groups.google.com/forum/?hl=en#!forum/glances-users
.. _wiki: https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-%3F
.. _package: https://repology.org/metapackage/glances/packages
+.. _sponsors: https://github.com/sponsors/nicolargo
diff --git a/conf/glances.conf b/conf/glances.conf
index a9802d7f..2df9783d 100644
--- a/conf/glances.conf
+++ b/conf/glances.conf
@@ -184,7 +184,7 @@ careful=50
warning=70
critical=90
# Allow additional file system types (comma-separated FS type)
-#allow=zfs
+#allow=shm
[irq]
# Documentation: https://glances.readthedocs.io/en/stable/aoa/irq.html
@@ -327,6 +327,14 @@ port_default_gateway=True
[docker]
disable=False
+# Only show specific containers (comma separeted list of container name or regular expression)
+# Comment this line to display all containers (default configuration)
+#show=telegraf
+# Hide some containers (comma separeted list of container name or regular expression)
+# Comment this line to display all containers (default configuration)
+#hide=telegraf
+# Define the maximum docker size name (default is 20 chars)
+max_name_size=20
#cpu_careful=50
# Thresholds for CPU and MEM (in %)
#cpu_warning=70
@@ -390,6 +398,10 @@ height=600
style=DarkStyle
[influxdb]
+# !!!
+# Will be DEPRECATED in future release.
+# Please have a look on the new influxdb2 export module (compatible with InfluxDB 1.8.x and 2.x)
+# !!!
# Configuration for the --export influxdb option
# https://influxdb.com/
host=localhost
@@ -410,6 +422,27 @@ prefix=localhost
# You can also use dynamic values
#tags=system:`uname -s`
+[influxdb2]
+# Configuration for the --export influxdb2 option
+# https://influxdb.com/
+host=localhost
+port=8086
+protocol=http
+org=nicolargo
+bucket=glances
+token=EjFUTWe8U-MIseEAkaVIgVnej_TrnbdvEcRkaB1imstW7gapSqy6_6-8XD-yd51V0zUUpDy-kAdVD1purDLuxA==
+# Prefix will be added for all measurement name
+# Ex: prefix=foo
+# => foo.cpu
+# => foo.mem
+# You can also use dynamic values
+#prefix=`hostname`
+prefix=localhost
+# Tags will be added for all measurements
+#tags=foo:bar,spam:eggs
+# You can also use dynamic values
+#tags=system:`uname -s`
+
[cassandra]
# Configuration for the --export cassandra option
# Also works for the ScyllaDB
@@ -461,6 +494,7 @@ port=5672
user=guest
password=guest
queue=glances_queue
+#protocol=amqps
[mqtt]
# Configuration for the --export mqtt option
diff --git a/docker-compose/Dockerfile b/docker-compose/Dockerfile
new file mode 100644
index 00000000..6d434159
--- /dev/null
+++ b/docker-compose/Dockerfile
@@ -0,0 +1,3 @@
+FROM nicolargo/glances:dev
+COPY glances.conf /glances/conf/glances.conf
+CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
new file mode 100644
index 00000000..de5efee7
--- /dev/null
+++ b/docker-compose/docker-compose.yml
@@ -0,0 +1,17 @@
+version: '3.7'
+services:
+ glances:
+ build:
+ context: ./
+ dockerfile: Dockerfile
+ restart: always
+ ports:
+ - "61208:61208"
+ # - "61209:61209"
+ environment:
+ # - GLANCES_OPT="-w"
+ GLANCES_OPT: "-w"
+ volumes:
+ - "/var/run/docker.sock:/var/run/docker.sock:ro"
+ - "./glances.conf:/glances/conf/glances.conf"
+ pid: "host"
diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf
new file mode 100644
index 00000000..292065fb
--- /dev/null
+++ b/docker-compose/glances.conf
@@ -0,0 +1,616 @@
+##############################################################################
+# Globals Glances parameters
+##############################################################################
+
+[global]
+# Does Glances should check if a newer version is available on PyPI ?
+check_update=false
+# History size (maximum number of values)
+# Default is 28800: 1 day with 1 point every 3 seconds
+history_size=28800
+
+##############################################################################
+# User interface
+##############################################################################
+
+[outputs]
+# Theme name for the Curses interface: black or white
+curse_theme=black
+# Limit the number of processes to display in the WebUI
+max_processes_display=30
+
+##############################################################################
+# plugins
+########################################