Today I set up Zabbix monitoring of a bunch of boxes. A couple have public IP addresses – the load-balancers – so they were pretty standard. However, most of them are sitting behind a NAT, so are a little trickier. I played around with Zabbix proxy for a while – whose purpose is to solve this exact problem. In the end though, just to be different/awkward, I opted to set up ssh tunnels and just pass the Zabbix traffic through the load-balancer boxes. The Zabbix agent config was fiddly and took a lot of trial and error to get right, so, maybe this will help someone else. First of all, the ssh tunnels. This is the command I used, but you’ll probably want to set up ssh keys and use autossh or some such thing. This is run on the load-balancer box, as it’s acting as a bridge between the public network and the NAT’ed network. ssh -f user@10.0.0.25 -L0.0.0.0:14050:10.0.0.25:10050 -N Breaking this down: -f : Background the ssh process user@10.0.0.25 : these ...
Nhận xét
Đăng nhận xét