diff --git a/docs/en-US/admin-alerts.xml b/docs/en-US/admin-alerts.xml index 5354c5e9b8e..e98f79de06f 100644 --- a/docs/en-US/admin-alerts.xml +++ b/docs/en-US/admin-alerts.xml @@ -31,5 +31,98 @@ The Management Server cluster runs low on CPU, memory, or storage resources The Management Server loses heartbeat from a Host for more than 3 minutes The Host cluster runs low on CPU, memory, or storage resources - + +
+ + Sending Alerts to External SNMP and Syslog Managers + In addition to showing administrator alerts on the Dashboard in the &PRODUCT; UI and + sending them in email, &PRODUCT; can also send the same alerts to external SNMP or + Syslog management software. This is useful if you prefer to use an SNMP or Syslog + manager to monitor your cloud. + The alerts which can be sent are listed in . You can also + display the most up to date list by calling the API command listAlerts. +
+ SNMP Alert Details + The supported protocol is SNMP version 2. + Each SNMP trap contains the following information: message, podId, dataCenterId, clusterId, and generationTime. +
+
+ Syslog Alert Details + &PRODUCT; 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 +
+
+ Configuring SNMP and Syslog Managers + To configure one or more SNMP managers or Syslog managers to receive alerts from + &PRODUCT;: + + For an SNMP manager, install the &PRODUCT; 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. + + Edit the file /etc/cloudstack/management/log4j-cloud.xml. + # vi /etc/cloudstack/management/log4j-cloud.xml + + + 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 (,). + + 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> +</appender> + The following example shows how to configure two Syslog managers at IP + addresses 10.1.1.1 and 10.1.1.2. Substitute your own IP addresses. You can + set Facility to any syslog-defined value, such as LOCAL0 - LOCAL7. Do not + change the other values. + <appender name="ALERTSYSLOG"> + <param name="Threshold" value="WARN"/> + <param name="SyslogHosts" value="10.1.1.1,10.1.1.2"/> + <param name="Facility" value="LOCAL6"/> + <layout> + <param name="ConversionPattern" value=""/> + </layout> +</appender> + + + If your cloud has multiple Management Server nodes, repeat these steps to edit + log4j-cloud.xml on every instance. + + + If you have made these changes while the Management Server is running, wait a + few minutes for the change to take effect. + + + Troubleshooting: If no alerts appear at the + configured SNMP or Syslog manager after a reasonable amount of time, it is likely that + there is an error in the syntax of the <appender> entry in log4j-cloud.xml. Check + to be sure that the format and settings are correct. +
+
+ Deleting an SNMP or Syslog Manager + To remove an external SNMP manager or Syslog manager so that it no longer receives + alerts from &PRODUCT;, remove the corresponding entry from the file + /etc/cloudstack/management/log4j-cloud.xml. +
+