-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[metricbeat] meraki module with device_health metricset #40836
[metricbeat] meraki module with device_health metricset #40836
Conversation
…c 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.
…d latency metrics. Remove 'percent' units, because the data does not fit the 0-1 elastic interpretation of percent.
The lint error is due to implicit memory aliasing within for loop.
|
ah yeh thanks, i thought i fixed all these already. this issue actually has dissapeared in go1.22. i was gonna just put a global ignore rule for the linter error, but figured it might be easier to just guard against in the code. maybe i'll do both. |
the more of these i fix the more the linter seems to find. since there's not really any need to do it, i reverted the fixes and added the exclude rule for the linkter. |
…ng that change and putting back the annoying index loop code
Co-authored-by: Craig MacKenzie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving go.mod changes.
* 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
* 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)
) * 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) Co-authored-by: Tom Myers <[email protected]>
… metricset (#40862) * [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 * fix go.mod merge conflict * fix merge errors in NOTICE.txt * fix merge errors in metricbeat.reference.yml * add result of running 'mage update' --------- Co-authored-by: Tom Myers <[email protected]>
Proposed commit message
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs