From 77c29d39d0c07ffb709d4a2de312140866e68b61 Mon Sep 17 00:00:00 2001 From: Alex Kup <116945542+Lifailon@users.noreply.github.com> Date: Sat, 14 Oct 2023 12:03:37 +0300 Subject: [PATCH] Delete Scripts/PingTo-InfluxDB.ps1 --- Scripts/PingTo-InfluxDB.ps1 | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 Scripts/PingTo-InfluxDB.ps1 diff --git a/Scripts/PingTo-InfluxDB.ps1 b/Scripts/PingTo-InfluxDB.ps1 deleted file mode 100644 index f352e13..0000000 --- a/Scripts/PingTo-InfluxDB.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -while ($true) { - $tz = (Get-TimeZone).BaseUtcOffset.TotalMinutes - $unixtime = (New-TimeSpan -Start (Get-Date "01/01/1970") -End ((Get-Date).AddMinutes(-$tz))).TotalSeconds # -3h UTC - $timestamp = ([string]$unixtime -replace "\..+") + "000000000" - $tnc = tnc 8.8.8.8 - $Status = $tnc.PingSucceeded - $RTime = $tnc.PingReplyDetails.RoundtripTime - Invoke-RestMethod -Method POST -Uri "http://192.168.3.104:8086/write?db=powershell" -Body "ping,host=$(hostname) status=$status,rtime=$RTime $timestamp" - sleep 1 -} \ No newline at end of file