Ad Widget

Collapse

SNMP on alternative port

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mmachado
    Junior Member
    • Apr 2005
    • 4

    #1

    SNMP on alternative port

    How do I change the port Zabbix Server uses to get SNMP values?

    There is a firewall on my way blocking port 161 and I would like to use something else, like 1161. My server is already listening on 1161 and Zabbix is configured like this:


    But I see the Zabbix Server trying to get to the host through the default port:

    Code:
    # tcpdump -ni any port 161 or 1161
    21:49:47.557214 IP 10.180.174.93.40703 > x.x.x.x.snmp:  C=xxxx GetRequest(30)  .1.3.6.1.4.1.2021.4.5.0
    21:50:57.650213 IP 10.180.174.93.36131 > x.x.x.x.snmp:  C=xxxx GetNextRequest(29)  .1.3.6.1.2.1.2.2.1.2
    21:52:07.767935 IP 10.180.174.93.37074 > x.x.x.x.snmp:  C=xxxx GetNextRequest(29)  .1.3.6.1.2.1.2.2.1.2
    It works on the command line:

    Code:
    # snmpwalk -v 2c -On -c xxxx x.x.x.x:1161 IF-MIB::ifIndex.1
    .1.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
    What am I doing wrong? Is it a bug?

    Thanks!

    Zabbix 2.2.0 on Amazon Linux 3.4.68-59.97.amzn1.x86_64
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    You can change the port on the host level (when defining the SNMP connector for that host) or at the (SNMP) template level by specifying a user macro (for example {#SNMP_PORT) and using that on the SNMP items.

    Comment

    Working...