Need guidance while developing an add-on: Prometheus Node Exporter

I run Home Assistant in a KVM on Proxmox. On a different KVM, I also run a Prometheus server. If you’re not aware, Prometheus is an industry-standard way to gather metrics from remote servers into one time-series database. You can use this data to monitor/graph/alert on problems with your servers.

Every one of my KVMs runs Prometheus Node Exporter. Node exporter creates an HTTP page on every KVM at http://server_ip:9100/metrics, which allows the Prometheus server to scrape Linux OS and hardware metrics at a specified interval.

My issue is, Home Assistant doesn’t support Prometheus Node Exporter, it only supports Prometheus exporting sensor/entity data, but I want to publish data about the host KVM (e.g., CPU/Memory/Disk), not my sensors/entities.

I have created a very rudimentary local add-on that works to publish my KVM host’s metrics at http://server_ip:9100/metrics. However, I’m not a seasoned HA developer, and would like someone to look at this code. Especially considering the add-on requires privileged, unprotected access to everything on the host.

Is this forum the right place to post this request? I thought about contacting @frenck to include this the official Prometheus integration, since it would be just publishing some addition metrics, but he seems very busy. I also considered the Edge Add-ons repository, but they are apparently not accepting new add-ons. Should I contact someone at HACS, or is there someone here who can assist me?

Thanks in advance!

First define what is add on and what is integration;

  • Integration is a way of creating a communication mechanism for a specific device/brand. They are pure python and home assistant executes these python codes internally. They are expected to access external APIs. They create sensors, entities and devices inside home assistant.
  • HACS is a custom integration repository. There are core integrations which come by with HA itself and there are custom integrations which you can install via HACS or manually copying files into a folder. These custom integrations are PROBABLY not ready to be included into core in terms of code quality or some other criteria.
  • add on is basically a docker instance running next to HA and controlled through supervisor. There is usually an integration which communicates with add on or add ons might publish their sensor data to HA through MQTT discovery. But not all add-ons are about sensors, they can be totally independent to HA without supplying any sensor information to HA.
  • you can create your own add on, your own custom integration or core integration maintained by you.

I don’t know what suit best to you :slight_smile: