Releases: aguacero7/rkik
[1.2.0] - 2025-10-27
[1.2.0] - 2025-10-27
Added
- Plugin / Monitoring mode: new
--pluginmode that emits a single Centreon/Nagios/Zabbix-compatible line and returns standard plugin exit codes. - CLI flags:
--warning <MS>and--critical <MS>(both require--plugin).
Changed
- In plugin mode, the human-readable multi-line output is suppressed and only the plugin line is printed.
Notes
- Thresholds are compared against the absolute clock offset in milliseconds. If the request fails, rkik returns
UNKNOWN(exit code 3) and prints a plugin-style perfdata line with empty measurement fields.
[1.1.1] - 2025-09-19
Releasing rkik v1.1.1 - 2025-09-19
That version is a simple patch to the past 1.1.0 version, in fact it only corrects a CLI format bug.
Fixed
The problem was the following :
The output of a simple rkik --compare [...] displayed at the first line some malformated text, it was
Comparing:time.google.com 123:time.cloudflare.com and 123Then it will be :
Comparing - time.google.com:123 and time.cloudflare.com:123[1.1.0] - 2025-09-09
Releasing rkik v1.1.0 - 2025-09-09
Added
- Sync dry-run mode:
--dry-run(and its short alias, if enabled) to validate the sync workflow without changing the system clock.
Changed
syncfeature enabled by default for builds and packages.- To disable:
cargo build --no-default-features --features json
- To disable:
- CLI timing flags accept fractional seconds:
--intervaland--timeoutnow accept values like0.1,0.01,0.5.- Effective precision depends on the OS scheduler.
Fixed
- Public API cleanup for the sync module: removed the duplicate import path.
- Supported:
rkik::sync::{...} - Removed (breaking):
rkik::sync::sync::{...}
- Supported:
CI / Quality
- Clippy integrated into CI with lints treated as errors (
-D warnings) to enforce code quality.
Migration Notes
- Replace imports from
rkik::sync::sync::*withrkik::sync::*. - Scripts can now use non-integer intervals and timeouts (e.g.,
--interval 0.2).
Examples
# 10 requests at 200 ms intervals
rkik --server time.google.com --count 10 --interval 0.2
# Synchronization in dry-run mode (no clock change)
rkik --server time.google.com --sync --dry-run
# Build without the sync feature (minimal footprint)
cargo build --no-default-features --features json[1.0.0] – 2025-09-03
Added
- Port specification: query any server at any port (IPv4 or IPv6).
rkik time.google.com:123 rkik [2606:4700:f1::123]:123
- Continuous monitoring: new flags
--count,--infinite,--intervalfor repeated queries. - Library API: rkik can now be embedded as a library. Output/formatting is cleanly separated from the core.
- Short output mode:
-S/--shortfor minimalist output (text or JSON).
Changed
-
Refactored codebase: modular project structure for easier maintenance and library usage.
. ├── adapters │ ├── mod.rs │ ├── ntp_client.rs │ └── resolver.rs ├── bin │ └── rkik.rs ├── domain │ ├── mod.rs │ └── ntp.rs ├── error.rs ├── fmt │ ├── json.rs │ ├── mod.rs │ └── text.rs ├── lib.rs ├── services │ ├── compare.rs │ ├── mod.rs │ └── query.rs ├── stats.rs └── sync ├── mod.rs └── sync.rsSee the developer guide.
-
Error handling: more detailed and consistent error messages via
RkikErrorenum:pub enum RkikError { /// DNS resolution failure. #[error("dns: {0}")] Dns(String), /// Network related error. #[error("network: {0}")] Network(String), /// Protocol violation. #[error("protocol: {0}")] Protocol(String), /// Underlying IO error. #[error(transparent)] Io(#[from] std::io::Error), /// Other error cases. #[error("other: {0}")] Other(String), }
Improved
-
JSON integration:
- Now powered by
serde_json(thanks @Lucy-dot-dot). --verboseadds valuable metadata.--prettyor-pfor pretty-printed JSON.- Example:
rkik -jp time.google.com
{ "schema_version": 1, "run_ts": "2025-09-03T15:31:47.000441791+00:00", "results": [ { "name": "time.google.com", "ip": "216.239.35.0", "port": 123, "offset_ms": -0.17485080752521753, "rtt_ms": 12.200339464470744, "utc": "2025-09-03T15:31:47.000155742+00:00", "local": "2025-09-03 17:31:47", "timestamp": null } ] }
- Now powered by
-
Convenience flags:
--jsonor-j: alias for--format json.--no-color: disable ANSI styling, always plain text if requested.
New Contributors
- @Lucy-dot-dot made their first contribution in #13 with JSON engine improvement
Full Changelog: v0.6.0...v1.0.0
v0.6.1
v0.5.1
v0.4.1
v0.3.2
v0.6.0
What's Changed
- feat: add short version of the arguments by @aguacero7 in #8
- feat(async): Implement Async comparation between X Servers by @aguacero7 in #12
Async Comparison Mode
The --compare flag now supports comparing 2 or more NTP servers in parallel, powered by tokio. This results in significantly improved performance and better scalability for auditing drift across multiple time sources.
rkik --compare time.google.com time.cloudflare.com 0.pool.ntp.org-
Async Foundation for Future Use Cases
The asynchronous implementation is now a clean foundation for future monitoring, scheduling, or background tasks using tokio. -
Dynamic Server Count in --compare
No longer limited to 2 servers — the comparison now accepts up to 10 servers and returns a comprehensive view of offsets and drift. -
Improved CLI Argument Parsing
The --compare flag uses num_args = 2..10, enabling natural and flexible command-line usage.
Improvements
- Full refactor of compare_servers into async logic with join_all.
- Better error reporting during comparison phase (resolvable vs. unreachable servers).
- Refactored architecture to cleanly separate sync and async code paths.
- CLI gracefully switches between sync and async depending on operation mode.
CLI Ergonomics
Short flags added for faster interaction:
-C = --compare
-v = --verbose
-6 = --ipv6
-s = --server
Full Changelog: v0.5.0...v0.6.0
v0.5.0
Rkik v0.5.0
What's Changed
- Feat/ipv6 by @aguacero7 in #7
-
Explicit IPv6 support:
--ipv6 now enforces IPv6 resolution (AAAA only), socket binding to ::0, and clean error fallback if no address is found. -
IPv4 prioritized by default:
Even if the DNS resolver returns AAAA first (due to cache or OS preference), rkik prefers A records unless --ipv6 is set. This avoids unpredictable behavior. -
Low-level querying control:
Instead of querying hostnames directly, rkik resolves the IP manually and synchronizes using SocketAddr, preventing silent fallback across IP versions. -
Improved logs and output:
Whether in --format text or --format json, the IP version used (v4/v6) is clearly shown. This helps avoid false assumptions in dual-stack environments. -
Test suite improvements:
Includes unit tests for resolution behavior (IPv4 vs IPv6) and CLI output in JSON/text. Network tests are isolated and skipped during CI (e.g. via environment filter).
Full Changelog: v0.4.0...v0.5.0