-
Notifications
You must be signed in to change notification settings - Fork 724
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
Enable beats stack monitoring configuration #5878
Conversation
Add documentation for Beats stack monitoring
Add additional unit testing.
Fix e2e tests.
remove some unecessary tests that were added remove unused func
Add unit test for buildMonitoringConfig Fix duplicative import in test/e2e/beat/config_test.go
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.
Had a quick first look, I haven't done any testing yet.
Co-authored-by: Peter Brachwitz <peter.brachwitz@gmail.com>
…ep to avoid duplicating code. Remove duplicated code.
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.
Almost LGTM. I am having second thoughts though whether we should stick to the common
monitoring:
metrics:
elasticsearchRefs:
- name: metrics-es
logs:
elasticsearchRefs:
- name: logs-es
schema just to keep the door open for future enhancements that would for example export logs as well and to keep the CRDs somewhat uniform. Can't quite make my mind up. Maybe @thbkrkr has an opinion as well given that he wrote the original implementation.
Removing snapshot from minimal beats stack version. Adding some documentation around why 7.2 is the minimum version.
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.
I have thought about it some more and asked for opinions from others and I think now we should indeed stick with the same API schema we have for Kibana and Elasticsearch. The reasons are as originally stated: to be consistent across CRDs and to be able to add log extraction through Filebeat. It would be ok to do the log bit in a separate PR though if you prefer. It might also be good to reach out to the Observability team to get their take on the preferred way to do Beats monitoring and log extraction given that this leads to a kind of Russian doll problem where we add more Beats eg. Filebeat to monitor another Beat, which then raises the question where does one stop (but we already have that problem with the monitoring of Kibana and ES so maybe that is ok)
@pebrc I've reached out to observability, and they also suggested we use sidecars to monitor these instead of internal collectors. My changes to allow sidecars is nearly complete, with some unit tests for the functionality being taken care of, and I'll note that this is ready for another look. |
run/e2e-tests tags=beat |
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.
This looks good! I'm testing with this manifest and I get a socket permission error for Filebeat:
{
"log.level": "error",
"@timestamp": "2022-09-09T13:40:34.362Z",
"log.origin": {
"file.name": "module/wrapper.go",
"file.line": 256
},
"message": "Error fetching data for metricset beat.state: error making http request:
Get \"http://unix/state\": dial
unix /var/shared/filebeat-default-filebeat.sock: connect: permission denied",
"service.name": "metricbeat",
"ecs.version": "1.6.0"
}
I'm investigating these permission issues... |
comment changes per review. remove newlines per review.
@thbkrkr meant to update yesterday. The permission errors were from attempting to use |
When primary beat is running as root, also run sidecars as root to be able to read socket. Tests around sidecars running as root.
@thbkrkr There were additional issues found surrounding sidecar permissions reading the unix socket. These were resolved, and tests were added around this feature. It's again ready for 👀 |
Co-authored-by: Thibault Richard <thbkrkr@users.noreply.github.com>
I stepped into a trap when testing this yesterday by using one of our existing manifests with the I think we have a usability issue here with some of the existing recipes using the |
…ontainer args when stack monitoring is enabled. Update test to ensure that it's removed.
I didn't think of the scenario where the customer/recipe already had the |
…moved when logs stack monitoring is enabled.
@pebrc documentation added. Let me know how you feel about the wording. |
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.
LGTM 🚀
Co-authored-by: Thibault Richard <thbkrkr@users.noreply.github.com>
* Add stack monitoring for Beats * Public Documentation for Beats stack monitoring
Closes #5563
This change enables easy stack monitoring configuration for Beats, such as we already have for both Elasticsearch and Kibana, by adding the following configuration stanza in the Beats CRD