Skip to content

Commit 231e3fc

Browse files
committed
feat(about-me): Reports type of display server (if any)
1 parent 2ecd08e commit 231e3fc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
1414

1515
Monitoring Plugins:
1616

17+
* about-me: Reports display server (if any)
1718
* kubectl-get-pods: checks the health and status of kubernetes pods by running `kubectl get pods` and parsing the results
1819
* redfish-sel: add support for Supermicro ([#866](https://github.com/Linuxfabrik/monitoring-plugins/issues/866))
1920
* systemd-unit: implement support for `systemctl --machine` and `--user`

check-plugins/about-me/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Shortened output example:
7474
.. code-block:: text
7575
7676
Plugin Output
77-
server.example.com: Fedora Linux 39 (Workstation Edition) Kernel 6.8.4-200.fc39.x86_64 on Bare-Metal, Dell Inc. XPS 13 9310, Firmware: n/a, SerNo: 39d3e1cd, Proc: 11th Gen Intel Core i7-1185G7 @ 3.00GHz, #Cores: 4, #Threads: 8, Current Speed: 3000 MHz, 16.0GiB RAM, Disk nvme0n1 1.8T, UEFI boot, born 2024-03-20. About-me v2024041001
77+
server.example.com: Fedora Linux 39 (Workstation Edition) Kernel 6.8.4-200.fc39.x86_64 on Bare-Metal, Dell Inc. XPS 13 9310, Firmware: n/a, SerNo: 39d3e1cd, Proc: 11th Gen Intel Core i7-1185G7 @ 3.00GHz, #Cores: 4, #Threads: 8, Current Speed: 3000 MHz, 16.0GiB RAM, Disk nvme0n1 1.8T, UEFI boot, Display Server wayland, tuned profile "throughput-performance", born 2024-03-20. About-me v2024041001
7878
7979
Hardware Info:
8080
* BIOS: Dell Inc., Ver 3.21.0 (released 02/01/2024), ROM 32 MB

check-plugins/about-me/about-me

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ except ImportError:
4040

4141

4242
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
43-
__version__ = '2025050801 / v1.5.0.10'
43+
__version__ = '2025051501 / v1.5.0.10'
4444

4545
DESCRIPTION = 'Provides a quick overview of host dimensions and software.'
4646

@@ -840,6 +840,10 @@ def main():
840840
disk_msg, disk_count = get_disks()
841841
msg += disk_msg
842842
msg += get_boot_mode()
843+
env = os.environ.copy()
844+
display_server = env.get('XDG_SESSION_TYPE')
845+
if display_server and display_server != 'unspecified':
846+
msg += 'Display Server {}, '.format(display_server)
843847
msg += get_tuned_active_profile()
844848
msg += get_public_ip(args)
845849
msg += get_birthday()

0 commit comments

Comments
 (0)