Catching SNMP traps using an external application
For your external application to receive SNMP notifications (traps), you must configure its host name and port number in the configuration file of the Monitoring Agent and, depending on the SNMP version, select additional configuration options.
Procedure
- Open the Monitoring Agent configuration file, cd_monitor_conf.xml in a plain-text editor or XML editor:
- On Content Manager, the file is located in the config\ subfolder of
%TRIDION_HOME%. - On Content Delivery, the file is located in the config/ (.NET) or /classes (Java) subfolder if Content Delivery is running as a Web application, otherwise in the config subdirectory of your Content Delivery installation.
- On Content Manager, the file is located in the config\ subfolder of
- In this file, find or add an
SNMPelement inside the rootMonitoringAgentConfigurationelement with the following attributes:Version-
Set the value of this attribute to an SNMP version your monitoring management application can understand, one of the following:
SNMPv1SNMPv2cSNMPv3
Host-
Set the value of this attribute to the host name of the machine that contains your monitoring management application, for example,
mon-mgmt-host.my.com. Port- Normally set to 162. If your application does not use port 162 for listening to SNMP agents, set this value to the correct port number.
For example:
<SNMP Version="SNMPv2c" Host="mon.my.com" Port="162"> </SNMP> - Inside this
SNMPelement, enter a configuration specific to the SNMP version you configured:- For versions v1 and v2c, insert a
Securityelement with aCommunityattribute set to the community string for SNMP messages. For example:<Security Community="public" /> - For version v3, insert a
Securityelement with the following attributes (all optional):Attribute name Description SecurityNameThe name used in the user security model. AuthProtocolThe authentication protocol used to authenticate SNMP messages. This value must be either MD5orSHA.AuthKeyThe authentication passphrase used to authenticate SNMP messages. This attribute is mandatory if AuthProtocolis specified. Must be at least 8 characters long.PrivProtocolThe privacy protocol used to encrypt SNMP messages. If AuthProtocolis omitted, this attribute is ignored. This value must be one ofDES,AES128,AES192, orAES256.PrivKeyThe privacy passphrase used to encrypt SNMP messages. This attribute is mandatory if PrivProtocolis specified. Must be at least 8 characters long.For version v3, you can also insert an
Engineelement with an optionalEngineBootsFileattribute. Set this attribute, which defaults to the value MonitoringAgentBoots.xml, to the absolute or relative path and filename of a file that contains the number of monitoring agents boots. This number is sent as part of the SNMP notification to prevent replay attacks.For example, the following may be inserted in an SNMP version v3 element:
<Security SecurityName="Tridion" AuthProtocol="MD5" AuthKey="frA52uwra" PrivProtocol="DES" PrivKey="2UnePdr7fr"/> <Engine EngineID="LittleThatCould" EngineBootsFile="../MonitoringAgentsBoots.xml" />
- For versions v1 and v2c, insert a
- Save and close the configuration file.