Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[metricbeat] meraki module with device_health metricset (#40836)
* inital meraki module and metricsets * initial refactor for single meraki metricset device_health * added tunnel support aka VPN support by Device * adding interfaces aka switch ports and switch port status * processing review comments * refactored for comments * fixing default metricset * Removing unused variables and adding text to required variables * add go module deps * fixing for loop and starting on fields yml * remove %d from loop condition * fixing review comments and loss latency * update dashboard-api lib to version with MIT licensed ratelimiter * remove unused fields in metricset struct * remove device details for now * Major refactor to improve overall readability and device status/metric associations. This commit removes a couple of data points from the original code, namely: - network appliance port settings - these settings are not defined per-device, but per-network, and as such don't fit into the current naming taxonomy. - site-to-site VPN settings - similarly to the above, these are not per-device attibutes. In addition there is a limitation included on including only a single metric bucket (as returned from the API) per metricbeat collection loop. There needs to be some better logging/config validation on this, which will come later; for now, just run with a maximum 5 minute collection interval. This commit includes the field mappings too, but it currently causes events to get dropped due to the index field limit getting hit (max 10k fields). You can get around this by setting 'setup.template.settings.index.mapping.total_fields.limit' to a higher value. We maybe can't include all these mappings in the metricbeat module, but for now they are here to allow testing with standalone metricbeat. * Add maximum collection interval check to avoid missing uplink loss and latency metrics. Remove 'percent' units, because the data does not fit the 0-1 elastic interpretation of percent. * revert accidental changes to reference config * add example in data.json * review comments: license headers, missing/incorrect mapping * result of 'go mod tidy' ... trying to unblock the CI builds * fix linter issues * update NOTICE.txt * add release tag to fields.yml, update docs * review feedback: keyword -> dat * commit results of 'make update' in x-pack metricbeat for CI * remove mappings to avoid hitting field limits in global metricbeat index template * add one field back to please the docs CI * more linter errors guarding against shared loop var pointers * fix error introduced in previous commit * add exception for golangci-lint G601 which is no longer required in go1.22+ * remove the guards against taking addresses of loop vars * i can't get the golanglint-ci config to get picked up, so i'm reverting that change and putting back the annoying index loop code * Update go.mod to match toolchain version to .go-version Co-authored-by: Craig MacKenzie <[email protected]> --------- Co-authored-by: Dan Hiebert <[email protected]> Co-authored-by: Craig MacKenzie <[email protected]> (cherry picked from commit ae71c67) # Conflicts: # NOTICE.txt # go.mod # go.sum # x-pack/metricbeat/metricbeat.reference.yml
- Loading branch information