File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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-
You can’t perform that action at this time.
0 commit comments