Setting up SNMP in Gateway 11
search cancel

Setting up SNMP in Gateway 11

book

Article ID: 280506

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

How to configure SNMP in Gateway 11 to connect with external monitors?

Environment

API Gateway 11

Resolution

The SNMP in Gateway is configured to listen to the local host by default. The following instructions will help to configure SNMP for the external monitor to connect to the Gateway.

  1. Edit /etc/sysconfig/iptables and uncomment the following lines
    • # SNMP Rules
      [0:0] -A INPUT -i ssg_eth0 -p tcp -m tcp --dport 161 -j ACCEPT
      [0:0] -A INPUT -i ssg_eth0 -p udp -m udp --dport 161 -j ACCEPT
  2. Edit /etc/hosts.allow file and set snmpd to listen to all hosts
    • snmpd: ALL
  3. Edit /etc/snmp/snmpd.conf file for following chages
    • Disable agentaddress by adding # at the start of the line
      • # agentaddress 127.0.0.1
    • Set rocommunity for listening to all hosts
      • rocommunity l7
  4. Edit /etc/systemd/system/snmpd.service.d/overrides.conf file
    • replace -Lsd with -LS0-6d

After the above changes, reboot the server for the change to take effect. Once the server is up, try the following SNMP commands to verify:

snmpwalk -v 1 -Ou localhost -c l7 1

snmpwalk -v 1 -Ou <GatewayHostName> -c l7 1

Additional Information

  • The agentaddress property in /etc/snmp/snmpd.conf file helps to configure the IP address for the SNMP to listen. The default setting allows to listen only local host. You can replace the local host IP with the Gateway server IP or you can disable this property and that allows all IP addresses on the Gateway server.
  • SNMP v3 does not use communities so this configuration will not work for SNMP v3. It works for SNMP v1 and v2c.
  • For Gateway version below 11, please use this KB