Filtering values by originating host

We figured out how to get values in specific items, but how did Zabbix know that it should place these values in A test host? This happens because the address of the host that the trap came from matches the address in the SNMP interface for these items. To test this, let's copy the trap items to Another host:

  1. Navigate to Configuration | Hosts and click on Items next to A test host
  2. Mark the checkboxes next to both SNMP trap items and click on the Copy button
  3. Choose Hosts from the Target type drop-down menu and mark the checkbox next to Another host
  1. Click on Copy

If you added an SNMP interface to Another host earlier, this operation might succeed.

It looks like that failed, and Zabbix complains that it can not find an interface. Another host did not have an SNMP interface; hence, these items can not be attached to any interface at all:

  1. Go to Configuration | Hosts and click on Another host
  2. Add a new SNMP interface with the address that this host has and click on Update
  3. Try to copy the SNMP trap items from A test host to Another host the same way as done previously, and it should succeed now

With the items in place, let's test them. Send two test traps from Another host, the same way we sent them from the Zabbix server before:

$ snmptrap -Ci -v 2c -c public <Zabbix server> "" "NET-SNMP-MIB::netSnmpExperimental" NET-SNMP-MIB::netSnmpExperimental s "test"
$ snmptrap -Ci -v 2c -c public <Zabbix server> "" "NET-SNMP-MIB::netSnmpExperimental" NET-SNMP-MIB::netSnmpExperimental s "some other trap"  

Replace <Zabbix server> with the IP or DNS name of the Zabbix server. These commands should complete without any error messages.

The traps should be placed properly in the items on Another host.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.81.240