Skip to content

Commit

Permalink
Ability to specify hide or show for smart plugin #2996
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed Nov 16, 2024
1 parent 07656fd commit 3f26fb8
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 225 deletions.
4 changes: 4 additions & 0 deletions conf/glances.conf
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ disable=True
# Documentation: https://glances.readthedocs.io/en/latest/aoa/smart.html
# This plugin is disabled by default
disable=True
# Define the list of sensors to hide (comma-separated regexp)
#hide=.*Hide_this_driver.*
# Define the list of sensors to show (comma-separated regexp)
#show=.*Drive_Temperature.*

[hddtemp]
disable=False
Expand Down
4 changes: 4 additions & 0 deletions docker-compose/glances.conf
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ disable=True
# Documentation: https://glances.readthedocs.io/en/latest/aoa/smart.html
# This plugin is disabled by default
disable=True
# Define the list of sensors to hide (comma-separated regexp)
#hide=.*Hide_this_driver.*
# Define the list of sensors to show (comma-separated regexp)
#show=.*Drive_Temperature.*

[hddtemp]
disable=False
Expand Down
23 changes: 23 additions & 0 deletions docs/aoa/smart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,26 @@ How to read the information:

.. warning::
This plugin needs administrator rights. Please run Glances as root/admin.

Also, you can hide sensors using regular expressions.

To hide sensors you should use the hide option:

.. code-block:: ini
[smart]
hide=.*Hide_this_driver.*
It is also possible to configure a white list of devices to display.
Example to only show .*Drive_Temperature.* sensors:

.. code-block:: ini
[fs]
show=.*Drive_Temperature.*
Filtering 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/
Loading

0 comments on commit 3f26fb8

Please sign in to comment.