Configure SNMP Traps : Zabbix 6 LTS

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024
  • Zabbix Course : sbcode.net/zab...
    Course Coupons : sbcode.net/cou...
    I setup and demonstrate SNMP traps with Zabbix 6.
    Receiving SNMP traps is the opposite of querying SNMP devices.
    Information is sent from an SNMP device and is collected or "trapped" by Zabbix.
    SNMP Traps are sent to the server on port 162 (as opposed to port 161 on the agent side that is used for queries).
    So port 162 will need to be allowed on the Zabbix Server or Proxy, which ever will receive the SNMP traps.
    For SNMP Traps to work, you need to configure some settings for either the Zabbix Server, or Zabbix Proxy.
    Open zabbix_server.conf or zabbix_proxy.conf
    And add/edit,
    SNMPTrapperFile=/tmp/zabbix_traps.tmp
    StartSNMPTrapper=1
    Restart the Zabbix Server or Proxy
    Download zabbix_trap_receiver.pl, save it into the /usr/bin folder and give it execute permissions.
    Install and configure snmptrapd.
    snmptrapd is an SNMP application that receives and logs SNMP TRAP and INFORM messages.
    Restart snmptrapd
    Test some example snmptraps from various hosts.
    I also demonstrate configuring and receiving traps my cisco switch.
    The SNMP device, will send a snmptrap to the IP address configured. That IP should have the snmptrapd process running on it. It will be listening on port 162 by default. The firewall should not be blocking the snmp device from sending to it on that port. When the snmptrapd process receives a new trap message, it passes it to the zabbix_trap_receiver.pl script, which will reformat it, and save it into the folder. The zabbix proxy or server, will read it from that folder, and if the ip address or hostname matches a configured host than it will by default appear in the hosts snmp trap fallback item on the Zabbix server.
    The host configuration on the Zabbix server should be configured with an SNMP interface and 1 or more snmptrap items.
    #snmp
    #zabbix
    #zabbix6
    #snmptrapd
    #zabbixProxy
    #zabbixSnmpTraps
    #zabbixCourse
    #zabbixTutorial

ความคิดเห็น •