It might seem to be a simple task; ping IP.Address.of.switch to see if it is alive but the out of the box configuration of Zabbix will not perform this task. So I searched... and searched... and finally put all the pieces together. Now I am writing a complete guide of all that goes into this setup.
First, you will need to install fping on the box running the Zabbix server
You can check to see if fping is installed with:
If you don't get a version then you will need to install.
For Ubuntu:
Now the permissions need to be set for Zabbix to use it:
Yes I know it is in the manual and now it is here too.
Now check to see that fping works from the Zabbix account.
Next let's get the Switch setup with the SNMP service. (Disclaimer: This is fairly safe but use at your own risk if you don't know what I am taking about here)
The reason you must have SNMP running is you will not be able to setup the switch as a Host in the Hosts panel if the SNMP service is not running.
Telenet or console to your switch and enter the following commands.
You are looking for "SNMP agent enabled"
If you don't find it you will need to set up snmp
Check or if you did find SNMP Enabled, to see if the default Zabbix community is present.
Down toward the bottom you should see "snmp-server community public RO"
Save so that if your power goes out you don't need to do this again:
Check the setup:
From the Zabbix server command line:
Oh yah, that is a bunch of code.
It will stop soon or hit ctrl+c
The important thing is that you have a response.
The switch setup is done.
Side note: I did not see a way to change the Zabbix server to a different SNMP Community. It would be safer from a security standpoint to set up something unique as Public is well known. Hopefully someone will add that bit in the comments
Finally on to the Zabbix Configuration page.
I setup a trigger like this:
Names: {HOSTNAME} Failed to Respond to PING
Expression: {Templates_Swiches:icmpping.last(0)}=0
For the Switch create a Host set to use IP and Port 161
I hope you have enjoyed this post and because it my first please go easy on the flaming.
First, you will need to install fping on the box running the Zabbix server
You can check to see if fping is installed with:
Code:
$sudo fping -v fping: Version 2.4b2_to $Date: 2002/01/16 00:33:42
For Ubuntu:
Code:
$sudo apt-get install fping
Code:
$chown root:zabbix /usr/sbin/fping $chmod 710 /usr/sbin/fping $chmod ug+s /usr/sbin/fping
Now check to see that fping works from the Zabbix account.
Code:
$/usr/sbin$ su zabbix Password: $/usr/sbin$ fping ip.of.your.switch ip.of.your.switch is alive
Next let's get the Switch setup with the SNMP service. (Disclaimer: This is fairly safe but use at your own risk if you don't know what I am taking about here)
The reason you must have SNMP running is you will not be able to setup the switch as a Host in the Hosts panel if the SNMP service is not running.
Telenet or console to your switch and enter the following commands.
Code:
$en Password: $show snmp
If you don't find it you will need to set up snmp
Code:
$config t $snmp-server community public RO $exit
Code:
$show run
Save so that if your power goes out you don't need to do this again:
Code:
$write memory
From the Zabbix server command line:
Code:
$snmpwalk -v 1 -c public ip.of.your.switch
It will stop soon or hit ctrl+cThe important thing is that you have a response.
The switch setup is done.
Side note: I did not see a way to change the Zabbix server to a different SNMP Community. It would be safer from a security standpoint to set up something unique as Public is well known. Hopefully someone will add that bit in the comments

Finally on to the Zabbix Configuration page.
I setup a trigger like this:
Names: {HOSTNAME} Failed to Respond to PING
Expression: {Templates_Swiches:icmpping.last(0)}=0
For the Switch create a Host set to use IP and Port 161
I hope you have enjoyed this post and because it my first please go easy on the flaming.
Comment