From 9ad03d53038b8f5235b11e85a26d85d23e841859 Mon Sep 17 00:00:00 2001 From: insanity Date: Mon, 2 Jul 2018 20:53:06 +0900 Subject: [PATCH] test --- Gopkg.lock | 4 +- crawler/health/SocketHeahthCrawler.go | 39 ++++++++----------- .../ActiveDirectoryHealthCrawler.go | 4 +- .../cassandra/CassandraHealthCrawler.go | 4 +- crawler/health/dns/DNSHealthCrawler.go | 4 +- crawler/health/ftp/FTPHealthCrawler.go | 4 +- crawler/health/http/HTTPHealthCrawler.go | 4 +- crawler/health/imap/IMAPHealthCrawler.go | 4 +- crawler/health/ldap/LDAPHealthCrawler.go | 4 +- .../health/mongodb/MongoDBHealthCrawler.go | 4 +- crawler/health/mysql/MySQLHealthCrawler.go | 4 +- .../health/netbios/NetBIOSHealthCrawler.go | 4 +- crawler/health/oracle/OracleHealthCrawler.go | 4 +- crawler/health/pop/POPHealthCrawler.go | 4 +- .../postgresql/PostgreSQLHealthCrawler.go | 4 +- crawler/health/redis/RedisHealthCrawler.go | 4 +- crawler/health/rmi/RMIHealthCrawler.go | 4 +- crawler/health/smb/SMBHealthCrawler.go | 4 +- crawler/health/smtp/SMTPHealthCrawler.go | 4 +- crawler/health/snmp/v2/SNMPHealthCrawler.go | 4 +- crawler/health/snmp/v3/SNMPHealthCrawler.go | 4 +- .../sqlserver/SQLServerHealthCrawler.go | 4 +- crawler/health/ssh/SSHHealthCrawler.go | 4 +- crawler/health/telnet/TelnetHealthCrawler.go | 4 +- crawler/health/wmi/WMIHealthCrawler.go | 4 +- 25 files changed, 64 insertions(+), 71 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 99ecb2f..8814ac3 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -47,7 +47,7 @@ "socket/web", "socket/web/client" ] - revision = "20a63b3de6efdc0942bfb4be21ddc64e2b76f59d" + revision = "cbe8e30db48a21b33650c5ed7e7d8bbf4784c9d4" [[projects]] branch = "master" @@ -111,7 +111,7 @@ "model/sensorconfig", "service/probe" ] - revision = "7e2ff26648aefbafaee2ca28c1a958332ae4c6f9" + revision = "54725b74e13a501d7a13a76a82c294769729748d" [[projects]] branch = "master" diff --git a/crawler/health/SocketHeahthCrawler.go b/crawler/health/SocketHeahthCrawler.go index 71268a4..12562fb 100644 --- a/crawler/health/SocketHeahthCrawler.go +++ b/crawler/health/SocketHeahthCrawler.go @@ -5,47 +5,44 @@ import ( "encoding/base64" "fmt" "net" - "time" cnsm "git.loafle.net/commons/service_matcher-go" cuej "git.loafle.net/commons/util-go/encoding/json" - ocmm "git.loafle.net/overflow/commons-go/model/meta" ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/crawler-go" ) -type SocketHeahthCrawler struct { +type SocketHealthCrawler struct { crawler.Crawler m cnsm.Matcher } -func (s *SocketHeahthCrawler) SetMatcher(m cnsm.Matcher) { +func (s *SocketHealthCrawler) SetMatcher(m cnsm.Matcher) { s.m = m } -func (s *SocketHeahthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Conn, error) { - connection := config.Target.Connection - - metaIPType := connection.MetaIPType +func (s *SocketHealthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Conn, error) { + connection := config.Connection + metaIPTypeKey := connection.MetaIPTypeKey ip := connection.IP port := connection.Port - metaPortType := connection.MetaPortType - metaCryptoType := connection.MetaCryptoType + metaPortTypeKey := connection.MetaPortTypeKey + metaCryptoTypeKey := connection.MetaCryptoTypeKey addr := fmt.Sprintf("%s:%s", ip, port) network := "" - switch ocmm.ToMetaIPTypeEnum(metaIPType) { - case ocmm.MetaIPTypeEnumV6: - switch ocmm.ToMetaPortTypeEnum(metaPortType) { - case ocmm.MetaPortTypeEnumUDP: + switch metaIPTypeKey { + case "V6": + switch metaPortTypeKey { + case "UDP": network = "udp6" default: network = "tcp6" } default: - switch ocmm.ToMetaPortTypeEnum(metaPortType) { - case ocmm.MetaPortTypeEnumUDP: + switch metaPortTypeKey { + case "UDP": network = "udp" default: network = "tcp" @@ -57,7 +54,7 @@ func (s *SocketHeahthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Con return nil, err } - if ocmm.ToMetaCryptoTypeEnum(metaCryptoType) == ocmm.MetaCryptoTypeEnumTLS { + if metaCryptoTypeKey == "TLS" { cfg := &tls.Config{ InsecureSkipVerify: true, ServerName: ip, @@ -74,11 +71,9 @@ func (s *SocketHeahthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Con return conn, nil } -func (s *SocketHeahthCrawler) CheckHeahth(config *ocmsc.SensorConfig) (result map[string]string, err error) { +func (s *SocketHealthCrawler) CheckHealth(config *ocmsc.SensorConfig) (result map[string]string, err error) { result = make(map[string]string, 0) - result["StartTime"] = time.Now().String() - conn, cErr := s.getConnection(config) if cErr != nil { result["Error"] = cErr.Error() @@ -87,7 +82,7 @@ func (s *SocketHeahthCrawler) CheckHeahth(config *ocmsc.SensorConfig) (result ma } defer conn.Close() - connection := config.Target.Connection + connection := config.Connection port, _ := cuej.NumberToInt(connection.Port) info := cnsm.NewMatchInfo(connection.IP, port) @@ -143,8 +138,6 @@ func (s *SocketHeahthCrawler) CheckHeahth(config *ocmsc.SensorConfig) (result ma } } - result["EndTime"] = time.Now().String() - return } diff --git a/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go b/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go index de00d9a..f2061f1 100644 --- a/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go +++ b/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type ActiveDirectoryHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *ActiveDirectoryHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *ActiveDirectoryHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *ActiveDirectoryHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/cassandra/CassandraHealthCrawler.go b/crawler/health/cassandra/CassandraHealthCrawler.go index e920b97..3362a18 100644 --- a/crawler/health/cassandra/CassandraHealthCrawler.go +++ b/crawler/health/cassandra/CassandraHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type CassandraHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *CassandraHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *CassandraHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *CassandraHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/dns/DNSHealthCrawler.go b/crawler/health/dns/DNSHealthCrawler.go index 24c6e83..f513fd5 100644 --- a/crawler/health/dns/DNSHealthCrawler.go +++ b/crawler/health/dns/DNSHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type DNSHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *DNSHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *DNSHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *DNSHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/ftp/FTPHealthCrawler.go b/crawler/health/ftp/FTPHealthCrawler.go index 2dcac62..d721e02 100644 --- a/crawler/health/ftp/FTPHealthCrawler.go +++ b/crawler/health/ftp/FTPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type FTPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *FTPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *FTPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *FTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/http/HTTPHealthCrawler.go b/crawler/health/http/HTTPHealthCrawler.go index bef3c70..870a07e 100644 --- a/crawler/health/http/HTTPHealthCrawler.go +++ b/crawler/health/http/HTTPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type HTTPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *HTTPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *HTTPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *HTTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/imap/IMAPHealthCrawler.go b/crawler/health/imap/IMAPHealthCrawler.go index 611790f..9a50266 100644 --- a/crawler/health/imap/IMAPHealthCrawler.go +++ b/crawler/health/imap/IMAPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type IMAPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *IMAPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *IMAPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *IMAPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/ldap/LDAPHealthCrawler.go b/crawler/health/ldap/LDAPHealthCrawler.go index ad359a8..19288d0 100644 --- a/crawler/health/ldap/LDAPHealthCrawler.go +++ b/crawler/health/ldap/LDAPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type LDAPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *LDAPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *LDAPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *LDAPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/mongodb/MongoDBHealthCrawler.go b/crawler/health/mongodb/MongoDBHealthCrawler.go index 38a71eb..839bc37 100644 --- a/crawler/health/mongodb/MongoDBHealthCrawler.go +++ b/crawler/health/mongodb/MongoDBHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type MongoDBHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *MongoDBHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *MongoDBHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *MongoDBHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/mysql/MySQLHealthCrawler.go b/crawler/health/mysql/MySQLHealthCrawler.go index 2c04c44..6cdedd9 100644 --- a/crawler/health/mysql/MySQLHealthCrawler.go +++ b/crawler/health/mysql/MySQLHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type MySQLHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *MySQLHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *MySQLHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *MySQLHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/netbios/NetBIOSHealthCrawler.go b/crawler/health/netbios/NetBIOSHealthCrawler.go index 8ce2222..88cabb2 100644 --- a/crawler/health/netbios/NetBIOSHealthCrawler.go +++ b/crawler/health/netbios/NetBIOSHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type NetBIOSHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *NetBIOSHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *NetBIOSHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *NetBIOSHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/oracle/OracleHealthCrawler.go b/crawler/health/oracle/OracleHealthCrawler.go index 619cd46..fb35db7 100644 --- a/crawler/health/oracle/OracleHealthCrawler.go +++ b/crawler/health/oracle/OracleHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type OracleHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *OracleHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *OracleHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *OracleHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/pop/POPHealthCrawler.go b/crawler/health/pop/POPHealthCrawler.go index a510ace..406b093 100644 --- a/crawler/health/pop/POPHealthCrawler.go +++ b/crawler/health/pop/POPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type POPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *POPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *POPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *POPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/postgresql/PostgreSQLHealthCrawler.go b/crawler/health/postgresql/PostgreSQLHealthCrawler.go index 1b70421..28846f5 100644 --- a/crawler/health/postgresql/PostgreSQLHealthCrawler.go +++ b/crawler/health/postgresql/PostgreSQLHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type PostgreSQLHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *PostgreSQLHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *PostgreSQLHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *PostgreSQLHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/redis/RedisHealthCrawler.go b/crawler/health/redis/RedisHealthCrawler.go index 1645dd5..be7d244 100644 --- a/crawler/health/redis/RedisHealthCrawler.go +++ b/crawler/health/redis/RedisHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type RedisHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *RedisHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *RedisHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *RedisHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/rmi/RMIHealthCrawler.go b/crawler/health/rmi/RMIHealthCrawler.go index 6c11ff2..9de0836 100644 --- a/crawler/health/rmi/RMIHealthCrawler.go +++ b/crawler/health/rmi/RMIHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type RMIHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *RMIHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *RMIHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *RMIHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/smb/SMBHealthCrawler.go b/crawler/health/smb/SMBHealthCrawler.go index 0eaf315..391003f 100644 --- a/crawler/health/smb/SMBHealthCrawler.go +++ b/crawler/health/smb/SMBHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type SMBHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *SMBHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *SMBHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *SMBHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/smtp/SMTPHealthCrawler.go b/crawler/health/smtp/SMTPHealthCrawler.go index 5023df9..0f8d621 100644 --- a/crawler/health/smtp/SMTPHealthCrawler.go +++ b/crawler/health/smtp/SMTPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type SMTPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *SMTPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *SMTPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *SMTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/snmp/v2/SNMPHealthCrawler.go b/crawler/health/snmp/v2/SNMPHealthCrawler.go index 4e32a4a..5fe7e15 100644 --- a/crawler/health/snmp/v2/SNMPHealthCrawler.go +++ b/crawler/health/snmp/v2/SNMPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type SNMPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *SNMPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *SNMPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *SNMPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/snmp/v3/SNMPHealthCrawler.go b/crawler/health/snmp/v3/SNMPHealthCrawler.go index 0cc9845..6f02432 100644 --- a/crawler/health/snmp/v3/SNMPHealthCrawler.go +++ b/crawler/health/snmp/v3/SNMPHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type SNMPHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *SNMPHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *SNMPHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *SNMPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/sqlserver/SQLServerHealthCrawler.go b/crawler/health/sqlserver/SQLServerHealthCrawler.go index fd7a095..bf0b1f0 100644 --- a/crawler/health/sqlserver/SQLServerHealthCrawler.go +++ b/crawler/health/sqlserver/SQLServerHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type SQLServerHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *SQLServerHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *SQLServerHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *SQLServerHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/ssh/SSHHealthCrawler.go b/crawler/health/ssh/SSHHealthCrawler.go index d5a5260..a60b5e6 100644 --- a/crawler/health/ssh/SSHHealthCrawler.go +++ b/crawler/health/ssh/SSHHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type SSHHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *SSHHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *SSHHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *SSHHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/telnet/TelnetHealthCrawler.go b/crawler/health/telnet/TelnetHealthCrawler.go index d860ab1..d723052 100644 --- a/crawler/health/telnet/TelnetHealthCrawler.go +++ b/crawler/health/telnet/TelnetHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type TelnetHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *TelnetHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *TelnetHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *TelnetHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err } diff --git a/crawler/health/wmi/WMIHealthCrawler.go b/crawler/health/wmi/WMIHealthCrawler.go index 7e3e189..4286017 100644 --- a/crawler/health/wmi/WMIHealthCrawler.go +++ b/crawler/health/wmi/WMIHealthCrawler.go @@ -8,7 +8,7 @@ import ( ) type WMIHealthCrawler struct { - health.SocketHeahthCrawler + health.SocketHealthCrawler } func (c *WMIHealthCrawler) Key() string { @@ -24,7 +24,7 @@ func (c *WMIHealthCrawler) Auth(auth map[string]interface{}) error { } func (c *WMIHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { - rss, err := c.CheckHeahth(config) + rss, err := c.CheckHealth(config) if err != nil { return nil, err }