diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index e82a559f38ab..49e5ba3caa53 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -209,6 +209,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - Fixed `creation_date` scientific notation output in the `elasticsearch.index` metricset. {pull}42053[42053] - Fix bug where metricbeat unintentionally triggers Windows ASR. {pull}42177[42177] - Remove `hostname` field from zookeeper's `mntr` data stream. {pull}41887[41887] +- Continue collecting metrics even if the Cisco Meraki `getDeviceLicenses` operation fails. {pull}42397[42397] *Osquerybeat* diff --git a/x-pack/metricbeat/module/meraki/device_health/devices.go b/x-pack/metricbeat/module/meraki/device_health/devices.go index c76b76def78f..894393647a2e 100644 --- a/x-pack/metricbeat/module/meraki/device_health/devices.go +++ b/x-pack/metricbeat/module/meraki/device_health/devices.go @@ -150,6 +150,10 @@ func getDeviceChannelUtilization(client *meraki.Client, devices map[Serial]*Devi func getDeviceLicenses(client *meraki.Client, organizationID string, devices map[Serial]*Device) error { val, res, err := client.Organizations.GetOrganizationLicenses(organizationID, &meraki.GetOrganizationLicensesQueryParams{}) if err != nil { + // Ignore 400 error for per-device licensing not supported + if res.StatusCode() == 400 && strings.Contains(string(res.Body()), "does not support per-device licensing") { + return nil + } return fmt.Errorf("GetOrganizationLicenses failed; [%d] %s. %w", res.StatusCode(), res.Body(), err) }