Private
Public Access
1
0

25 Commits

Author SHA1 Message Date
c9481d12c6 feat(db): migrate from MySQL to PostgreSQL
All checks were successful
continuous-integration/drone/push Build is passing
Replace MySQL driver with pgx/v5 and pgxpool:
- Update sqlc to use postgresql engine
- Convert query.sql to PostgreSQL syntax ($1 params, CASE WHEN,
  ANY() arrays)
- Replace sql.DB with pgxpool.Pool throughout
- Change nullable types from sql.Null* to pgtype.*
- Update ID types from uint32 to int64 for PostgreSQL compatibility
- Delete MySQL-specific dynamic_connect.go
- Add opentelemetry.gowrap template for tracing
2025-11-29 10:59:15 -08:00
eb5459abf3 fix(api): protocol-aware monitor filtering for multi-protocol monitors
All checks were successful
continuous-integration/drone/push Build is passing
Servers with monitor filtering returned incorrect results when monitors
have same names but different protocols (v4/v6). Monitor lookup now
considers both name and IP version to match the correct protocol.

- Add GetMonitorByNameAndIPVersion SQL query with protocol matching
- Update history parameter parsing to use server IP version context
- Fix both /scores/{ip}/log and Grafana endpoints
- Remove unused GetMonitorByName query

Fixes abh/ntppool#264
Reported-by: Anssi Johansson <https://github.com/avijc>
2025-07-27 00:37:49 -07:00
8262b1442f feat(api): add Grafana time range endpoint for scores
- Add /api/v2/server/scores/{server}/{mode} endpoint
- Support time range queries with from/to parameters
- Return data in Grafana table format for visualization
- Fix routing pattern to handle IP addresses correctly
- Add comprehensive parameter validation and error handling
2025-07-27 02:18:32 -07:00
fd6e87cf2d fix(history): sanitize NULL bytes in CSV error output 2025-07-05 12:27:35 -07:00
a22d5ebc7e feat(api): add RTT data to history endpoints
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
- Add RTT column to CSV output (before leap column)
- Add RTT field to JSON ScoresEntry
- Add avg_rtt field to JSON MonitorEntry
- Convert RTT from microseconds to milliseconds
- Calculate average RTT per monitor from history data
2025-07-04 09:41:17 -07:00
42ce22e83e adjust cache-control for history api
All checks were successful
continuous-integration/drone/push Build is passing
it seems like there's a bug in the data calculations so many
servers get the too long maximum cache time; make it shorter
while we debug
2025-06-27 17:48:40 +08:00
087d253d90 Update schema for monitors v4; use go tool
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-06-21 03:49:02 -07:00
d206f9d20e history: fix the more nuanced cache-control max-age logic
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2024-12-30 17:33:29 -08:00
35ea262b99 go lint tweaks; update common
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-27 18:45:28 -08:00
397dd13c38 Fix 500 errors when requesting with an invalid or unknown monitor parameter
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2024-07-21 04:31:42 -07:00
79eea1d0f8 scores: improve error handling for invalid monitor parameters
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-20 00:29:36 -07:00
574c7cfbf0 Fix lint warnings
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-09 09:03:41 -08:00
e1398e7472 scores: full_history option for internal clients
All checks were successful
continuous-integration/drone/push Build is passing
(somewhat inefficient, but for now rarely used ...)
2024-01-20 23:21:21 -07:00
2f2a407409 scorer: configurable default source 2024-01-20 21:35:18 -07:00
6df51fc19f scores: clickhouse support
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-20 19:41:02 -07:00
9428c1a227 Minor logging tweak 2024-01-12 22:39:19 -08:00
19c02063e9 Make text/csv inline in the browser
All checks were successful
continuous-integration/drone/push Build is passing
... by using text/plain
https://bugs.chromium.org/p/chromium/issues/detail?id=152911
2023-12-22 09:33:14 -08:00
84523661e2 scores: Allow 10000 rows 2023-12-22 09:22:26 -08:00
6553b4711b scores: allow specifying the monitor by name
All checks were successful
continuous-integration/drone/push Build is passing
2023-12-22 08:59:13 -08:00
9280668d28 scores: support requesting logs by monitor name 2023-12-22 08:15:13 -08:00
ccc2fd401f scores: better error when monitor parameter is invalid 2023-12-22 08:11:43 -08:00
404c64b910 Return not found for more recently deleted servers, too 2023-12-14 23:17:44 -08:00
bae726dba6 scores: handle IPs with no current history
All checks were successful
continuous-integration/drone/push Build is passing
2023-12-14 20:00:09 -08:00
f6b0f96a34 scores: json handler
Some checks failed
continuous-integration/drone/push Build was killed
2023-12-10 21:42:15 -08:00
61245cc77c scores: csv handler 2023-12-10 21:02:04 -08:00