Chapter 19. Managing the Cloud
244
Each SNMP trap contains the following information: message, podId, dataCenterId, clusterId, and
generationTime.
19.4.2.2. Syslog Alert Details
CloudPlatform generates a syslog message for every alert. Each syslog message incudes the fields
alertType, message, podId, dataCenterId, and clusterId, in the following format. If any field does not
have a valid value, it will not be included.
Date severity_level Management_Server_IP_Address/Name alertType:: value dataCenterId:: value
podId:: value clusterId:: value message:: value
For example:
Mar 4 10:13:47 WARN localhost alertType:: managementNode message:: Management
server node 127.0.0.1 is up
19.4.2.3. Configuring SNMP and Syslog Managers
To configure one or more SNMP managers or Syslog managers to receive alerts from CloudPlatform:
1. For an SNMP manager, install the CloudPlatform MIB file on your SNMP manager system. This
maps the SNMP OIDs to trap types that can be more easily read by users. The file must be
publicly available. For more information on how to install this file, consult the documentation
provided with the SNMP manager.
2. Edit the file /etc/cloudstack/management/log4j-cloud.xml.
# vi /etc/cloudstack/management/log4j-cloud.xml
3. Add an entry using the syntax shown below. Follow the appropriate example depending on
whether you are adding an SNMP manager or a Syslog manager. To specify multiple external
managers, separate the IP addresses and other configuration values with commas (,).
Note
The recommended maximum number of SNMP or Syslog managers is 20 for each.
The following example shows how to configure two SNMP managers at IP addresses 10.1.1.1
and 10.1.1.2. Substitute your own IP addresses, ports, and communities. Do not change the other
values (name, threshold, class, and layout values).
<appender name="SNMP" class="org.apache.cloudstack.alert.snmp.SnmpTrapAppender">
<param name="Threshold" value="WARN"/> <!-- Do not edit. The alert feature assumes
WARN. -->
<param name="SnmpManagerIpAddresses" value="10.1.1.1,10.1.1.2"/>
<param name="SnmpManagerPorts" value="162,162"/>
<param name="SnmpManagerCommunities" value="public,public"/>
<layout class="org.apache.cloudstack.alert.snmp.SnmpEnhancedPatternLayout"> <!-- Do not
edit -->
<param name="PairDelimeter" value="//"/>
<param name="KeyValueDelimeter" value="::"/>
</layout>