Skip to content

Commit 7c45ca2

Browse files
author
Jessica
committed
CLOUDSTACK-680. DOC. Add section about sending alerts to external SNMP managers/Syslog managers.
1 parent 6114123 commit 7c45ca2

1 file changed

Lines changed: 94 additions & 1 deletion

File tree

‎docs/en-US/admin-alerts.xml‎

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,98 @@
3131
<listitem><para>The Management Server cluster runs low on CPU, memory, or storage resources</para></listitem>
3232
<listitem><para>The Management Server loses heartbeat from a Host for more than 3 minutes</para></listitem>
3333
<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>&lt;appender name="SNMP" class="org.apache.cloudstack.alert.snmp.SnmpTrapAppender"&gt;
85+
&lt;param name="Threshold" value="WARN"/&gt; &lt;!-- Do not edit. The alert feature assumes WARN. --&gt;
86+
&lt;param name="SnmpManagerIpAddresses" value="10.1.1.1,10.1.1.2"/&gt;
87+
&lt;param name="SnmpManagerPorts" value="162,162"/&gt;
88+
&lt;param name="SnmpManagerCommunities" value="public,public"/&gt;
89+
&lt;layout class="org.apache.cloudstack.alert.snmp.SnmpEnhancedPatternLayout"&gt; &lt;!-- Do not edit -->
90+
&lt;param name="PairDelimeter" value="//"/&gt;
91+
&lt;param name="KeyValueDelimeter" value="::"/&gt;
92+
&lt;/layout&gt;
93+
&lt;/appender&gt;</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>&lt;appender name="ALERTSYSLOG"&gt;
99+
&lt;param name="Threshold" value="WARN"/&gt;
100+
&lt;param name="SyslogHosts" value="10.1.1.1,10.1.1.2"/&gt;
101+
&lt;param name="Facility" value="LOCAL6"/&gt;
102+
&lt;layout&gt;
103+
&lt;param name="ConversionPattern" value=""/&gt;
104+
&lt;/layout&gt;
105+
&lt;/appender&gt;</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 &lt;appender&gt; 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>
35128
</section>

0 commit comments

Comments
 (0)