Commit Graph

48 Commits

Author SHA1 Message Date
奶爸 e61772e858 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
UUBulb 1d2f8d24f6 feat: update to go1.24 & support listening https (#1002)
* feat: support listening https

* refactor

* modernize

* support snake case in config

* more precise control of config fields

* update goreleaser config

* remove kubeyaml

* fix: expose agent_secret

* chore
2025-02-28 22:02:54 +08:00
naiba 3cce7ebf01 rename repo 2024-11-28 19:38:54 +08:00
naiba 29e2e2f7b2 fix: typo 2024-10-30 23:31:04 +08:00
naiba ae18401351 fix ci 2024-10-30 23:22:37 +08:00
UUBulb 23751440c6 [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 65afad89eb [agent] splitting the agent into separate repositories 2023-05-11 00:08:54 +08:00
naiba bcc1f2a6a5 🚀 dashboard & agent v0.14.0 2022-09-15 09:17:10 +08:00
王佳辉 132029fb76 Add FreeBSD Agent For Goreleaser 2022-06-28 20:34:59 +08:00
Erope c8d1080131 Add CGO for Mac 2022-05-23 20:45:46 +08:00
naiba e8871253db 🔖 release 改为 .zip 2022-04-28 23:39:44 +08:00
naiba 165411a12b 💩 2022-01-18 20:41:51 +08:00
Erope 391195869a Agent支持IBM-S390X和RISCV64架构 2021-12-02 22:55:21 +08:00
naiba 5ffa46b377 🔊 修复 release log 每次只生成一条的问题 2021-11-09 10:12:47 +08:00
naiba c1d054b88e 🔖 dashboard v0.11.6 2021-11-06 18:53:19 +08:00
naiba d20fd7a9fe 🐛 修复 arm/mips 的自动更新问题 2021-11-04 19:52:15 +08:00
naiba 58d17b69a1 批量更新 Agent 2021-11-04 12:06:20 +08:00
naiba f0e0867a3d 🔖 archive file name 2021-11-03 21:48:24 +08:00
naiba e80f12e210 👷 goreleaser config update 2021-11-03 21:40:22 +08:00
naiba e12d87f2ce 👷 macOS universal binaries support 2021-11-03 21:05:18 +08:00
naiba 948f398509 👷 macOS universal binaries support 2021-11-03 09:36:18 +08:00
naiba 6999accb3a 📦 为 MT7621 系列路由添加 mipsle-softfloat 编译 close #128 2021-05-28 18:22:39 +08:00
naiba e93d58d498 🚸 移除 upx,编译 arm64/mips 存在问题 2021-05-26 16:33:32 +08:00
naiba 2adcc9cbc1 🐛 版本号丢失 2021-04-29 00:22:47 +08:00
naiba 68424b6309 remove undefind env 2021-04-29 00:11:48 +08:00
naiba a47998e046 👷 2021-04-29 00:08:42 +08:00
naiba f294b655a2 👷 取消对 mips64 的打包 2021-04-29 00:06:33 +08:00
naiba 94c4a3ef61 ✏️ typo: npx --> upx 2021-04-28 23:53:56 +08:00
naiba 584e406af1 🚸 大幅缩减 agent 二进制体积 2021-04-28 23:21:54 +08:00
naiba 50f07f9c7a 🐛 agent build 2021-04-26 00:07:55 +08:00
naiba d7a3ba607b 🔊 v0.3.0 计划任务(定期备份等场景) 2021-01-19 09:59:04 +08:00
naiba feb9e8d2d6 optimize 2020-12-21 19:21:00 +08:00
naiba a203580ecf feat(agent): ARM 实验性支持-未测试 2020-12-21 19:14:50 +08:00
naiba a9b1ab9e95 💩 2020-12-13 11:53:04 +08:00
naiba e1f0952223 Revert "💩"
This reverts commit 4d4e332a55.
2020-12-13 11:37:46 +08:00
naiba 4d4e332a55 💩 2020-12-13 11:28:06 +08:00
naiba 6e9713a983 测试 go mod 兼容 2020-12-13 11:01:43 +08:00
naiba dbdb0c412c 💩 由于 go mod 依赖错综复杂,停止对 Windows 旧版本的支持计划 2020-12-13 02:11:24 +08:00
naiba 050a9b71c1 最终测试 gomod 兼容 2020-12-13 02:06:28 +08:00
naiba 222c119e54 test fix 2020-12-13 01:40:30 +08:00
naiba 84ba9dc98b 🐛 fix missed package 2020-12-13 01:36:25 +08:00
naiba 04693a69da 💚 fix go get 2020-12-13 00:35:17 +08:00
naiba 7f5fd66470 fix 2020-12-13 00:30:08 +08:00
naiba eddfbe0087 🐛 fix go releaser 2020-12-13 00:27:42 +08:00
naiba 5da95f8d17 self update 2020-11-30 00:07:27 +08:00
naiba 02af272a2f test 2020-11-29 23:07:31 +08:00
naiba a7cc7ac49b 🔨 rename 2020-11-29 22:38:17 +08:00
naiba 7fdf323c05 一键脚本 2020-11-29 22:17:40 +08:00