Skip to content

Commit 61a0174

Browse files

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

receiver/splunkenterprisereceiver/scraper.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ func unmarshallSearchReq(res *http.Response, sr *searchResponse) error {
11031103

11041104
// Scrape index throughput introspection endpoint
11051105
func (s *splunkScraper) scrapeIndexThroughput(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1106-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkIndexerThroughput.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1106+
if !s.conf.Metrics.SplunkIndexerThroughput.Enabled || !s.splunkClient.isConfigured(typeIdx) {
11071107
return
11081108
}
11091109
i := info[typeIdx].Entries[0].Content
@@ -1144,7 +1144,7 @@ func (s *splunkScraper) scrapeIndexThroughput(_ context.Context, now pcommon.Tim
11441144

11451145
// Scrape indexes extended total size
11461146
func (s *splunkScraper) scrapeIndexesTotalSize(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1147-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkDataIndexesExtendedTotalSize.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1147+
if !s.conf.Metrics.SplunkDataIndexesExtendedTotalSize.Enabled || !s.splunkClient.isConfigured(typeIdx) {
11481148
return
11491149
}
11501150
i := info[typeIdx].Entries[0].Content
@@ -1197,7 +1197,7 @@ func (s *splunkScraper) scrapeIndexesTotalSize(_ context.Context, now pcommon.Ti
11971197

11981198
// Scrape indexes extended total event count
11991199
func (s *splunkScraper) scrapeIndexesEventCount(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1200-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkDataIndexesExtendedEventCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1200+
if !s.conf.Metrics.SplunkDataIndexesExtendedEventCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
12011201
return
12021202
}
12031203
i := info[typeIdx].Entries[0].Content
@@ -1244,7 +1244,7 @@ func (s *splunkScraper) scrapeIndexesEventCount(_ context.Context, now pcommon.T
12441244

12451245
// Scrape indexes extended total bucket count
12461246
func (s *splunkScraper) scrapeIndexesBucketCount(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1247-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkDataIndexesExtendedBucketCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1247+
if !s.conf.Metrics.SplunkDataIndexesExtendedBucketCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
12481248
return
12491249
}
12501250
i := info[typeIdx].Entries[0].Content
@@ -1297,7 +1297,7 @@ func (s *splunkScraper) scrapeIndexesBucketCount(_ context.Context, now pcommon.
12971297

12981298
// Scrape indexes extended raw size
12991299
func (s *splunkScraper) scrapeIndexesRawSize(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1300-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkDataIndexesExtendedRawSize.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1300+
if !s.conf.Metrics.SplunkDataIndexesExtendedRawSize.Enabled || !s.splunkClient.isConfigured(typeIdx) {
13011301
return
13021302
}
13031303
i := info[typeIdx].Entries[0].Content
@@ -1350,7 +1350,7 @@ func (s *splunkScraper) scrapeIndexesRawSize(_ context.Context, now pcommon.Time
13501350

13511351
// Scrape indexes extended bucket event count
13521352
func (s *splunkScraper) scrapeIndexesBucketEventCount(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1353-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkDataIndexesExtendedBucketEventCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1353+
if !s.conf.Metrics.SplunkDataIndexesExtendedBucketEventCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
13541354
return
13551355
}
13561356
i := info[typeIdx].Entries[0].Content
@@ -1420,7 +1420,7 @@ func (s *splunkScraper) scrapeIndexesBucketEventCount(_ context.Context, now pco
14201420

14211421
// Scrape indexes extended bucket hot/warm count
14221422
func (s *splunkScraper) scrapeIndexesBucketHotWarmCount(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1423-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkDataIndexesExtendedBucketHotCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1423+
if !s.conf.Metrics.SplunkDataIndexesExtendedBucketHotCount.Enabled || !s.splunkClient.isConfigured(typeIdx) {
14241424
return
14251425
}
14261426
i := info[typeIdx].Entries[0].Content
@@ -1483,7 +1483,7 @@ func (s *splunkScraper) scrapeIndexesBucketHotWarmCount(_ context.Context, now p
14831483

14841484
// Scrape introspection queues
14851485
func (s *splunkScraper) scrapeIntrospectionQueues(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1486-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkServerIntrospectionQueuesCurrent.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1486+
if !s.conf.Metrics.SplunkServerIntrospectionQueuesCurrent.Enabled || !s.splunkClient.isConfigured(typeIdx) {
14871487
return
14881488
}
14891489
i := info[typeIdx].Entries[0].Content
@@ -1531,7 +1531,7 @@ func (s *splunkScraper) scrapeIntrospectionQueues(_ context.Context, now pcommon
15311531

15321532
// Scrape introspection queues bytes
15331533
func (s *splunkScraper) scrapeIntrospectionQueuesBytes(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1534-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkServerIntrospectionQueuesCurrentBytes.Enabled || !s.splunkClient.isConfigured(typeIdx) {
1534+
if !s.conf.Metrics.SplunkServerIntrospectionQueuesCurrentBytes.Enabled || !s.splunkClient.isConfigured(typeIdx) {
15351535
return
15361536
}
15371537
i := info[typeIdx].Entries[0].Content
@@ -1578,9 +1578,9 @@ func (s *splunkScraper) scrapeIntrospectionQueuesBytes(_ context.Context, now pc
15781578

15791579
// Scrape introspection kv store status
15801580
func (s *splunkScraper) scrapeKVStoreStatus(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1581-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkKvstoreStatus.Enabled ||
1582-
!s.conf.MetricsBuilderConfig.Metrics.SplunkKvstoreReplicationStatus.Enabled ||
1583-
!s.conf.MetricsBuilderConfig.Metrics.SplunkKvstoreBackupStatus.Enabled ||
1581+
if !s.conf.Metrics.SplunkKvstoreStatus.Enabled ||
1582+
!s.conf.Metrics.SplunkKvstoreReplicationStatus.Enabled ||
1583+
!s.conf.Metrics.SplunkKvstoreBackupStatus.Enabled ||
15841584
!s.splunkClient.isConfigured(typeCm) {
15851585
return
15861586
}
@@ -1756,7 +1756,7 @@ func (s *splunkScraper) scrapeSearchArtifacts(_ context.Context, now pcommon.Tim
17561756

17571757
// Scrape Health Introspection Endpoint
17581758
func (s *splunkScraper) scrapeHealth(_ context.Context, now pcommon.Timestamp, info infoDict, errs chan error) {
1759-
if !s.conf.MetricsBuilderConfig.Metrics.SplunkHealth.Enabled {
1759+
if !s.conf.Metrics.SplunkHealth.Enabled {
17601760
return
17611761
}
17621762
i := info[typeCm].Entries[0].Content

0 commit comments

Comments
 (0)