Skip to content

Initially written in Python, but translated to Go with the help of LLMs. Implements metric gathering for Dell Wyse 5070 (temperatures) and other generic metrics like CPU, RAM, memory, network. These metrics are then reported to the MQTT broker. Perfect fit, if you have HA instance running in the VM and you want to monitor host machine health.

License

Notifications You must be signed in to change notification settings

cziter15/gohostmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Windows MQTT

gohostmon

This is a simple Go utility built on top of the paho.mqtt.golang and gopsutil libraries to monitor the host machine running Home Assistant. The monitored machine is a Dell Wyse 5060 with an AMD K10 CPU, but the script can be easily modified to work with other devices as well.

The program uses MQTT protocol and will publish everything under hwinfo/ topic, as follows

hwinfo/network_total_bytes_sent
hwinfo/network_total_bytes_received
hwinfo/k10_temperature_celsius
hwinfo/cpu_utilization_percent
hwinfo/ram_used_percent

Then, you should create configuration file named config.ini in the working directory where you run the script:

[credentials]
user=<your mqtt username>
pass=<your mqtt password>
host=<your mqtt hostname>

Then, you should create a bash script, which you'll put somewhere to automatically start this python script on boot.

Running

This is an example autorun script dedicated to Kubuntu autorun mechanism which also launches HA instance:

#!/bin/bash

cd /home/chris/Pulpit/HomeAssistant/uhostmon
nohup ./gohostmon >/dev/null 2>&1 &
VBoxManage startvm HomeAssistant --type headless

Screenshots

  • Home Assistant dasboard

image

  • MQTT explorer (see hwinfo topic)

image

About

Initially written in Python, but translated to Go with the help of LLMs. Implements metric gathering for Dell Wyse 5070 (temperatures) and other generic metrics like CPU, RAM, memory, network. These metrics are then reported to the MQTT broker. Perfect fit, if you have HA instance running in the VM and you want to monitor host machine health.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published