Skip to main content
Skip table of contents

Configuring SNMP notifications

Configuring notifications

These notifications are configurable system events that can be used to generate traps and alert an NMS in case action is required.

The general syntax for configuring notifications:

Notification configuration syntax

BASH
% set system notifications notification-type enable boolean monitor-interval seconds destination snmp-trap
% set system notifications notification-type threshold-config xx boundary-type type value yy
% commit
ParameterDescription
​notification-type

See details below. Valid values:

  • interface-link port: port interface-link events
  • cpu-utilization: CPU utilization thresholds
  • disk-utilization: disk utilization thresholds
  • memory-utilization: memory utilization thresholds
monitor-interval

Interval between checks for the trap conditions, in seconds.​

Note: Lower values require CPU cycles to keep checking the condition. A typical interval is 5 or 10 minutes (300 or 600 seconds).

threshold-configAn identifying number. Must be unique (for notification types that allow more than one monitored threshold) and numerical.
boundary-typeValid values: upper, lower. Whether the trap should trigger when the watched value goes above or below the threshold value.
valueThe threshold to watch; see specific notification type for details.

Interface link state change

Link state change notifications generate a trap when an ethernet port transitions from up to down or down to up and the state change lasts longer than 5 seconds.

Example

BASH
% set system notifications interface-link port enable true destination snmp-trap,syslog
% commit

For the private/management port (ethernet0), the LinkUp trap only appears when the port goes down and then transitions to up; the LinkDown trap may get lost with no port to send it on. 

For the public interface (ethernet1), both state transitions appear. 

Note that interface link up/down notifications for both ports are generated for syslog also, if the gateway's localhost is configured for syslog. See Sending traps to a syslog server.

Link state traps contain (from the ifTable.ifEntry):

  • ifIndex: a unique value greater than 0 for each interface
  • ifAdminStatus: the desired state of the interface
  • ifOperStatus: the current operational state of the interface

Disk utilization 

Disk utilization notifications monitor available disk space and generate a trap when the available disk space falls below configured criteria.

These commands show that this Blue Cedar Connect Gateway has a ~56G disk with 50% in use:

Sample disk info

BASH
> show status operational context default system-operational info disk-size
disk-size "(atlas) 55.9G,  (core) 2.0G";
> show status operational context default system-operational info disk-utilization 
disk-utilization "(atlas) 50%,  (core) 2%";

You can also retrieve this information via an external SNMP command, assuming you have configured an SNMP "listen" port as described on Configuring SNMP for gateway monitoring:

Sample disk info

BASH
$ snmptable -v 2c -c gateway_public udp:192.168.77.131:161 dskTable

This example configuration generates a trap if disk utilization is less than (drops lower than) 52% free/available. With the above data, this configuration results in a "Disk space warning error", as our example has only 50% of the disk available.

Disk utilization trap example

BASH
% set system notifications disk-utilization enable true monitor-interval 60 destination snmp-trap
% set system notifications disk-utilization threshold-config 1 boundary-type lower value 52
% commit

Note : This example trap fires when disk utilization drops lower than 52% available. It does not reset/refire unless disk utilization exceeds 52% and then drops below 52% again.

Disk utilization traps include (from the dskTable entries):

EntryDescription
dskPathPath where the disk is mounted
dskDevicePath of the device for the partition
dskPercentPercentage of space used on the disk
dskErrorMsgError flag signaling that the disk or partition is under the minimum required space configured for it.

CPU utilization

CPU Utilization notifications monitor CPU use and can generate traps based on up to four configured thresholds. You could configure notifications when CPU utilization exceeds a certain percentage and then again when CPU utilization drops below a certain percentage. You could define up to four thresholds to see if CPU utilization is increasing, for example, at 20%, 40%, 60%, and 80%. The threshold value is a percentage of CPU utilization.

This example configuration generates notifications when CPU utilization exceeds 20% and when utilization drops below 20% again.

CPU utilization trap example

BASH
% set system notifications cpu-utilization enable true monitor-interval 60 destination snmp-trap
% set system notifications cpu-utilization threshold-config 1 boundary-type lower value 20
% set system notifications cpu-utilization threshold-config 2 boundary-type upper value 20
% commit

If you are using more than one threshold, the threshold-config is an identifier (no particular order) for each item in the list of notifications. These list items must be numeric and unique to create different notification entries. 

CPU utilization traps include:

EntryDescription
​mteHotTrigger​The name of the trigger indicating the nature of the trap. For this example, the string CPULoadAlarm(>20) appears when utilization exceeds 20%, and CPULoadAlarm(<20) appears when utilization drops.
hrProcessorLoadAverage CPU utilization over the monitor interval of the time this processor was not idle. This value indicates why the trap was triggered. For this example, CPULoadAlarm(>20) would have an hrProcessorLoad value of an integer larger than 20.

Memory utilization

Memory Utilization notifications monitor memory use and can generate traps based on up to four configured thresholds. You could configure notifications when memory utilization exceeds a certain percentage and then again when memory utilization drops below a certain percentage. The threshold value is a percentage of the system's total memory.

This example configuration generates notifications when a user is concerned with a possible memory leak.

Memory utilization trap example

BASH
% set system notifications memory-utilization enable true monitor-interval 30 destination snmp-trap
% set system notifications memory-utilization threshold-config 1 boundary-type upper value 80
% set system notifications memory-utilization threshold-config 2 boundary-type lower value 75
% set system notifications memory-utilization threshold-config 3 boundary-type lower value 50
% set system notifications memory-utilization threshold-config 4 boundary-type lower value 25
% commit

In this example, assume the gateway has 8 GB memory. Traps are generated in the following cases (in the order committed above).

  • Threshold entry 1, boundary-type upper, value 80: generates a trap in the case where > 80% of memory is available/free (specifically > 6531779 KB)
  • Threshold entry 2, boundary-type lower, value 75: this generates a trap in the case where < 75% of memory is available/free (specifically < 6123543 KB)
  • Threshold entry 3, boundary-type lower, value 50 - this generates a trap in the case where < 50% of memory is available/free (specifically < 4082362 KB)
  • Threshold entry 4, boundary-type lower, value 25 - this generates a trap in the case where < 25% of memory is available/free (specifically < 2041181 KB)

For this configuration, if a memory leak was happening, you would typically see traps #2, 3, 4 above trigger. If it is a memory spike, trap 1 triggers as things return to normal.

Memory utilization traps include:

EntryDescription
​mteHotTrigger​The name of the trigger indicating the nature of the trap. For threshold 3 here, the string MemFreeTotal(<4082362).
MemTotalFreeTotal amount of free/available memory on this host.
MemTotalRealTotal amount of real/physical memory installed on this host.

Sending traps to a syslog server

To send SNMP traps as syslogs to a syslog server (or an NMS that can handle both), you need to configure an SNMP target entry and configure a syslog server on the Blue Cedar Connect Gateway.

Configure an SNMP target entry

As covered in Configuring SNMP for gateway monitoring, configure the SNMP traps. In this example, the name of the target entry name is Syslog_Target, and the community name is syslog_private.

Note: You must set hostname to "localhost" for this to work.

Configuration example to forward SNMP traps to a syslog server

BASH
% set system snmp target Syslog_Target retries 10 timeout 3
% set system snmp target Syslog_Target target-params internal v2c security-name syslog_private
% set system snmp target Syslog_Target transport udp hostname localhost port 162
% commit

Configure a Syslog Server on the Blue Cedar Connect Gateway

Configure a syslog server for SNMP to forward the SNMP traps/inform requests.

Configure syslog server to receive SNMP traps

BASH
% set system syslog enable true facility-name user
% set system syslog syslog-server 1 address 192.168.77.1 proto udp
% commit

See Configuring system protocols and services for more about syslog.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.