Commit Graph
47 Commits
Author SHA1 Message Date
naibaandnaiba/CloudCode 241506e390 chore: bump Go to 1.26, update dependencies and frontend templates
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-03-20 11:23:03 +00:00
3d0c9b963c feat(v2.0.0): tsdb (#1162)
* feat: tsdb

* fix(ci): remove --parseGoList=false from swag init to fix dependency resolution

* fix(ci): fix swag init directory and temporary remove s390x support due to cgo issues

* fix(ci): fix swag init output directory to cmd/dashboard/docs

* fix(ci): set GOTOOLCHAIN=auto for gosec

* feat: add system storage maintenance for SQLite and TSDB

* shit

* feat: add s390x support and improve service monitoring

* ci: upgrade goreleaser-cross image to v1.25

* ci: add libzstd-dev:s390x for cross-compilation

* ci: build libzstd for s390x from source

* ci: add libzstd_linux_s390x.go for gozstd linking

* ci: use vendor mode for s390x gozstd build

* ci: clone zstd source for s390x build

* refactor(tsdb): rename MaxDiskUsageGB to MinFreeDiskSpaceGB and optimize queries

- Rename config to accurately reflect VictoriaMetrics behavior: minimum free disk space threshold
- Add QueryServiceHistoryByServerID for batch query optimization
- Fix hasStatus to avoid false status counting when only delay data exists
- Fix service aggregation boundary: use successCount*2 >= count
- Fix serviceID parsing with strconv.ParseUint error handling
- Add TagFiltersCacheSize for better query performance

* feat(api): add server metrics endpoint and simplify service history response

- Add /server/:id/metrics API for querying TSDB server metrics
- Simplify getServiceHistory by removing redundant data conversion
- Change AvgDelay type from float32 to float64
- Remove generated swagger docs (to be regenerated)
- Update TSDB query, writer and tests

* chore: 临时禁用不支持前端

* ci: cache zstd build for s390x to speed up CI

* fix(tsdb): fix race conditions, data correctness and optimize performance

- Fix TOCTOU race between IsClosed() and write/query by holding RLock
- Fix delay=0 excluded from stats by using hasDelay flag instead of value > 0
- Fix fmt.Sscanf -> strconv.ParseUint for server_id parsing with error logging
- Fix buffer unbounded growth by flushing inside lock when over maxSize
- Split makeMetricRow into makeServerMetricRow/makeServiceMetricRow
- Extract InitGlobalSettings() from Open() for VictoriaMetrics globals
- Remove redundant instance/GetInstance/SetInstance singleton
- Add error logging for silently skipped block decode errors
- Optimize WriteBatch* to build all rows in single write call
- Optimize downsample to use linear scan instead of map for sorted data
- Optimize query slice reuse across block iterations

* 服务添加DisplayIndex (#1166)

* 服务添加DisplayIndex

* 根据ai建议修改

---------

Co-authored-by: huYang <306061454@qq.com>

* fix(tsdb): restore SQLite fallback and monthly status reload on restart

- Restore ServiceHistory model and SQLite write fallback when TSDB is disabled
- Reload monthlyStatus (30-day) and serviceStatusToday from TSDB/SQLite on startup
- Add SQLite fallback query for /service/:id/history and /server/:id/service
- Remove breaking GET /service/:id endpoint, keep /service/:id/history only
- Add QueryServiceDailyStats to TSDB for per-day aggregation
- Add tests for monthly status and today stats loading from both TSDB and SQLite
- Migrate ServiceHistory table only when TSDB is disabled

* ci: exclude false-positive gosec rules G117, G703, G704

* feat(api): expose tsdb_enabled in setting response

* ci: restore G115 exclusion accidentally dropped in previous commit

* fix: update version numbers for OfficialAdmin and Official templates

* chore: upgrade frontend

* chore: upgrade frontend

---------

Co-authored-by: 胡说丷刂 <34758853+laosan-xx@users.noreply.github.com>
Co-authored-by: huYang <306061454@qq.com>
2026-02-15 13:13:33 +08:00
naiba 3b2cefdd07 feat: binding ip with session
🛡️staying safe even your frontend was hacked
2025-10-09 21:36:59 +08:00
UUBulb d2ffe106ac ci: use go1.24 (#1012) 2025-02-28 22:19:57 +08:00
naiba cd311b4ae6 feat: v1.5.2 2025-01-01 01:02:02 +08:00
UUBulb 178d847836 fix windows ci (#934)
* fix windows ci

* perm

* use custom writer

* remove patches

* fuck codeql
2025-01-01 00:58:57 +08:00
naiba fcb0ced018 improve: 404 status code 2024-12-31 23:58:44 +08:00
naiba a3a7d70c8c fix: swago 2024-11-29 21:55:29 +08:00
naiba 986eb0b340 Revert "ci: comment out costly things (#4)"
This reverts commit 3168055948.
2024-11-28 19:43:50 +08:00
UUBulb 997ae8d8e4 ci: comment out costly things (#4) 2024-11-10 07:09:38 +08:00
naiba ed9050ad57 feat: update admin-dist 2024-10-24 22:35:26 +08:00
naiba 0a859c75d7 fix ci 2024-10-21 23:14:31 +08:00
naiba d8f36a1665 fix ci 2024-10-21 23:04:38 +08:00
naiba 821baba639 feat: server group api 2024-10-21 23:00:51 +08:00
naiba 80740ddf39 refactor agent auth & server api 2024-10-20 23:23:04 +08:00
naiba fa1d567f2e fix ci 2024-10-20 14:09:29 +08:00
naiba e652ea3008 fix ci 2024-10-19 23:17:14 +08:00
naiba 37c87bbc07 🎉 init swaggo 2024-10-19 23:14:53 +08:00
UUBulbandnap0o bf9c6d669a ddns: store configuation in database (#435)
* ddns: store configuation in database

Co-authored-by: nap0o <144927971+nap0o@users.noreply.github.com>

* feat: split domain with soa lookup

* switch to libdns interface

* ddns: add unit test

* ddns: skip TestSplitDomainSOA on ci

network is not steady

* fix error handling

* fix error handling

---------

Co-authored-by: nap0o <144927971+nap0o@users.noreply.github.com>
2024-10-17 21:03:03 +08:00
naiba 4417eefdfe chore: ignore gosec errors 2024-10-02 10:10:06 +08:00
UUBulb 8424c4e756 [ci][docker]: use matrix to reduce build time & change base image to busybox (#417)
* ci: use matrix to reduce build time

* docker: change base image to busybox

* reuse workflows

* only download ipinfo db on tag pushes

* goreleaser
2024-09-02 22:13:13 +08:00
naiba 9d023f4f8b chore: go 1.21.x 2024-07-13 13:11:40 +08:00
naiba 6c1f82dccb fix: build 2024-07-13 13:00:48 +08:00
UUBulb 22242e967e ci: using time/tzdata package to provide zoneinfo (#365) 2024-06-14 10:24:58 +08:00
naiba d9776e21ce Update Go version to 1.20.x in GitHub workflows 2024-04-06 14:25:29 +08:00
naiba 3c451ea51b update ci 2024-04-06 11:51:08 +08:00
naiba c870114ccc Update GitHub Actions workflow to include specific paths 2023-11-30 09:52:24 +08:00
naiba 9bcdb40ecd 📦 static link 2023-11-29 15:45:32 +08:00
naiba 05eb0e9bf2 Update release and test workflows 2023-11-28 23:18:29 +08:00
naiba 119df9e980 sync to jihulab 2023-10-26 23:29:20 +08:00
naiba f62f68fbeb fix gosec (3 2023-10-21 22:21:21 +08:00
naiba b57ced1329 update workflows 2023-10-21 18:27:25 +08:00
naiba 90469dfba7 clean: remove agent 💩 2023-05-11 00:13:11 +08:00
naiba ad32426ab0 [agent] splitting the agent into separate repositories 2023-05-11 00:08:54 +08:00
naiba 7cc07d9962 update contributors avatar size 2023-05-08 12:48:50 +08:00
naiba 15f4816e1f 🔒️ more secure token generation 2022-12-16 23:34:14 +08:00
naiba d75d5f82fd ⬆️ Upgrade dependencies 2022-08-13 11:40:10 +08:00
naiba f82d63fe8e fix code scan alerts 2022-04-18 20:45:07 +08:00
naiba e1e1687f00 💩 优化 CountryCode 获取 2022-03-31 22:59:07 +08:00
naiba 7aa29b2469 ⬆️ Upgrade to Go v1.18.0 2022-03-22 18:46:18 +08:00
naiba 7407529ba2 💚 fix gosec 2021-11-04 13:02:07 +08:00
naiba 62c19cfac2 💚 更新 Go 版本 2021-11-04 12:55:12 +08:00
naiba 410c40f53d 👷 goreleaser config update 2021-11-03 21:40:22 +08:00
naiba 849aa335af update ci 2021-09-04 12:51:02 +08:00
naiba b6dde7d324 gosec 2021-09-04 12:42:51 +08:00
naiba 5adef0c6a4 👷 2021-09-04 12:19:59 +08:00
naiba 2f3a6d2f0e 👷 [skip ci] gosec code scanner 2021-09-04 12:18:12 +08:00