Sybase CEP Server Monitoring with SNMP Traps

Sybase CEP Server supports a highly customizable SDK solution, including the Sybase CEP Server Plugin SDK and a command line Sybase CEP Server plugin that uses the SDK.

With these features, you can configure the command-line plugin to use the Net-SNMP snmptrap tool to generate SNMP traps on various Sybase CEP Server events. To configure SNMP traps:

  1. Install Sybase's custom Management Information Base (MIB) for use with your Net-SNMP tools. You can do this using several methods, one of which is described here:
    1. Copy the C8-SERVER-STATUS-MIB.txt file from the Sybase CEP Server conf directory to the NET-SNMP-install-directory /share/snmp/mibs/ folder, where NET-SNMP-install-directory is the directory where NET-SNMP is installed.
    2. Add the following line to NET-SNMP-install-directory /etc/snmp/snmp.conf:
      mibs +C8-SERVER-STATUS-MIB
      
  2. Open the c8-server.conf file and remove the marks from the line that lists the c8-server-snmp.conf file.
  3. Open the c8-server-snmp.conf file and modify the "SNMP_ManagerEvent1" section, as described in the next step. For an additional trap on an event, make a copy of the "SNMP_ManagerEvent1" section inside the file, assign it a unique name, then modify the new section.
  4. Set the following preferences in the section you have identified or created in the previous step:
    1. Set the "MessageGroup" and "MessageName" preferences to a valid Sybase CEP Server message group and message name, respectively.

      For a list of valid Sybase CEP Server groups and messages, see the comments in the c8-server-snmp.conf file or "Sybase CEP Server Events".

      You can configure a single preferences section to handle only one type of Sybase CEP Server event. If you need to send traps on multiple Sybase CEP Server events, duplicate the section, give each copy a new unique name, and configure each copy to handle a different event. The number of sections in your configuration file should be the same as the number of events for which you want to generate SNMP traps.

    2. Set the "CommandName" preference to the full path of the snmptrap command line tool from Net-SNMP.
      For example:
      
      		C:\Windows\System32\snmptrap.exe
      
    3. Set the "CommandArgument5" preference to the name of the SNMP community to which you want to send the trap.

      Most of the time this name will be set to either to public or to sybasec8 .

    4. Set the "CommandArgument6" preference to the host name where the snmptrapd trap daemon receiver is running.

      While testing the SNMP trap features, set this preference to the local host name.

    5. Set the "CormmandArgument8" preferences to the host name of the Manager or Container from which the trap is sent.

To test whether traps are sent properly, you may configure the Net-SNMP's snmptrapd daemon to receive traps. The simplest way to do this is to use the following command on the machine configured to receive the traps:

snmptrapd -Lo -F "\n\n%W(%w) TRAP RECIEVED FROM 
   %A(%a)\nEPOCH:%t\nVALUES:\n%V\n%v\n"

For more information about SNMP traps, see the c8-server-snmp.conf file.