Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Stack Monitoring data stream to 9 #42823

Merged
merged 8 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Update Stack Monitoring data stream to 9
  • Loading branch information
consulthys committed Feb 21, 2025
commit 4287b0a1df35ae27d7eba51e19e829fe207bc935
2 changes: 1 addition & 1 deletion metricbeat/helper/elastic/elastic.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
// MakeXPackMonitoringIndexName method returns the name of the monitoring index for
// a given product { elasticsearch, kibana, logstash, beats }
func MakeXPackMonitoringIndexName(product Product) string {
const version = "8"
const version = "9"

return fmt.Sprintf(".monitoring-%v-%v-mb", product.xPackMonitoringIndexString(), version)
}
Expand All @@ -100,7 +100,7 @@
// MakeErrorForMissingField returns an error message for the given field being missing in an API
// response received from a given product
func MakeErrorForMissingField(field string, product Product) error {
return fmt.Errorf("Could not find field '%v' in %v API response", field, strings.Title(product.String()))

Check failure on line 103 in metricbeat/helper/elastic/elastic.go

View workflow job for this annotation

GitHub Actions / lint (windows)

SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead. (staticcheck)
}

// IsFeatureAvailable returns whether a feature is available in the current product version
Expand All @@ -120,7 +120,7 @@
// for it's date fields: https://github.com/elastic/elasticsearch/pull/36691
func FixTimestampField(m mapstr.M, field string) error {
v, err := m.GetValue(field)
if err == mapstr.ErrKeyNotFound {

Check failure on line 123 in metricbeat/helper/elastic/elastic.go

View workflow job for this annotation

GitHub Actions / lint (windows)

comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
return nil
}
if err != nil {
Expand Down Expand Up @@ -161,10 +161,10 @@
metricsets := xpackEnabledMetricsets
if err == nil && cfgdMetricsets != nil {
// Type cast the metricsets to a slice of strings
cfgdMetricsetsSlice := cfgdMetricsets.([]interface{})

Check failure on line 164 in metricbeat/helper/elastic/elastic.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value is not checked (errcheck)
cfgdMetricsetsStrings := make([]string, len(cfgdMetricsetsSlice))
for i := range cfgdMetricsetsSlice {
cfgdMetricsetsStrings[i] = cfgdMetricsetsSlice[i].(string)

Check failure on line 167 in metricbeat/helper/elastic/elastic.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value is not checked (errcheck)
}

// Add any optional metricsets which are not already configured
Expand Down
8 changes: 4 additions & 4 deletions metricbeat/helper/elastic/elastic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ func TestMakeXPackMonitoringIndexName(t *testing.T) {
{
"Elasticsearch monitoring index",
Elasticsearch,
".monitoring-es-8-mb",
".monitoring-es-9-mb",
},
{
"Kibana monitoring index",
Kibana,
".monitoring-kibana-8-mb",
".monitoring-kibana-9-mb",
},
{
"Logstash monitoring index",
Logstash,
".monitoring-logstash-8-mb",
".monitoring-logstash-9-mb",
},
{
"Beats monitoring index",
Beats,
".monitoring-beats-8-mb",
".monitoring-beats-9-mb",
},
}

Expand Down
Loading