-
Notifications
You must be signed in to change notification settings - Fork 22
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
Check ephemeral ID of every Beat #74
Conversation
- name: 'Get {{ beat_name }} metrics from logs' | ||
shell: 'grep "Total non-zero metrics" {{ beat_log_file }} | tail -1' | ||
register: log_metrics | ||
when: ansible_system != "Win32NT" |
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.
You can omit these checks because common
really means POSIX. So this file never gets used on Windows.
|
||
- name: 'Check {{ beat_name }} has ephemeral ID' | ||
assert: | ||
that: "log_metrics_event.monitoring.metrics.beat.info.ephemeral_id" |
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 think this should also be checking for process cpu/mem/uptime, system load, and system cpu. On Windows, do the same but assert that system load does not exist.
select-string -Encoding UTF8 "Total non-zero" | | ||
Select -Expandproperty Line | select -First 1' | ||
register: log_metrics_win | ||
when: ansible_system == "Win32NT" |
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.
You can omit this check because this file is only included on win32nt.
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.
By adding these tests we discovered an issue where Packetbeat is not exiting cleanly on three Linux versions (ubuntu-1604, awslinux, and opensuse) and this causes these new tests to fail. I opened an issue for Packetbeat, but the solution isn't clear yet. elastic/beats#6535 |
@kvch Some of the checks for metrics are failing. I think it is because zero values are filtered by the logging code (it logs "non-zero" metrics only). I think a more reliable way to verify these metrics would be to fetch the full set of metrics using the HTTP endpoint.
|
This PR includes assertions which check if a Beat has an ephemeral ID in its monitoring event.
If a Beat has an ephemeral ID, it can be shown in XPack Monitoring. (It's still possible that some metrics are not available, due to the lack of CGO.)
Required by elastic/beats#6501