ADC

Configuring the NetScaler to generate SNMP traps

You can configure the NetScaler appliance to generate asynchronous events, which are called traps. The traps are generated whenever there are abnormal conditions on the appliance. The traps are sent to a remote device called a trap listener. It helps administrators monitor the appliance and respond promptly to any issues.

The NetScaler appliance provides a set of condition entities called SNMP alarms. When the condition in any SNMP alarm is met, the appliance generates SNMP trap messages that are sent to the configured trap listeners. For example, when the LOGIN-FAILURE alarm is enabled, a trap message is generated and sent to the trap listener whenever there is a login failure on the appliance.

To configure the NetScaler appliance to generate traps, you need to enable and configure alarms. Then, you specify the trap listeners to which the appliance sends the generated trap messages.

Enabling an SNMP alarm

The NetScaler appliance generates traps only for SNMP alarms that are enabled. Some alarms are enabled by default, but you can disable them.

When you enable an SNMP alarm, the appliance generates corresponding trap messages when some events occur. Some alarms are enabled by default.

To enable an SNMP alarm by using the CLI

At the command prompt, type the following commands to set the parameters and verify the configuration:

  • enable snmp alarm <trapName>
  • show snmp alarm <trapName>

To enable an SNMP alarm by using the GUI

  1. Navigate to System > SNMP > Alarms, and select the alarm.
  2. Click Actions and select Enable.

Configuring alarms

The NetScaler appliance provides a set of condition entities called SNMP alarms. When the condition set for an SNMP alarm is met, the appliance generates SNMP traps messages that are sent to the configured trap listeners. For example, when the LOGIN-FAILURE alarm is enabled, a trap message is generated and sent to the trap listener whenever there is a login failure on the appliance.

You can assign an SNMP alarm with a severity level. When you do this, the corresponding trap messages are assigned that severity level.

The following are the severity levels, defined on the appliance, in decreasing order of severity.

  • Critical
  • Major
  • Minor
  • Warning
  • Informational

For example, if you set a warning severity level for the SNMP alarm named LOGIN-FAILURE, the trap messages generated when there is a login failure is assigned with the warning severity level.

Note

NetScaler supports various SNMP alarms. For more information, see SNMP alarms.

You can also configure an SNMP alarm to log the corresponding trap messages generated whenever the condition on that alarm is met.

To configure an SNMP alarm by using the CLI

At the command prompt, type the following commands to configure an SNMP alarm and verify the configuration:

  • set snmp alarm <trapName> [-thresholdValue <positive_integer> [-normalValue <positive_integer>]] [-time <secs>] [-state ( ENABLED | DISABLED )] [-severity <severity>] [-logging ( ENABLED | DISABLED )]
  • show snmp alarm <trapName>

Where,

ThresholdValue: Value for the high threshold. The NetScaler appliance generates an SNMP trap message when the value of the attribute associated with the alarm is greater than or equal to the specified high threshold value.

NormalValue: Value for the normal threshold. A trap message is generated if the value of the respective attribute falls to or below this value after exceeding the high threshold.

To configure SNMP alarms by using the GUI

Navigate to System > SNMP > Alarms, select an alarm, and configure the alarm parameters.

Configuring SNMPv1 or SNMPv2 traps

After configuring the alarms, you need to specify the trap listener to which the appliance sends the trap messages. Apart from specifying parameters such as IP or IPv6 address and the destination port of the trap listener, you can specify the type of trap (either generic or specific) and the SNMP version.

You can configure a maximum of 20 trap listeners for receiving either generic or specific traps.

You can also configure the appliance to send SNMP trap messages with a source IP address other than the NetScaler IP (NSIP or NSIP6) address to a particular trap listener. For a trap listener that has an IPv4 address, you can set the source IP to either a mapped IP (MIP) address or a subnet IP (SNIP) address configured on the appliance. For a trap listener that has an IPv6 address, you can set the source IP to a subnet IPv6 (SNIP6) address configured on the appliance.

You can also configure the appliance to send trap messages to a trap listener based on a severity level. For example, if you set the severity level as Minor for a trap listener, all trap messages of the severity level equal to or greater than Minor (Minor, Major, and Critical) are sent to the trap listener.

If you have defined a community string for the trap listener, you must also specify a community string for each trap that is to be sent to the listener. A trap listener for which a community string has been defined accepts only trap messages that include a community string matching the community string defined in the trap listener. Other trap messages are dropped.

To add an SNMP trap by using the CLI

At the command prompt, type the following commands to set the parameters and verify the configuration:

  • add snmp trap <trapClass> <trapDestination> -version ( V1 | V2 ) -destPort <port> -communityName <string> -srcIP <ip_addr> -severity <severity>
  • show snmp trap

Example:

> `add snmp trap specific 192.0.2.10 -version V2 -destPort 162 -communityName com1 -severity Major`
<!--NeedCopy-->

To configure SNMP traps by using the GUI

Navigate to System > SNMP > Traps, and create the SNMP trap.

Configuring SNMPv3 traps

SNMPv3 provides security capabilities such as authentication and encryption by using the credentials of SNMP users. An SNMP manager can receive SNMPv3 trap messages only if its configuration includes the password assigned to the SNMP user.

The trap destination can now receive SNMPv1, SNMPv2, and SNMPv3 trap messages.

To configure an SNMPv3 trap by using the CLI

At the command prompt, do the following:

  1. Add an SNMPv3 trap.

    add snmp trap <trapClass> <trapDestination> -version ( V1 | V2 | V3) -destPort <port> -communityName <string> -srcIP <ip_addr> -severity <severity>

    Note

    Once set, the SNMP trap version cannot be modified.

    Example

    > add snmp trap specific 192.0.2.10 -version V3 -destPort 162 -communityName com1 -severity Major
    <!--NeedCopy-->
    
  2. Add an SNMP user.

    add snmp user <name> -group <string> [ -authType ( MD5 | SHA ) { -authPasswd } [-privType ( DES | AES ) { -privPasswd }]]

    Example

    > add snmp user edocs_user -group edocs_group
    <!--NeedCopy-->
    
  3. Bind the SNMPv3 trap to the SNMP user.

bind snmp trap <trapClass> <trapDestination> [-version <version>] (-userName <string> [-securityLevel <securityLevel>])

Example

    > bind snmp trap specific 192.0.2.10 -version V3 -userName edocs_user -securityLevel authPriv
<!--NeedCopy-->

To configure an SNMPv3 trap by using the GUI

  1. Add an SNMPv3 trap.

    Navigate to System > SNMP > Traps, and create the SNMP trap by selecting V3 as the SNMP version.

  2. Add an SNMP user.

    Navigate to System > SNMP > Users and create the SNMP user.

  3. Bind the SNMPv3 trap to the SNMP user.

    • Navigate to System > SNMP > Traps, and select the SNMP version 3 trap.
    • Select the user to which the trap should be bound and define the appropriate Security Level.

SNMP trap logging

A NetScaler appliance can log SNMP trap messages (for SNMP alarms in which logging capability is enabled) when you enable the SNMP trap logging option and at least one trap listener is configured on the appliance. Now, you can specify the audit log level of trap messages sent to an external log server. The default log level is Informational. Possible values are Emergency, Alert, Critical, Error, Warning, Debug, and Notice.

For example, you can set the audit log level to Critical for an SNMP trap message generated by a logon failure. That information is then available on the NSLOG or SYSLOG server for troubleshooting.

To enable SNMP trap logging and configure trap log level by using the CLI

At the command prompt, type the following commands to configure SNMP trap logging and verify the configuration:

  • set snmp option [-snmpTrapLogging (ENABLED | DISABLED)][-snmpTrapLoggingLevel <snmpTrapLoggingLevel>]
  • show snmp option

To enable SNMP trap logging and configure SNMP trap log level by using the GUI

Navigate to System > SNMP, click Change SNMP Options, and set the following parameters:

  1. SNMP Trap Logging—Select this check box to enable SNMP trap logging when at least one trap listener is configured on the appliance.
  2. SNMP Trap Logging Level—Select an audit log level for the SNMP trap. By default, the audit level for an SNMP trap is set to “Informational.”
Configuring the NetScaler to generate SNMP traps