Building a jumphost using the Zabbix API and Python
A lot of organizations have a jumphost (sometimes referred to as a bastion host) to access servers, switches, and their other equipment from a host. A jumphost generally has all the firewall rules needed to access everything important. Now if we keep our monitoring up to date, we should have every single host in there as well.
My friend, ex-colleague, and fellow Zabbix geek, Yadvir Singh, had the amazing idea to create a Python script to export all Zabbix hosts with their IPs to the /etc/hosts
file on another Linux host. Let's see how we can build a jumphost just like his.
Getting ready
We are going to need a new host for this recipe with Linux installed and ready. We'll call this host lar-book-jump
. We will also need our Zabbix server, for which I'll use lar-book-centos
.
Also, it is important to navigate to Yadvir's GitHub account, drop him a follow, and star his repository if you think this is a cool...