Skip to content

Commit aee8e29

Browse files
authored
added exception for default conf entries
1 parent d64ce5b commit aee8e29

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

plugins/files/ServerWatchPlugin.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ public void run() {
102102
String[] hosts = targets.split(",");
103103
for (String host : hosts) {
104104
host = host.trim();
105-
if (host.isEmpty()) continue;
105+
if (host.isEmpty() || host.toLowerCase().startsWith("hostname") ) continue;
106106

107107
boolean online = isReachable(host); // Die Methode von vorhin
108108

109109
if (!online) {
110110
if (!lastAlarms.contains(host)) {
111-
sendAlarm(host, "PORT CLOSED/TIMEOUT");
112-
lastAlarms += host + "|";
111+
sendAlarm(host, "PORT CLOSED/TIMEOUT");
112+
lastAlarms += host + "|";
113113
}
114114
} else if (lastAlarms.contains(host)) {
115115
lastAlarms = lastAlarms.replace(host + "|", "");
@@ -194,4 +194,3 @@ protected javax.mail.PasswordAuthentication getPasswordAuthentication() {
194194
}).start();
195195
}
196196
}
197-

0 commit comments

Comments
 (0)