Enabling Logging of SNMP Trap Transmissions

To know which alarms have been sent as traps to the SNMP manager, you can configure the automatic creation of log files, where the time at which traps were sent and the details of the traps are logged. To enable logging for the SNMP trap transmissions, do the following:

  1. Edit the eg_services.ini file in the <EG_INSTALL_DIR>\manager\config directory.
  2. In the [MISC_ARGS] section of that file, set the SnmpTrapLogsEnabled flag to Yes and save the file. Once this is done, a log file named <IP_address_of_SNMP_manager>_snmptrap_log will be automatically created in the <EG_INSTALL_DIR>\manager\logs directory on the eG manager host.
  3. By default, the eG manager will keep writing to the <IP_address_of_SNMP_manager>_snmptrap_log file, until the size of the log file grows up to 2 MB. As soon as the log file size crosses 2 MB, the manager will automatically copy the contents of the <IP_address_of_SNMP_manager>_snmptrap_log file to a new <IP_address_of_SNMP_manager>_snmptrap_log.1 file, and will then continue writing newer logs to the original <IP_address_of_SNMP_manager>_snmptrap_log. This default behavior is governed by the SnmpTrapLogMaxRollSize parameter in the eg_services.ini file. By default, this parameter is set to 2, which represents 2 MB. If you want the log file rotation to occur much sooner or later, then set the SnmpTrapLogMaxRollSize parameter accordingly. For instance, if you want the eG manager to wait until the size of the <IP_address_of_SNMP_manager>_snmptrap_log file becomes 4 MB to copy its contents to the <IP_address_of_SNMP_manager>_snmptrap_log.1 file, then, set the SnmpTrapLogMaxRollSize to 4, and save the file.
  4. By default, the eG manager will continue to rotate the log files (as described in step 3 above) until a maximum of 10 log files are created. After this point, the last log file created (i.e., <IP_address_of_SNMP_manager>_snmptrap_log.9 file, by default), will be deleted, as it contains the oldest logs. This default behavior is governed by the SnmpTrap_log_max_files parameter in the eg_services.ini file. This parameter is set to 10 by default. If you want the roll over to occur much sooner or later, then change the value of this parameter accordingly. For instance, if you want the log files to roll over only if the total number of log files created crosses 20, then set the SnmpTrap_log_max_files  parameter to 20, and save the file.