This commit is contained in:
geek 2018-07-04 18:46:27 +09:00
parent a7480afdd5
commit f54181f2d3

View File

@ -4,7 +4,8 @@ import (
cnsms "git.loafle.net/commons/service_matcher-go/ssh" cnsms "git.loafle.net/commons/service_matcher-go/ssh"
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
"git.loafle.net/overflow/container_network/crawler/health" "git.loafle.net/overflow/container_network/crawler/health"
crawler "git.loafle.net/overflow/crawler-go" "git.loafle.net/overflow/crawler-go"
"git.loafle.net/commons/logging-go"
) )
type SSHHealthCrawler struct { type SSHHealthCrawler struct {
@ -30,7 +31,9 @@ func (c *SSHHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, e
defer conn.Close() defer conn.Close()
if cErr != nil { if cErr != nil {
result["Error"] = cErr.Error() sckEnum := health.ToSocketErrorEnum(cErr)
result["Error"] = sckEnum.String()
logging.Logger().Error("SSHHealthCrawler Connection Error: ", sckEnum.String())
return result, cErr return result, cErr
} }