Setup SNMP Hosts in Zabbix
In this next few lectures we will look at SNMP
SNMP stands for Simple Network Management Protocol.
Common devices that support SNMP are routers, switches, printers, servers, workstations and other devices found on IP networks.
Not every network device supports SNMP, or has it enabled, and there is a good chance you don't have an SNMP enabled device available that you can use in this lecture.
So, in this next few lectures, I will demonstrate setting up SNMP on several different operating systems and also on a Cisco switch.
We will set up Zabbix to query using OIDs first. We will manually create a few sample SNMP items. Then demonstrate setup and querying with MIB descriptions. MIB stands for Management Information Base. And then use LLD to discover new SNMP devices and automatically configure them in Zabbix. And also automatically create templates for a device from the available SNMP responses.
I SSH onto a server, I will use my new Grafana server, which is an Ubuntu 18, and then I install the SNMP daemon.
I then configure it and set the agent address and the community mycommunity
1 2 3 4 5 6
The SNMP agent by default is only accessible by localhost. I have changed it to be accessible remotely, so I also add a firewall rule to block all IPs other than my Zabbix server.
1 2 3 4
iptables settings will be lost in case of system reboot. You will need to reapply them manually,
This will save your settings into two files called,
Any changes you make to the iptables configuration won't be auto saved to these persistent files, so if you want to update these files with any changes, then use the commands,
iptables-save > /etc/iptables/rules.v4
iptables-save > /etc/iptables/rules.v6
I then SSH onto my Zabbix Server,
I can now query my grafana server using snmpwalk
See the video on how I then setup the host configuration in Zabbix.
In the video, I also set up SNMPD on the Centos 7 VM.
To install SNMPD on centos 7,
See the video for how I configure the /etc/snmp/snmpd.conf file.
On the Centos 7 VM, I also needed to allow connections for UPD 161.
1 2 3