[metricbeat] [system] add NTP metricset
Proposed commit message
Add new Network Time Protocol (NTP) metricset to the system integration.
This is a simple wrapper around an SNTP client which allows monitoring of system clock offset compared to the configured NTP server.
Checklist
- [x] My code follows the style guidelines of this project
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have made corresponding change to the default configuration files
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have added an entry in
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.
:robot: GitHub comments
Expand to view the GitHub comments
Just comment with:
rundocs-build: Re-trigger the docs validation. (use unformatted text in the comment!)
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @tommyers-elastic? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-8./dis the label to automatically backport to the8./dbranch./dis the digitbackport-active-allis the label that automatically backports to all active branches.backport-active-8is the label that automatically backports to all active minor branches for the 8 major.backport-active-9is the label that automatically backports to all active minor branches for the 9 major.
This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b system/ntp upstream/system/ntp
git merge upstream/main
git push upstream system/ntp
Pinging @elastic/integrations (Team:Integrations)
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)
🔍 Preview links for changed docs
This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b system/ntp upstream/system/ntp
git merge upstream/main
git push upstream system/ntp
@AndersonQ the hosts config should not be prefixed
metricbeat.modules:
- module: system
period: 1s
metricsets: ["ntp"]
hosts: ["0.pool.ntp.org", "1.pool.ntp.org"]
i'll update this - because i see now that if you configured multiple metricsets here it errors out (see output below if you also configure cpu). the NTP config needs to be namespaced.
Exiting: host parsing failed for system-cpu: hosts must be empty for system
@AndersonQ the hosts config should not be prefixed
metricbeat.modules: - module: system period: 1s metricsets: ["ntp"] hosts: ["0.pool.ntp.org", "1.pool.ntp.org"]i'll update this - because i see now that if you configured multiple metricsets here it errors out (see output below if you also configure cpu). the NTP config needs to be namespaced.
Exiting: host parsing failed for system-cpu: hosts must be empty for system
ok, let me know when it's ready for re-review
@AndersonQ we should be good to go