|
31 | 31 | <listitem><para>The Management Server cluster runs low on CPU, memory, or storage resources</para></listitem> |
32 | 32 | <listitem><para>The Management Server loses heartbeat from a Host for more than 3 minutes</para></listitem> |
33 | 33 | <listitem><para>The Host cluster runs low on CPU, memory, or storage resources</para></listitem> |
34 | | - </itemizedlist> |
| 34 | + </itemizedlist> |
| 35 | + <section id="external-snmp-manager"> |
| 36 | + <!-- CLOUDSTACK-680 --> |
| 37 | + <title>Sending Alerts to External SNMP and Syslog Managers</title> |
| 38 | + <para>In addition to showing administrator alerts on the Dashboard in the &PRODUCT; UI and |
| 39 | + sending them in email, &PRODUCT; can also send the same alerts to external SNMP or |
| 40 | + Syslog management software. This is useful if you prefer to use an SNMP or Syslog |
| 41 | + manager to monitor your cloud.</para> |
| 42 | + <para>The alerts which can be sent are listed in <xref linkend="alerts"/>. You can also |
| 43 | + display the most up to date list by calling the API command listAlerts.</para> |
| 44 | + <section id="snmp-alert-details"> |
| 45 | + <title>SNMP Alert Details</title> |
| 46 | + <para>The supported protocol is SNMP version 2.</para> |
| 47 | + <para>Each SNMP trap contains the following information: message, podId, dataCenterId, clusterId, and generationTime.</para> |
| 48 | + </section> |
| 49 | + <section id="syslog-alert-details"> |
| 50 | + <title>Syslog Alert Details</title> |
| 51 | + <para>&PRODUCT; generates a syslog message for every alert. Each syslog message incudes |
| 52 | + the fields alertType, message, podId, dataCenterId, and clusterId, in the following |
| 53 | + format. If any field does not have a valid value, it will not be included.</para> |
| 54 | + <programlisting>Date severity_level Management_Server_IP_Address/Name alertType:: value dataCenterId:: value podId:: value clusterId:: value message:: value</programlisting> |
| 55 | + <para>For example:</para> |
| 56 | + <programlisting>Mar 4 10:13:47 WARN localhost alertType:: managementNode message:: Management server node 127.0.0.1 is up</programlisting> |
| 57 | + </section> |
| 58 | + <section id="snmp-syslog-config"> |
| 59 | + <title>Configuring SNMP and Syslog Managers</title> |
| 60 | + <para>To configure one or more SNMP managers or Syslog managers to receive alerts from |
| 61 | + &PRODUCT;:</para> |
| 62 | + <orderedlist> |
| 63 | + <listitem><para>For an SNMP manager, install the &PRODUCT; MIB file on your SNMP manager system. |
| 64 | + This maps the SNMP OIDs to trap types that can be more easily read by users. |
| 65 | + The file must be publicly available. |
| 66 | + For more information on how to install this file, consult the documentation provided with the SNMP manager.</para></listitem> |
| 67 | + <listitem> |
| 68 | + <para>Edit the file /etc/cloudstack/management/log4j-cloud.xml.</para> |
| 69 | + <programlisting># vi /etc/cloudstack/management/log4j-cloud.xml</programlisting> |
| 70 | + </listitem> |
| 71 | + <listitem> |
| 72 | + <para>Add an entry using the syntax shown below. Follow the appropriate example |
| 73 | + depending on whether you are adding an SNMP manager or a Syslog manager. To specify |
| 74 | + multiple external managers, separate the IP addresses and other configuration values |
| 75 | + with commas (,).</para> |
| 76 | + <note> |
| 77 | + <para>The recommended maximum number of SNMP or Syslog managers is 20 for |
| 78 | + each.</para> |
| 79 | + </note> |
| 80 | + <para/> |
| 81 | + <para>The following example shows how to configure two SNMP managers at IP addresses |
| 82 | + 10.1.1.1 and 10.1.1.2. Substitute your own IP addresses, ports, and communities. Do |
| 83 | + not change the other values (name, threshold, class, and layout values).</para> |
| 84 | + <programlisting><appender name="SNMP" class="org.apache.cloudstack.alert.snmp.SnmpTrapAppender"> |
| 85 | + <param name="Threshold" value="WARN"/> <!-- Do not edit. The alert feature assumes WARN. --> |
| 86 | + <param name="SnmpManagerIpAddresses" value="10.1.1.1,10.1.1.2"/> |
| 87 | + <param name="SnmpManagerPorts" value="162,162"/> |
| 88 | + <param name="SnmpManagerCommunities" value="public,public"/> |
| 89 | + <layout class="org.apache.cloudstack.alert.snmp.SnmpEnhancedPatternLayout"> <!-- Do not edit --> |
| 90 | + <param name="PairDelimeter" value="//"/> |
| 91 | + <param name="KeyValueDelimeter" value="::"/> |
| 92 | + </layout> |
| 93 | +</appender></programlisting> |
| 94 | + <para>The following example shows how to configure two Syslog managers at IP |
| 95 | + addresses 10.1.1.1 and 10.1.1.2. Substitute your own IP addresses. You can |
| 96 | + set Facility to any syslog-defined value, such as LOCAL0 - LOCAL7. Do not |
| 97 | + change the other values.</para> |
| 98 | + <programlisting><appender name="ALERTSYSLOG"> |
| 99 | + <param name="Threshold" value="WARN"/> |
| 100 | + <param name="SyslogHosts" value="10.1.1.1,10.1.1.2"/> |
| 101 | + <param name="Facility" value="LOCAL6"/> |
| 102 | + <layout> |
| 103 | + <param name="ConversionPattern" value=""/> |
| 104 | + </layout> |
| 105 | +</appender></programlisting> |
| 106 | + </listitem> |
| 107 | + <listitem> |
| 108 | + <para>If your cloud has multiple Management Server nodes, repeat these steps to edit |
| 109 | + log4j-cloud.xml on every instance.</para> |
| 110 | + </listitem> |
| 111 | + <listitem> |
| 112 | + <para>If you have made these changes while the Management Server is running, wait a |
| 113 | + few minutes for the change to take effect.</para> |
| 114 | + </listitem> |
| 115 | + </orderedlist> |
| 116 | + <para><emphasis role="bold">Troubleshooting:</emphasis> If no alerts appear at the |
| 117 | + configured SNMP or Syslog manager after a reasonable amount of time, it is likely that |
| 118 | + there is an error in the syntax of the <appender> entry in log4j-cloud.xml. Check |
| 119 | + to be sure that the format and settings are correct.</para> |
| 120 | + </section> |
| 121 | + <section id="delete-snmp-syslog-manager"> |
| 122 | + <title>Deleting an SNMP or Syslog Manager</title> |
| 123 | + <para>To remove an external SNMP manager or Syslog manager so that it no longer receives |
| 124 | + alerts from &PRODUCT;, remove the corresponding entry from the file |
| 125 | + /etc/cloudstack/management/log4j-cloud.xml.</para> |
| 126 | + </section> |
| 127 | + </section> |
35 | 128 | </section> |
0 commit comments