Skip to content

Commit 6a7156a

Browse files
anshulgangwarSateesh Chodapuneedi
authored andcommitted
CLOUDSTACK-712: Feature Syslog Enhancements
Signed-off-by: Anshul Gangwar <anshul.gangwar@citrix.com> Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
1 parent 2c176ab commit 6a7156a

6 files changed

Lines changed: 458 additions & 0 deletions

File tree

client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@
6565
<artifactId>cloud-plugin-network-nvp</artifactId>
6666
<version>${project.version}</version>
6767
</dependency>
68+
<dependency>
69+
<groupId>org.apache.cloudstack</groupId>
70+
<artifactId>cloud-plugin-syslog-alerts</artifactId>
71+
<version>${project.version}</version>
72+
</dependency>
6873
<dependency>
6974
<groupId>org.apache.cloudstack</groupId>
7075
<artifactId>cloud-plugin-snmp-alerts</artifactId>

client/tomcatconf/log4j-cloud.xml.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,20 @@ under the License.
7474
<param name="ConversionPattern" value="%-5p [%c{3}] (%t:%x) %m%n"/>
7575
</layout>
7676
</appender>
77+
78+
<!-- ============================== -->
79+
<!-- Append alerts to the syslog if it is configured -->
80+
<!-- ============================== -->
81+
82+
<appender name="ALERTSYSLOG" class="org.apache.cloudstack.syslog.AlertsSyslogAppender">
83+
<param name="Threshold" value="WARN"/>
84+
<param name="SyslogHosts" value=""/>
85+
<param name="Facility" value="LOCAL6"/>
86+
<layout class="org.apache.log4j.PatternLayout">
87+
<param name="ConversionPattern" value="%-5p [%c{3}] (%t:%x) %m%n"/>
88+
</layout>
89+
</appender>
90+
7791
<!-- ============================== -->
7892
<!-- send alert warnings+ as the SNMP trap if it is configured! -->
7993
<!-- ============================== -->
@@ -166,6 +180,7 @@ under the License.
166180
<appender-ref ref="CONSOLE"/>
167181
<appender-ref ref="FILE"/>
168182
<appender-ref ref="SNMP"/>
183+
<appender-ref ref="ALERTSYSLOG"/>
169184
</logger>
170185

171186
<!-- ======================= -->
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
~ Licensed to the Apache Software Foundation (ASF) under one
3+
~ or more contributor license agreements. See the NOTICE file
4+
~ distributed with this work for additional information
5+
~ regarding copyright ownership. The ASF licenses this file
6+
~ to you under the Apache License, Version 2.0 (the
7+
~ "License"); you may not use this file except in compliance
8+
~ with the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing,
13+
~ software distributed under the License is distributed on an
14+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
~ KIND, either express or implied. See the License for the
16+
~ specific language governing permissions and limitations
17+
~ under the License
18+
-->
19+
<project xmlns="http://maven.apache.org/POM/4.0.0"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22+
<parent>
23+
<artifactId>cloudstack-plugins</artifactId>
24+
<groupId>org.apache.cloudstack</groupId>
25+
<version>4.2.0-SNAPSHOT</version>
26+
<relativePath>../../pom.xml</relativePath>
27+
</parent>
28+
<modelVersion>4.0.0</modelVersion>
29+
<name>Apache CloudStack Plugin - Syslog Alerts</name>
30+
<artifactId>cloud-plugin-syslog-alerts</artifactId>
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>log4j</groupId>
35+
<artifactId>log4j</artifactId>
36+
<version>${cs.log4j.version}</version>
37+
</dependency>
38+
</dependencies>
39+
40+
</project>

0 commit comments

Comments
 (0)