|
@@ -7,7 +7,6 @@ import (
|
|
|
"strings"
|
|
|
"time"
|
|
|
|
|
|
- "github.com/go-ping/ping"
|
|
|
"imuslab.com/zoraxy/mod/utils"
|
|
|
)
|
|
|
|
|
@@ -83,20 +82,6 @@ func (m *Monitor) ExecuteUptimeCheck() {
|
|
|
var thisRecord Record
|
|
|
if target.Protocol == "http" || target.Protocol == "https" {
|
|
|
online, laterncy, statusCode := getWebsiteStatusWithLatency(target.URL)
|
|
|
- if !online {
|
|
|
- //Try ICMP ping as well
|
|
|
- pinger, err := ping.NewPinger(target.URL)
|
|
|
- if err != nil {
|
|
|
- log.Println("Unable to start uptime check pinger: " + err.Error())
|
|
|
- } else {
|
|
|
- pinger.Count = 2
|
|
|
- err = pinger.Run()
|
|
|
- if err != nil {
|
|
|
- //Unable to ping it. Assume offline
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
thisRecord = Record{
|
|
|
Timestamp: time.Now().Unix(),
|
|
|
ID: target.ID,
|