Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0002547: Notification of system event problems
- Loading branch information
Showing
30 changed files
with
1,409 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
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
18 changes: 18 additions & 0 deletions
18
symmetric-assemble/src/asciidoc/configuration/mail-server.ad
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,18 @@ | ||
|
||
=== Mail Server | ||
|
||
A mail server can be configured for sending email notifications. | ||
|
||
Target Nodes:: The node group ID that will use this configuration. | ||
Hostname:: The hostname or IP address of the mail server to contact for sending mail. | ||
Transport:: The transport mechanism is either SMTP (Simple Mail Transfer Protocol) or SMTPS (encrypted with SSL). | ||
Port:: The default port for SMTP is 25, while the default port for SMTPS is 465. | ||
Use StartTLS:: After connecting over SMTP, the TLS protocol is used to encrypt content. | ||
Use Authentication:: The mail server requires a login and password before email can be sent. | ||
User:: The user login to use for authentication. | ||
Password:: The login password to use for authentication. | ||
|
||
ifdef::pro[] | ||
The "Test" button will use the current settings on the screen to connect to the mail server with the configured | ||
transport and report any errors. | ||
endif::pro[] |
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
44 changes: 44 additions & 0 deletions
44
symmetric-client/src/main/java/org/jumpmind/symmetric/job/NotificationJob.java
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,44 @@ | ||
/** | ||
* Licensed to JumpMind Inc under one or more contributor | ||
* license agreements. See the NOTICE file distributed | ||
* with this work for additional information regarding | ||
* copyright ownership. JumpMind Inc licenses this file | ||
* to you under the GNU General Public License, version 3.0 (GPLv3) | ||
* (the "License"); you may not use this file except in compliance | ||
* with the License. | ||
* | ||
* You should have received a copy of the GNU General Public License, | ||
* version 3.0 (GPLv3) along with this library; if not, see | ||
* <http://www.gnu.org/licenses/>. | ||
* | ||
* 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. | ||
*/ | ||
package org.jumpmind.symmetric.job; | ||
|
||
import org.jumpmind.symmetric.ISymmetricEngine; | ||
import org.jumpmind.symmetric.service.ClusterConstants; | ||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; | ||
|
||
public class NotificationJob extends AbstractJob { | ||
|
||
public NotificationJob(ISymmetricEngine engine, ThreadPoolTaskScheduler taskScheduler) { | ||
super("job.notification", true, engine.getParameterService().is("start.notification.job"), engine, taskScheduler); | ||
} | ||
|
||
@Override | ||
public void doJob(boolean force) throws Exception { | ||
if (engine != null) { | ||
engine.getNotificationService().update(); | ||
} | ||
} | ||
|
||
public String getClusterLockName() { | ||
return ClusterConstants.NOTIFICATION; | ||
} | ||
|
||
} |
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
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
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
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
160 changes: 160 additions & 0 deletions
160
symmetric-core/src/main/java/org/jumpmind/symmetric/model/Notification.java
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,160 @@ | ||
/** | ||
* Licensed to JumpMind Inc under one or more contributor | ||
* license agreements. See the NOTICE file distributed | ||
* with this work for additional information regarding | ||
* copyright ownership. JumpMind Inc licenses this file | ||
* to you under the GNU General Public License, version 3.0 (GPLv3) | ||
* (the "License"); you may not use this file except in compliance | ||
* with the License. | ||
* | ||
* You should have received a copy of the GNU General Public License, | ||
* version 3.0 (GPLv3) along with this library; if not, see | ||
* <http://www.gnu.org/licenses/>. | ||
* | ||
* 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. | ||
*/ | ||
package org.jumpmind.symmetric.model; | ||
|
||
import java.util.Date; | ||
|
||
public class Notification { | ||
|
||
protected String notificationId; | ||
|
||
protected String externalId; | ||
|
||
protected String nodeGroupId; | ||
|
||
protected String type; | ||
|
||
protected boolean enabled; | ||
|
||
protected long threshold; | ||
|
||
protected int period; | ||
|
||
protected int sampleMinutes; | ||
|
||
protected int severityLevel; | ||
|
||
protected long windowMinutes; | ||
|
||
protected Date createTime; | ||
|
||
protected String lastUpdateBy; | ||
|
||
protected Date lastUpdateTime; | ||
|
||
public String getNotificationId() { | ||
return notificationId; | ||
} | ||
|
||
public Notification() { | ||
} | ||
|
||
public void setNotificationId(String notificationId) { | ||
this.notificationId = notificationId; | ||
} | ||
|
||
public String getExternalId() { | ||
return externalId; | ||
} | ||
|
||
public void setExternalId(String externalId) { | ||
this.externalId = externalId; | ||
} | ||
|
||
public String getNodeGroupId() { | ||
return nodeGroupId; | ||
} | ||
|
||
public void setNodeGroupId(String nodeGroupId) { | ||
this.nodeGroupId = nodeGroupId; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public boolean isEnabled() { | ||
return enabled; | ||
} | ||
|
||
public void setEnabled(boolean enabled) { | ||
this.enabled = enabled; | ||
} | ||
|
||
public long getThreshold() { | ||
return threshold; | ||
} | ||
|
||
public void setThreshold(long threshhold) { | ||
this.threshold = threshhold; | ||
} | ||
|
||
public int getPeriod() { | ||
return period; | ||
} | ||
|
||
public void setPeriod(int period) { | ||
this.period = period; | ||
} | ||
|
||
public int getSampleMinutes() { | ||
return sampleMinutes; | ||
} | ||
|
||
public void setSampleMinutes(int sampleMinutes) { | ||
this.sampleMinutes = sampleMinutes; | ||
} | ||
|
||
public int getSeverityLevel() { | ||
return severityLevel; | ||
} | ||
|
||
public void setSeverityLevel(int severityLevel) { | ||
this.severityLevel = severityLevel; | ||
} | ||
|
||
public long getWindowMinutes() { | ||
return windowMinutes; | ||
} | ||
|
||
public void setWindowMinutes(long windowMinutes) { | ||
this.windowMinutes = windowMinutes; | ||
} | ||
|
||
public Date getCreateTime() { | ||
return createTime; | ||
} | ||
|
||
public void setCreateTime(Date createTime) { | ||
this.createTime = createTime; | ||
} | ||
|
||
public String getLastUpdateBy() { | ||
return lastUpdateBy; | ||
} | ||
|
||
public void setLastUpdateBy(String lastUpdateBy) { | ||
this.lastUpdateBy = lastUpdateBy; | ||
} | ||
|
||
public Date getLastUpdateTime() { | ||
return lastUpdateTime; | ||
} | ||
|
||
public void setLastUpdateTime(Date lastUpdateTime) { | ||
this.lastUpdateTime = lastUpdateTime; | ||
} | ||
|
||
} |
Oops, something went wrong.