Is it possible, in some way, from inside a container and a vm, to determine, which host it's running on?
I'm using Zabbix as a monitoring tool and it would be nice to be able to quickly identify on which host one should look, directly in the alerts from Zabbix.
I'm currently using a terrible, terrible hack, which only works inside a Debian/Ubuntu-based container, where I parse a value from "/proc/asound/oss/sndstat" with the locally installed zabbix-agent . (system.run[sed -n '2p' /proc/asound/oss/sndstat| awk '{print $3}']).
This returns the hosts hostname, which is used to populate an inventory field in Zabbix.
This is not nice and doesn't work in VM.
I'm currently using PVE4 (due for upgrade), PVE5 and a test PVE6, planning on consolidating on PVE6 some time soon.
Any suggestions?
Regards
I'm using Zabbix as a monitoring tool and it would be nice to be able to quickly identify on which host one should look, directly in the alerts from Zabbix.
I'm currently using a terrible, terrible hack, which only works inside a Debian/Ubuntu-based container, where I parse a value from "/proc/asound/oss/sndstat" with the locally installed zabbix-agent . (system.run[sed -n '2p' /proc/asound/oss/sndstat| awk '{print $3}']).
This returns the hosts hostname, which is used to populate an inventory field in Zabbix.
This is not nice and doesn't work in VM.
I'm currently using PVE4 (due for upgrade), PVE5 and a test PVE6, planning on consolidating on PVE6 some time soon.
Any suggestions?
Regards