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.21.tar.gz (18.1 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.21-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mydomuk_sysmon-1.2.21.tar.gz
  • Upload date:
  • Size: 18.1 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.21.tar.gz
Algorithm Hash digest
SHA256 9b3c75797d1e8cd054dd797292509c8c527dc62a40f41aff9cdab600e341c910
MD5 38f58ff0c38ffc3292274f2d3ee51c54
BLAKE2b-256 6b86849f86c81e1f5c0dd4ae9bc942a30bc227fd7c3c44863ec43f72e2f89364

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mydomuk_sysmon-1.2.21-py3-none-any.whl
Algorithm Hash digest
SHA256 b28657f753c294961ef4d90d463fcb7daf1f6e2bd3bfffe47b74a761a5157e6d
MD5 e5ac1e97f9f88ea1b93e9a266fc55e1d
BLAKE2b-256 0c5050263acb66e165307fb11e25f1f8bf0aa0cf5670679d07494d2ad5f3eb05

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