Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func NewSVCCollector(targets []utils.Target, tokenCaches map[string]*utils.AuthT
UserName: t.Userid,
Password: t.Password,
IpAddress: t.IpAddress,
VerifyCert: t.VerifyCert,
AuthTokenCache: tokenCaches[t.IpAddress],
AuthTokenMutex: tokenMutexes[t.IpAddress],
ColCounter: colCounters[t.IpAddress],
Expand Down
1 change: 1 addition & 0 deletions collector_s/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func NewSVCCollector(targets []utils.Target, tokenCaches map[string]*utils.AuthT
UserName: t.Userid,
Password: t.Password,
IpAddress: t.IpAddress,
VerifyCert: t.VerifyCert,
AuthTokenCache: tokenCaches[t.IpAddress],
AuthTokenMutex: tokenMutexes[t.IpAddress],
ColCounter: colCounters[t.IpAddress],
Expand Down
7 changes: 4 additions & 3 deletions utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ type Config struct {
}

type Target struct {
IpAddress string `yaml:"ipAddress"`
Userid string `yaml:"userid"`
Password string `yaml:"password"`
IpAddress string `yaml:"ipAddress"`
Userid string `yaml:"userid"`
Password string `yaml:"password"`
VerifyCert bool `yaml:"verifyCert"`
}

type Label struct {
Expand Down
4 changes: 2 additions & 2 deletions utils/spectrumClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (s *SpectrumClient) retrieveAuthToken() (authToken string, err error) {
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
TLSClientConfig: &tls.Config{InsecureSkipVerify: false, MinVersion: tls.VersionTLS12},
TLSClientConfig: &tls.Config{InsecureSkipVerify: !s.VerifyCert, MinVersion: tls.VersionTLS12},
},
Timeout: 45 * time.Second,
}
Expand Down Expand Up @@ -205,7 +205,7 @@ func (s *SpectrumClient) CallSpectrumAPI(restCmd string, autoRenewToken bool) (b
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
TLSClientConfig: &tls.Config{InsecureSkipVerify: false, MinVersion: tls.VersionTLS12},
TLSClientConfig: &tls.Config{InsecureSkipVerify: !s.VerifyCert, MinVersion: tls.VersionTLS12},
},
Timeout: 45 * time.Second}
// New POST request
Expand Down