SNMP - Send trap

Declaration

<AMSNMPSENDTRAP HOST="text" COMMUNITY="text" REMOTEPORT="number" SNMPVERSION="text [options]" ENTERPRISE="text" GENERICTYPE="text [options]" SPECIFICTYPE="number" TIMESTAMP="number" TIMESTAMPMEASURE="text [options]" VARBINDNAMES="text" VARBINDVALUES="text" VARBINDSYNTAXES="text [options]" />

Related Topics   

Description

Simulates an SNMP trap message being sent from an SNMP agent.

IMPORTANT: To get the most out of Automate's SNMP activities, users should have a fundamental understanding of SNMP architecture and its major elements, such as Managers, Agents, MIBs, and PDUs.

Practical Usage

Notifies a Network Management System (NMS) of an event or condition that took place on a SNMP agent.

Parameters

General

Property Type Required Default Markup Description
Agent IP Address Text Yes (Empty) HOST="xxx.xxx.xxx.xxx" The IP Address or host name of the SNMP agent to communicate with.
Community Text Yes Public COMMUNITY="NetAuto" The SNMP community name.
Enterprise OID Text Yes (Empty)
  • NAME="system.sysDescr.0"
  • NAME="1.3.6.1.2.1.1.1.0"
The OID for the network management system. This can be entered in either numeric or string notation format.
Trap generic type Text (options) No enterprisespecific GENERICTYPE="coldstart"

The generic type of the trap message. The available options are:

  • Enterprise specific (default) - The type is specified by the trap specific code in the Trap Specific Number parameter.
  • Cold start - Agent is booting.
  • Warm start - Agent is rebooting
  • Link down - An interface has gone down.
  • Link up - An interface has come up.
  • Authentication failure - An invalid community was received in a message.
  • EGP neighbor loss - An EGP peer has gone down.
Trap specific number Number No (Empty) SPECIFICTYPE="60" The specific trap code. Valid only when the Trap Generic Type parameter is set to the default, enterprise specific.

Advanced

Property Type Required Default Markup Description
Custom time stamp Number No (Empty) TIMESTAMP="100" If enabled, specifies a custom time stamp. This parameter is disabled by default.
Timestamp measure Text (options) No seconds
  • TIMESTAMPMEASURE="milliseconds"
  • TIMESTAMPMEASURE="seconds"
  • TIMESTAMPMEASURE="minutes"
  • TIMESTAMPMEASURE="hours"
The increment to use for the custom time stamp. The available options are:
  • milliseconds - Timestamp increment measured in milliseconds.
  • seconds (default) - Timestamp increment measured in seconds.
  • minutes - Timestamp increment measured in minutes.
  • hours - Timestamp increment measured in hours.
Remote Port Number No 162 REMOTEPORT="170" The TCP/IP port that should be used for the message. The default is 162.
SNMP version Text (options) No SNMPv1
  • SNMPVERSION="SNMPv1"
  • SNMPVERSION="SNMPv2c"
  • SNMPVERSION="SNMPv3"

The version of the SNMP protocol to use. The default is SNMP version 1. The available options are:

  • SNMPv1 (default)
  • SNMPv2c
  • SNMPv3
Authentication Protocol Text (options) No Do not use authentication
  • AUTHENTICATIONPROTOCOL="do not use authentication"
  • AUTHENTICATIONPROTOCOL="md5"
  • AUTHENTICATIONPROTOCOL="sha"
  • AUTHENTICATIONPROTOCOL="sha2"
SNMPv3 must be selected to make this potion available. The available options for Authentication algorithm are:
  • Do not use authentication (default) - No authentication will be used.
  • MD5 (recommended) - MD5 authentication will be used.
  • SHA - SHA authentication will be used.
  • SHA2 - SHA2 authentication will be used.
Engine ID Text Yes AutoMateTrapSender None The remote agent's SNMP engine ID is needed when computing the authentication/privacy digests from the password. If the remote engine ID is not configured first, the configuration command will fail.
Authentication username Text Yes empty USERNAME="username" User name to configure the remote user.
Privacy Algorithm Text (options) No Do not encrypt messages
  • PRIVACYALGORITHM="do not encrypt messages"
  • PRIVACYALGORITHM="des"
  • PRIVACYALGORITHM="aes192"
  • PRIVACYALGORITHM="aes256"
  • PRIVACYALGORITHM="3des"
  • PRIVACYALGORITHM="aes"
The available options for Privacy are:
  • Do not encrypt messages (default) - No encryption will be used.
  • DES (recommended) - DES encryption will be used.
  • AES192 - AES192 encryption will be used.
  • AES256 - AES256 encryption will be used.
  • 3DES - 3DES encryption will be used.
  • AES - AES encryption will be used.
Authentication password Text Yes Empty PASSWORD="password" Password to configure the remote user.
Privacy password Text Yes Empty PRIVACYPASSWORD="privacypassword' Privacy password for the algorithm.

Data

Property Type Required Default Markup Description
Variable name Number No (Empty)
  • VARBINDNAMES="system.sysDescr.0"
  • VARBINDNAMES="1.3.6.1.2.1.1.1.0"
The name/OID for a variable to be associated with a value in order to further define the trap notification. This can be entered in either numeric or string notation format.
Variable Value Text No (Empty) VARBINDVALUES="the data" The value to assign to the variable.
Variable Syntax Text (options) No integer VARBINDSYNTAXES="ipaddress" The data type The available options are:
  • integer (default) - An integer
  • octet string - An octet string
  • object ID - An object identifier
  • null - a null value
  • ipaddress - An IP Address
  • counter 32 - A 32-bit counter
  • gauge 32 - A 32-bit gauge
  • timeticks - A time tick
  • Opaque - Opaque
  • counter64 - A 64-bit counter
  • unsignedinteger32 - A 32-bit unsigned integer
Trap Specific Number Text (options) No SNMPv1
  • SNMPVERSION="SNMPv1"
  • SNMPVERSION="SNMPv2c"
  • SNMPVERSION="SNMPv3"
The version of the SNMP protocol to use. The default is SNMP version 1. The available options are:
  • SNMPv1 (default)
  • SNMPv2c
  • SNMPv3

Description

Error Causes

On Error

Example

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description

This sample task sends a trap.

Copy
<AMSNMP HOST="127.0.0.1" ENTERPRISE="1.3.16.1.5.1.311.1.1.3" COMMUNITY="CommunityName" SPECIFICTYPE="60" TIMESTAMP="20" TIMESTAMPMEASURE="milliseconds" REMOTEPORT="178" SNMPVERSION="snmpv2c" VARBINDNAMES="1.3.16.1.5.1.311.1.1.3.1.1" VARBINDVALUES="450" VARBINDSYNTAXES="Integer" />