Zabbix & Nagios in LXC

IndyJ

Member
May 3, 2019
8
0
21
I'm trying to get Nagios and Zabbix running within LXC containers. Ping tests initiated by these monitoring systems don't seem to be working when running inside LXC. Manually ping from the command line works fine. Does anyone know a workaround?

The products work fine in KVM/Qemu.
 
Hi.

Ping tests initiated by these monitoring systems don't seem to be working when running inside LXC.

Could it be possible that you have firewall enabled for the containers? Does it work if you try `ServerActive` in the Zabbix agent configuration? If yes, it is likely a networking/firewall problem.
 
Hi.



Could it be possible that you have firewall enabled for the containers? Does it work if you try `ServerActive` in the Zabbix agent configuration? If yes, it is likely a networking/firewall problem.


Thanks for the reply. The containers are not firewalled, and I can manually ping other systems from these LXC containers using the shell (command line). The issues seem to arise when the command is initiated by zabbix or nagios.
 
Can you check if `ping` can be run by the zabbix user? You might need to set the permissions and capabilities on the binary if they're not set correctly, or give zabbix user sudo permissions on the binary.
 
Can you check if `ping` can be run by the zabbix user? You might need to set the permissions and capabilities on the binary if they're not set correctly, or give zabbix user sudo permissions on the binary.

following the line of thought regarding permissions I changed the apps to run as root, then opened up permissions on the system tools and nagios and zabbix files. The issue still exists. The issue seems to be *isolated* to LXC containers as both apps *with default permissions* work fine in a KVM VM.
 
Hmm. You are trying to run zabbix agent on lxc correct?
I can't really think of any causes to your problem. Maybe it's a good idea to check the zabbix/nagios logs. Could be that some component of the software isn't working as expected.

Can you also post a sample config of the LXC containers you're using? (`pct config CTID`)
That way, I can try to reproduce the issue and possibly provide a fix or a workaround.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!