Home Assistant: Monitor Proxmox with Glances

If you are running Home Assistant OS (HAOS) as a VM on Promox, you may want to display the hardware sensor data (CPU load, CPU temp, disk utilization, etc.) of your Promox host inside Home Assistant. To do this we will install the Glances server on the Proxmox host, then use the Home Assistant integration to pull in that data so we can view it.

If you install the Glances add-on inside the HAOS VM, it won’t have access to the physical hardware sensors. So that’s why we are installing Glances on the Promox server itself and just use the Glances Integration to pull in the data.

Note: There is a Proxmox Integration in Home Assistant. This is complimentary to the Glances Integration. The Promox integration doesn’t display all the CPU temperature sensors and a number of other sensors, but it does show VMs, LXC containers, etc. So I recommend using both. 

Glances Installation

1. In the Proxmox web UI click on your physical server in the left pane, then click on Shell in the middle pane. Enter the following command:

				
					curl -L https://bit.ly/glances | /bin/bash
				
			

2. Wait a minute or two for everything to install. Then start Glances with the following command:

				
					glances -w --username --password
				
			

3. Enter a username and password for the Glances service. Answer Yes to save the password. Press CTRL-C to stop the Glances service. Write down this password as Glances saves it in config file.

4. Run the following command:

				
					nano /etc/systemd/system/glances.service
				
			

5. Copy and paste the following text into nano:

				
					console.log( 'Code is Poetry' );[Unit]
Description=Glances
After=network.target

[Service]
ExecStart=/usr/local/bin/glances -w
Restart=on-abort
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
				
			

6. Press CTRL-X to exit and Y to save. Run the following command to make a symlink.

				
					systemctl enable glances.service
				
			

7. Now we can start the service:

				
					systemctl start glances.service
				
			

8. Go to Home Assistant Settings -> Devices & Services and click on Add Integration. Search for Glances.

9. On the configuration screen enter the IP address of your Promox server, and the username/password that you configured earlier. Leave the rest of the settings at the default values. Click Submit. If all goes well you will get a prompt for selecting the area.

10. Click FINISH.

11. If you go to the Integrations page you can click on the Device and see the default sensors card with all the sensor and their status.

12. This is just a sample of the built-in sensors. You can of course then customize your card to show whatever sensors you want.

Summary

Installing Glances on your Proxmox host allows your Home Assistant server to monitor the hardware health of the host server. Installation is a little tedious, but not too difficult. This allows your Home Assistant dashboard to show a plethora of sensor data such as CPU temperature, storage utilization and more. 

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Scroll to Top