{"id":18030849,"url":"https://github.com/atc0005/check-ntpt","last_synced_at":"2025-09-18T00:32:50.287Z","repository":{"id":38828774,"uuid":"285111506","full_name":"atc0005/check-ntpt","owner":"atc0005","description":"Go-based tooling to monitor Network Time Protocol (NTP) servers.","archived":false,"fork":false,"pushed_at":"2024-12-19T08:47:06.000Z","size":4167,"stargazers_count":4,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T19:07:42.450Z","etag":null,"topics":["client","go","golang","monitoring","nagios","nagios-plugin","ntp","plugin","time"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atc0005.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-04T22:09:39.000Z","updated_at":"2024-12-04T15:59:30.000Z","dependencies_parsed_at":"2024-04-11T12:24:36.123Z","dependency_job_id":"7cc744c7-24eb-4817-9bfc-4be84f1d180d","html_url":"https://github.com/atc0005/check-ntpt","commit_stats":null,"previous_names":["atc0005/ntpt"],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atc0005%2Fcheck-ntpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atc0005%2Fcheck-ntpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atc0005%2Fcheck-ntpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atc0005%2Fcheck-ntpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atc0005","download_url":"https://codeload.github.com/atc0005/check-ntpt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233434081,"owners_count":18675668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","go","golang","monitoring","nagios","nagios-plugin","ntp","plugin","time"],"created_at":"2024-10-30T09:15:20.487Z","updated_at":"2025-09-18T00:32:44.627Z","avatar_url":"https://github.com/atc0005.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# check-ntpt\n\nGo-based tooling to monitor Network Time Protocol (NTP) servers.\n\n[![Latest Release](https://img.shields.io/github/release/atc0005/ntpt.svg?style=flat-square)](https://github.com/atc0005/check-ntpt/releases/latest)\n[![Go Reference](https://pkg.go.dev/badge/github.com/atc0005/ntpt.svg)](https://pkg.go.dev/github.com/atc0005/ntpt)\n[![go.mod Go version](https://img.shields.io/github/go-mod/go-version/atc0005/check-ntpt)](https://github.com/atc0005/check-ntpt)\n[![Lint and Build](https://github.com/atc0005/check-ntpt/actions/workflows/lint-and-build.yml/badge.svg)](https://github.com/atc0005/check-ntpt/actions/workflows/lint-and-build.yml)\n[![Project Analysis](https://github.com/atc0005/check-ntpt/actions/workflows/project-analysis.yml/badge.svg)](https://github.com/atc0005/check-ntpt/actions/workflows/project-analysis.yml)\n\n- [check-ntpt](#check-ntpt)\n  - [Project home](#project-home)\n  - [Overview](#overview)\n  - [Changelog](#changelog)\n  - [Requirements](#requirements)\n    - [Building source code](#building-source-code)\n    - [Running](#running)\n  - [Installation](#installation)\n    - [From source](#from-source)\n    - [Using release binaries](#using-release-binaries)\n  - [Configuration](#configuration)\n    - [Command-line arguments](#command-line-arguments)\n  - [Examples](#examples)\n    - [Basic usage](#basic-usage)\n    - [Verbose output](#verbose-output)\n  - [References](#references)\n\n## Project home\n\nSee [our GitHub repo][repo-url] for the latest code, to file an issue or\nsubmit improvements for review and potential inclusion into the project.\n\n## Overview\n\nGo-based tooling to monitor Network Time Protocol (NTP) servers.\n\nAt present, the `ntpt` binary is the only tool provided by this repo. This\ntool performs a NTP query against a specified server for testing purposes.\n\nFuture plans include providing one (or more) Nagios plugins to monitor NTP\nservers.\n\n## Changelog\n\nSee the [`CHANGELOG.md`](CHANGELOG.md) file for the changes associated with\neach release of this application. Changes that have been merged to `master`,\nbut not yet an official release may also be noted in the file under the\n`Unreleased` section. A helpful link to the Git commit history since the last\nofficial release is also provided for further review.\n\n## Requirements\n\nThe following is a loose guideline. Other combinations of Go and operating\nsystems for building and running tools from this repo may work, but have not\nbeen tested.\n\n### Building source code\n\n- Go\n  - see this project's `go.mod` file for *preferred* version\n  - this project tests against [officially supported Go\n    releases][go-supported-releases]\n    - the most recent stable release (aka, \"stable\")\n    - the prior, but still supported release (aka, \"oldstable\")\n- GCC\n  - if building with custom options (as the provided `Makefile` does)\n- `make`\n  - if using the provided `Makefile`\n\n### Running\n\n- Windows 10\n- Ubuntu Linux 18.04+\n\n## Installation\n\n### From source\n\n1. [Download][go-docs-download] Go\n1. [Install][go-docs-install] Go\n1. Clone the repo\n   1. `cd /tmp`\n   1. `git clone https://github.com/atc0005/check-ntpt`\n   1. `cd ntpt`\n1. Install dependencies (optional)\n   - for Ubuntu Linux\n     - `sudo apt-get install make gcc`\n   - for CentOS Linux\n     1. `sudo yum install make gcc`\n1. Build\n   - for current operating system\n     - `go build -mod=vendor ./cmd/ntpt/`\n       - *forces build to use bundled dependencies in top-level `vendor`\n         folder*\n   - for all supported platforms (where `make` is installed)\n      - `make all`\n   - for Windows\n      - `make windows`\n   - for Linux\n     - `make linux`\n1. Copy the applicable binary to whatever systems needs to run it\n   - if using `Makefile`: look in `/tmp/ntpt/release_assets/ntpt/`\n   - if using `go build`: look in `/tmp/ntpt/`\n\n**NOTE**: Depending on which `Makefile` recipe you use the generated binary\nmay be compressed and have an `xz` extension. If so, you should decompress the\nbinary first before deploying it (e.g., `xz -d ntpt-linux-amd64.xz`).\n\n### Using release binaries\n\n1. Download the [latest\n   release](https://github.com/atc0005/check-ntpt/releases/latest) binaries\n1. Decompress binaries\n   - e.g., `xz -d ntpt-linux-amd64.xz`\n1. Deploy\n   - Place `ntpt` in a location of your choice\n     - e.g., `/usr/local/bin/`\n\n**NOTE**:\n\nDEB and RPM packages are provided as an alternative to manually deploying\nbinaries.\n\n## Configuration\n\n### Command-line arguments\n\n- Flags marked as **`required`** must be set via CLI flag *or* within a\n  TOML-formatted configuration file.\n- Flags *not* marked as required are for settings where a useful default is\n  already defined.\n\n| Flag           | Required | Default        | Repeat | Possible                                              | Description                                             |\n| -------------- | -------- | -------------- | ------ | ----------------------------------------------------- | ------------------------------------------------------- |\n| `h`, `help`    | No       | `false`        | No     | `h`, `help`                                           | Show Help text along with the list of supported flags.  |\n| `s`, `server`  | **Yes**  | *empty string* | **No** | *one valid IP Address or fully-qualified server name* | NTP server to submit query against.                     |\n| `v`, `verbose` | No       | `false`        | **No** | `true`, `false`                                       | Enables display of verbose output. Disabled by default. |\n\n## Examples\n\n### Basic usage\n\n```console\n$ ./ntpt -s pool.ntp.org\nCurrent time from pool.ntp.org: 2022-08-15 06:16:11.139364388 -0500 CDT m=-0.121229211\nCurrent time from local system: 2022-08-15 06:16:11.5944353 -0500 CDT m=+0.333841701\n\nThe local system is -456.993422ms behind pool.ntp.org.\n```\n\n### Verbose output\n\n```console\n$ ./ntpt -v -s pool.ntp.org\nCurrent time from pool.ntp.org: 2022-08-15 06:16:41.864305139 -0500 CDT m=-0.193111660\nCurrent time from local system: 2022-08-15 06:16:42.3228386 -0500 CDT m=+0.265421801\n\nResponse from NTP server \"pool.ntp.org\":\n        Time: 2022-08-15 11:16:41.968756524 +0000 UTC\n        ClockOffset: -459.00146ms\n        RTT: 203.878832ms\n        Stratum: 2\n        ReferenceID: 167864580\n        ReferenceTime: 2022-08-15 11:16:39.020873716 +0000 UTC\n        RootDelay: 213.623µs\n        RootDispersion: 30.518µs\n        RootDistance: 102.076745ms\n        Leap: 0\n        MinError: 357.062044ms\n        KissCode: \"\"\n\nOffset adjusted time: 2022-08-15 06:16:42.07080214 -0500 CDT m=+0.013385341\n```\n\n## References\n\n- \u003chttps://github.com/beevik/ntp\u003e\n\n\u003c!-- Footnotes here  --\u003e\n\n[repo-url]: \u003chttps://github.com/atc0005/check-ntpt\u003e  \"This project's GitHub repo\"\n\n[go-docs-download]: \u003chttps://golang.org/dl\u003e  \"Download Go\"\n\n[go-docs-install]: \u003chttps://golang.org/doc/install\u003e  \"Install Go\"\n\n[go-supported-releases]: \u003chttps://go.dev/doc/devel/release#policy\u003e \"Go Release Policy\"\n\n\u003c!-- []: PLACEHOLDER \"DESCRIPTION_HERE\" --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatc0005%2Fcheck-ntpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatc0005%2Fcheck-ntpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatc0005%2Fcheck-ntpt/lists"}