diff --git a/Dashboard/src/Components/Monitor/MonitorSteps/MonitorStep.tsx b/Dashboard/src/Components/Monitor/MonitorSteps/MonitorStep.tsx index 9be088c7b43..96389e04691 100644 --- a/Dashboard/src/Components/Monitor/MonitorSteps/MonitorStep.tsx +++ b/Dashboard/src/Components/Monitor/MonitorSteps/MonitorStep.tsx @@ -77,9 +77,9 @@ const MonitorStepElement: FunctionComponent = ( fields = [ { key: 'monitorDestination', - title: 'Ping URL', + title: 'Ping Hostname or IP Address', description: - 'URL of the resources you would like us to ping.', + 'Hostname or IP Address of the resource you would like us to ping.', fieldType: FieldType.Text, placeholder: 'No data entered', }, diff --git a/Probe/Utils/Monitors/MonitorTypes/PingMonitor.ts b/Probe/Utils/Monitors/MonitorTypes/PingMonitor.ts index 111962f7cc1..cabdb22771f 100644 --- a/Probe/Utils/Monitors/MonitorTypes/PingMonitor.ts +++ b/Probe/Utils/Monitors/MonitorTypes/PingMonitor.ts @@ -3,6 +3,7 @@ import URL from 'Common/Types/API/URL'; import IPv4 from 'Common/Types/IP/IPv4'; import IPv6 from 'Common/Types/IP/IPv6'; import PositiveNumber from 'Common/Types/PositiveNumber'; +import logger from 'CommonServer/Utils/Logger'; import ping from 'ping'; // TODO - make sure it work for the IPV6 @@ -30,6 +31,8 @@ export default class PingMonitor { hostAddress = host.toString(); } + logger.info("Pinging host: " + hostAddress); + try { const res: ping.PingResponse = await ping.promise.probe( hostAddress, @@ -40,6 +43,9 @@ export default class PingMonitor { } ); + logger.info("Pinging host "+hostAddress+" success: "); + logger.info(res); + return { isOnline: res.alive, responseTimeInMS: res.time @@ -47,6 +53,10 @@ export default class PingMonitor { : undefined, }; } catch (err) { + + logger.info("Pinging host "+hostAddress+" error: "); + logger.info(err); + if (!retry) { retry = 0; // default value }