How to install APK packages?

I have HA OS running inside a virtual machine and would like to install inetd (part of busybox-extras) with the appropriate inetd.conf file and an additional line to /etc/services to be able to easily monitor my VM and all of its dockers with Checkmk. I noticed packages don’t survive a reboot. I then tested addons, but addons are running in dockers, making it harder to get the relevant information (I get the info from the docker itself rather than from the host).

Then haos is probably not for you.

And why is that? I just want to monitor my Home Assistant VM, it’s not like I want anything crazy…

haos appears to be designed for users as a ‘set it and forget it’ thing; not to be tampered with, modified or otherwise.

You can install home assistant supervised into your own linux install if you want to do extra stuff like this

haos is probably trying to ‘protect’ itself from unknown changes

@CountParadox is correct.

You can install an apk more or less permanently by using the web terminal & ssh addon. Then it gets installed on every ha start. Similarly with a script.

There is an effort to produce an addon here, but you’ll need to adapt. Checkmk 2.0 network monitoring add-on WIP

Is there an existing docker image that does what you want? Or are you comfortable making one? If so make an addon. You can install any APK you want in an addon, configure it and run it.

I doubt a docker image would do, as it would need access to the host system to get the output of commands such as docker ps to get info about all the other containers.

The glances addon gets info about all the docker containers on the system, maybe take a look how they do it.

Thanks for the link. It is however for a checkmk server, I’m just looking to run an agent, which is literally one single bash script. I just realized that I can run the script through ssh tunneling so no need to install inetd or anything, I will find a way.

That should be doable! You got example code?

I just tested with the bash script (this one: https://github.com/tribe29/checkmk/blob/4b64dd47fa2969d297ebc24225179f10b88314c4/agents/check_mk_agent.linux) in /share, it doesn’t get deleted, I then launch it with ssh -T root@homeassistant /share/check_mk_agent and it works. I might have to toy around a little bit to get extra information but I’m able to get the basics. It does seem like ssh is running from within a container as well however? I’ll see what I can do.

Yes, all addons are docker containers, including ssh.

There are 2 ssh addons in fact, the more capable one is web terminal & ssh. In it you can turn off protection mode, and then run docker from inside the container.

You can find all the addon configuration options here:

You can request pretty much any access to the host you need. Supervisor itself runs in a docker container for reference and it has no issues changing settings on the host, stopping and starting containers, pulling and removing images, monitoring host and containers, etc.

You can actually get access to the host os but i think you’ll be disappointed. The actual host os has a read only file system and no way to install any new packages. If you’re going to run some custom software in a HAOS system then it needs to be an addon.