Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Distribution for Alerting standalone (#357)
* Distribution for Alerting standalone * Minor rename on ispn config files * Fix test as conditions might change order * Allow reindex backend at startup from configuration * Update latest srcdep from commons
- Loading branch information
1 parent
c230409
commit 5b94cf2
Showing
14 changed files
with
469 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2016 Red Hat, Inc. and/or its affiliates | ||
and other contributors as indicated by the @author tags. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
|
||
<id>${project.artifactId}</id> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<includeBaseDirectory>true</includeBaseDirectory> | ||
<fileSets> | ||
<fileSet> | ||
<directory>target/${distribution.name}-${project.version}</directory> | ||
<outputDirectory/> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2016-2017 Red Hat, Inc. and/or its affiliates | ||
and other contributors as indicated by the @author tags. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.hawkular.alerts</groupId> | ||
<artifactId>hawkular-alerts</artifactId> | ||
<version>2.0.0.Final-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>hawkular-alerts-dist</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<name>Hawkular Alerting: Distribution</name> | ||
|
||
<dependencies> | ||
|
||
<!-- This project is specific for test so all dependencies are test scope --> | ||
<dependency> | ||
<groupId>org.hawkular.alerts</groupId> | ||
<artifactId>hawkular-alerts-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hawkular.commons</groupId> | ||
<artifactId>hawkular-server</artifactId> | ||
<version>${version.org.hawkular.commons}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hawkular.alerts</groupId> | ||
<artifactId>hawkular-alerts-rest-handlers</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hawkular.alerts</groupId> | ||
<artifactId>hawkular-alerts-actions-email</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hawkular.alerts</groupId> | ||
<artifactId>hawkular-alerts-actions-file</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-slf4j-impl</artifactId> | ||
<version>${version.org.apache.logging.log4j}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-core</artifactId> | ||
<version>${version.org.apache.logging.log4j}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
|
||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-resources</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/${distribution.name}-${project.version}</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>false</filtering> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>set-run-sh-permissions</id> | ||
<phase>package</phase> | ||
<configuration> | ||
<tasks> | ||
<property name="target-to-run" value="${project.build.directory}/${distribution.name}-${project.version}"/> | ||
<chmod file="${target-to-run}/hawkular.sh" perm="755"/> | ||
</tasks> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-dependencies</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/${distribution.name}-${project.version}/lib</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>dozip</id> | ||
<activation> | ||
<property> | ||
<name>dozip</name> | ||
<value>true</value> | ||
</property> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>distro-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright 2015-2016 Red Hat, Inc. and/or its affiliates | ||
# and other contributors as indicated by the @author tags. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
# Internal configuration registration, used to provide default values | ||
hawkular-alerts.backend=ispn | ||
hawkular-alerts.engine-delay=1000 | ||
hawkular-alerts.engine-period=2000 | ||
hawkular-alerts.base-url=/hawkular/alerts | ||
hawkular-alerts.port=8080 | ||
hawkular-alerts.bind-address=127.0.0.1 | ||
hawkular-alerts.jmx-port=9080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<infinispan | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="urn:infinispan:config:9.0 http://www.infinispan.org/schemas/infinispan-config-9.0.xsd" | ||
xmlns="urn:infinispan:config:9.0"> | ||
|
||
<cache-container name="hawkular-alerts"> | ||
<local-cache name="partition"/> | ||
<local-cache name="triggers"/> | ||
<local-cache name="data"/> | ||
<local-cache name="publish"> | ||
<transaction mode="BATCH"/> | ||
</local-cache> | ||
<local-cache name="dataIds"> | ||
<transaction mode="BATCH"/> | ||
</local-cache> | ||
<local-cache name="schema"/> | ||
<local-cache name="globalActions"> | ||
<transaction mode="BATCH"/> | ||
</local-cache> | ||
|
||
<!-- Backend for definitions, actions history, events and alerts --> | ||
<local-cache name="backend"> | ||
<transaction mode="BATCH"/> | ||
<persistence> | ||
<file-store preload="true" fetch-state="true" read-only="false" purge="false" path="${hawkular.data}/alerting"> | ||
<write-behind thread-pool-size="5" modification-queue-size="10000" /> | ||
</file-store> | ||
</persistence> | ||
<indexing index="LOCAL"> | ||
<indexed-entities> | ||
<indexed-entity>org.hawkular.alerts.engine.impl.ispn.model.IspnAction</indexed-entity> | ||
<indexed-entity>org.hawkular.alerts.engine.impl.ispn.model.IspnActionDefinition</indexed-entity> | ||
<indexed-entity>org.hawkular.alerts.engine.impl.ispn.model.IspnCondition</indexed-entity> | ||
<indexed-entity>org.hawkular.alerts.engine.impl.ispn.model.IspnDampening</indexed-entity> | ||
<indexed-entity>org.hawkular.alerts.engine.impl.ispn.model.IspnEvent</indexed-entity> | ||
<indexed-entity>org.hawkular.alerts.engine.impl.ispn.model.IspnTrigger</indexed-entity> | ||
</indexed-entities> | ||
<property name="default.indexmanager">near-real-time</property> | ||
<property name="default.directory_provider">infinispan</property> | ||
<property name="default.chunk_size">128000</property> | ||
<property name="default.locking_cachename">LuceneIndexesLocking_custom</property> | ||
<property name="default.data_cachename">LuceneIndexesData_custom</property> | ||
<property name="default.metadata_cachename">LuceneIndexesMetadata_custom</property> | ||
<!-- The default is 10, but we don't want to waste many cycles in merging | ||
(tune for writes at cost of reader fragmentation) --> | ||
|
||
<property name="default.indexwriter.merge_factor">30</property> | ||
<!-- Never create segments larger than 1GB --> | ||
<property name="default.indexwriter.merge_max_size">1024</property> | ||
<!-- IndexWriter flush buffer size in MB --> | ||
<property name="default.indexwriter.ram_buffer_size">64</property> | ||
<!-- Enable sharding on writers --> | ||
<property name="default.sharding_strategy.nbr_of_shards">6</property> | ||
<property name="lucene_version">LUCENE_CURRENT</property> | ||
</indexing> | ||
</local-cache> | ||
<local-cache name="LuceneIndexesMetadata_custom"> | ||
<transaction mode="NON_XA" /> | ||
<persistence passivation="false"> | ||
<file-store preload="true" fetch-state="true" read-only="false" purge="false" path="${hawkular.data}/alerting"> | ||
<write-behind thread-pool-size="5" /> | ||
</file-store> | ||
</persistence> | ||
<indexing index="NONE"/> | ||
</local-cache> | ||
<local-cache name="LuceneIndexesData_custom"> | ||
<transaction mode="NON_XA" /> | ||
<persistence passivation="false"> | ||
<file-store preload="true" fetch-state="true" read-only="false" purge="false" path="${hawkular.data}/alerting"> | ||
<write-behind thread-pool-size="5" /> | ||
</file-store> | ||
</persistence> | ||
<indexing index="NONE" /> | ||
</local-cache> | ||
<local-cache name="LuceneIndexesLocking_custom"> | ||
<transaction mode="NON_XA" /> | ||
<persistence passivation="false"> | ||
<file-store preload="true" fetch-state="true" read-only="false" purge="false" path="${hawkular.data}/alerting"> | ||
<write-behind thread-pool-size="5" /> | ||
</file-store> | ||
</persistence> | ||
<indexing index="NONE" /> | ||
</local-cache> | ||
</cache-container> | ||
</infinispan> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration status="warn" shutdownHook="disable"> | ||
<Appenders> | ||
<Console name="Console" target="SYSTEM_OUT"> | ||
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{1.} - %msg%n"/> | ||
</Console> | ||
</Appenders> | ||
<Loggers> | ||
<Logger name="com.datastax" level="warn" /> | ||
<Logger name="com.icegreen" level="warn" /> | ||
<Logger name="infinispan" level="warn" /> | ||
<Logger name="io.netty" level="warn" /> | ||
<Logger name="io.vertx" level="trace" /> | ||
<Logger name="org.cassalog" level="info" /> | ||
<Logger name="org.drools" level="warn" /> | ||
<Logger name="org.jboss" level="warn" /> | ||
<Logger name="org.jgroups" level="warn" /> | ||
<Logger name="org.hawkular" level="info" /> | ||
<Logger name="org.infinispan" level="warn" /> | ||
<Logger name="org.hibernate" level="warn" /> | ||
<Root level="trace"> | ||
<AppenderRef ref="Console"/> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |
Oops, something went wrong.