Skip to main content

System Monitor Tool using MQTT

Project description

System Monitor

This module reports system performance data to an MQTT server. Home Assistant Discovery may also be enabled to allow easy setup for use with Home Assistant

Installation

This is a PyPi module and can be installed into a dedicated environment using pip install mydomuk.sysmon

Usage

A source file is required to allow communication with the MQTT server and for the setup of Home Assistant

In order to create a dummy configuration file call Sysmon as below

python -m mydomuk.sysmon -cs

This will output a Source configuration similar to below

Jan10 22:21:47 - sysmon[I] - Sysmon Version 1.2.21 running on posix system linux
# Configuration File save this as a .src file and edit it
# ************** START ********************
MQTT_BROKER=127.0.0.1                               # MQTT Broker host name or IP address, required
MQTT_PORT=1883                                      # MQTT Port for connecting to broker, defaults to 1883
MQTT_USER=                                          # MQTT Username for broker, required if using authenticated MQTT Server
MQTT_PASSWORD=                                      # MQTT Password for broker
MQTT_SSL=False                                      # Use SSL True for False for connecting to broker, default False
MQTT_CACERT=                                        # Path to the CA Certficate if using SSL, optional
MQTT_TOPIC_PREFIX=MyDomUK                           # MQTT Topic Prefix, required
MQTT_DEVICE_TOPIC=sysmon/{{hostname}}               # MQTT Device Topic usually include {{hostname}}  in the string, required
MQTT_VIP_TOPIC=                                     # Optional Topic for VIP monitoring
MQTT_VIP_MONIT=                                     # Optional Comma Separated list of VIP NIC names to hostname ownership of
MQTT_NIC_MONIT=                                     # Optional Comma Separated list of NIC names to report IP addresses on
MQTT_DISK_MONIT=                                    # Optional Comma Separated list of name=mountpoint pairs
HASS_TOPIC_PREFIX=homeassistant                     # Homeassistant discovery topic prefix, default homeassistant
HASS_DISCOVERY=True                                 # Discovery on True or False, default True
HASS_DEVICE=MyDomUK Server {{hostname}}             # Homeassistant Device description can include {{hostname}}
HASS_DEVICEID=mydomuk_sysmon_{{hostname}}           # Homeassistant unique Device can include {{hostname}}
HASS_MANUFACTURER=Server Manufacturer               # Homeassistant Device manufacturer
HASS_MODEL=Server Model                             # Homeassistant Device model information
PUBLIC_IP_CHECK=False                               # Change to True to Get Public IP V4 Address
PUBLIC_IPV6_CHECK=False                             # Change to True to Get Public IP V6 Address   
PUBLIC_IP_SITES=                                    # Allow overriding the internal set of Public IP Check URLs
PUBLIC_IPV6_SITES=                                  # Allow overriding the internal set of Public IP Check URLs
# ************** ENDS  ********************

Copy this and edit it into a local file and then start sysmon using python -m mydomuk.sysmon -src sourcefilename

To see a list of command line options simply run python -m mydomuk.sysmon -h

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mydomuk_sysmon-1.2.23.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mydomuk_sysmon-1.2.23-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file mydomuk_sysmon-1.2.23.tar.gz.

File metadata

  • Download URL: mydomuk_sysmon-1.2.23.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mydomuk_sysmon-1.2.23.tar.gz
Algorithm Hash digest
SHA256 c034468279bb2b338ca932534bdedb83c59dcd1e748aae14b81cfb739aa1fd78
MD5 d51dbb7f1764e993d950e04a21786b32
BLAKE2b-256 cbd73d23c8a395d5c691f74534ee1d28833ff1cec75638e371dc1857cfc7ef73

See more details on using hashes here.

File details

Details for the file mydomuk_sysmon-1.2.23-py3-none-any.whl.

File metadata

File hashes

Hashes for mydomuk_sysmon-1.2.23-py3-none-any.whl
Algorithm Hash digest
SHA256 89cd659e85873151e88bc09a7165cfb61eb31d7e8a3730f580994adb8d5b6a8b
MD5 5d0d1592af1d168ac20a9522ae41487e
BLAKE2b-256 ba82995a9eb8ba1b4ed1b707af7fe962ddb1c5903197f41e9fed8cf3958a9ae1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page