@@ -106,8 +106,7 @@ func (s *splunkScraper) scrape(ctx context.Context) (pmetric.Metrics, error) {
106
106
s .scrapeSearchArtifacts ,
107
107
s .scrapeHealth ,
108
108
s .scrapeSearch ,
109
- s .scrapeIndexerClusterManagerStatus ,
110
-
109
+ s .scrapeIndexerClusterManagerStatus ,
111
110
}
112
111
errChan := make (chan error , len (metricScrapes ))
113
112
@@ -1935,7 +1934,7 @@ func (s *splunkScraper) scrapeSearch(_ context.Context, now pcommon.Timestamp, i
1935
1934
if err != nil {
1936
1935
s .recordSplunkSearchDurationDataPoint (now , 0.0 , i )
1937
1936
s .recordSplunkSearchSuccessDataPoint (now , 0 , i )
1938
- errs <- err
1937
+ errs <- err
1939
1938
return
1940
1939
}
1941
1940
@@ -2062,23 +2061,21 @@ func (s *splunkScraper) setSearchJobTTLByID(sid string) error {
2062
2061
2063
2062
return nil
2064
2063
}
2065
-
2064
+
2066
2065
// Scrape Indexer Cluster Manger Status Endpoint
2067
- func (s * splunkScraper ) scrapeIndexerClusterManagerStatus (ctx context.Context , now pcommon.Timestamp , errs chan error ) {
2066
+ func (s * splunkScraper ) scrapeIndexerClusterManagerStatus (_ context.Context , now pcommon.Timestamp , info infoDict , errs chan error ) {
2068
2067
if ! s .conf .MetricsBuilderConfig .Metrics .SplunkIndexerRollingrestartStatus .Enabled {
2069
2068
return
2070
2069
}
2071
2070
2072
- ctx = context .WithValue (ctx , endpointType ("type" ), typeCm )
2073
-
2074
2071
ept := apiDict [`SplunkIndexerClusterManagerStatus` ]
2075
2072
var icms indexersClusterManagerStatus
2076
2073
2077
- req , err := s .splunkClient .createAPIRequest (ctx , ept )
2074
+ req , err := s .splunkClient .createAPIRequest (typeCm , ept )
2078
2075
if err != nil {
2079
2076
errs <- err
2080
2077
return
2081
- }
2078
+ }
2082
2079
res , err := s .splunkClient .makeRequest (req )
2083
2080
if err != nil {
2084
2081
errs <- err
0 commit comments