Commit Graph

90 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 ec44dbbd9b fix search by id (#1047)
* fix search by id

* make SearchByID Public
2025-03-27 19:17:00 +08:00
UUBulb fa36a36beb improve transfer record logic (#1033)
* improve transfer record logic

* refactor

* modernize loops

* remove unused type conversions

* update dependencies

* script: keep .gitkeep files

* fix

* remove clear
2025-03-19 22:21:21 +08:00
UUBulb 9ee5595da7 generate agent_secret for old users (#1021) 2025-03-08 18:47:42 +08:00
UUBulb 5c8cc75523 improve check for offline rules (#1013)
* improve check for offline rules

* bug fixes

* update dependencies

* fix error wrap

* fix offline check

* improve readability
2025-03-02 15:37:21 +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
UUBulb 91bef2882a refactor: simplify server & service manipulation (#993)
* refactor: simplify server & service manipulation

* update

* fix

* update for nat, ddns & notification

* chore

* update cron

* update dependencies

* use of function iterators

* update default dns servers
2025-02-21 23:08:12 +08:00
naiba 7831e2d1f8 feat: disable nat 2025-01-21 22:23:15 +08:00
igophper 17f039cbf5 fix: fix typo in database variable name (#939)
Co-authored-by: igophper <jianghanghui@k.app>
2025-01-03 22:39:55 +08:00
Moraxyc 8f8a30c02c Refactor: Load UserTemplates from embedded yaml file (#575)
* Refactor: Load UserTemplates from embedded yaml file

* feat: add version field to UserTemplates

* refactor: use shell script to fetch frontends

* chore: add *-dist to .gitignore

* refactor: rename to FrontendTemplates

BREAKING CHANGE: This commit changes the `user_templates` filed
in the communication json between backend and the admin-frontend.

Keep user config.yml `user_template` filed.
2024-12-10 21:57:20 +08:00
naiba 5b5e006b97 feat: 优化 GeoIP 更新逻辑 2024-12-07 11:06:42 +08:00
naiba 251bc10af9 feat: v1.1 2024-12-07 01:18:34 +08:00
Moraxyc 3fb49693d9 feat: add listen_host (#550) 2024-12-05 17:01:21 +08:00
naiba be51c5a1e6 feat: refactor grpc keepalive 2024-12-05 00:11:34 +08:00
naiba 68e3bb00e4 Revert "feat: grpc keepalive"
This reverts commit b484fe53f0.
2024-12-04 22:46:02 +08:00
naiba b484fe53f0 feat: grpc keepalive 2024-12-04 21:08:28 +08:00
naiba 970c0d0430 feat: embed dist 2024-11-29 21:31:39 +08:00
naiba 3cce7ebf01 rename repo 2024-11-28 19:38:54 +08:00
naiba 0552b69b36 refactor: replace pflag with standard flag package in main.go 2024-11-25 22:03:11 +08:00
UUBulb be79b11e58 allow cors from loopback addresses in debug mode (#9) 2024-11-18 13:26:41 +08:00
uubulb 6eb28d03b3 merge upstream, improve geoip pkg 2024-10-31 03:34:25 +08:00
Moraxyc 61fdcd2a9e fix(cli): display version before init app (#463) 2024-10-31 00:15:41 +08:00
naiba eae12d8df2 refactor: rename monitor -> service 2024-10-25 00:13:45 +08:00
naiba c9ec634857 refactor nat 2024-10-23 20:37:29 +08:00
UUBulb 8d0f6fb7c4 add path check for multiplexer (#451) 2024-10-23 12:55:10 +08:00
naiba cb9436a8f7 fix ci 2024-10-23 00:03:19 +08:00
naiba c4011934f7 fix agent connect 2024-10-22 23:44:50 +08:00
naiba 53f1abb7c8 refactor: login & refresh token 2024-10-20 14:05:43 +08:00
naiba 7fb015b07d refactor graceful shutdown 2024-10-20 11:50:02 +08:00
naiba 606e10ca0a refactor: remove pages, combine grpc http port 2024-10-20 11:47:45 +08:00
naiba 843ecdaa33 init jwt 2024-10-20 00:09:16 +08:00
naiba 9e6bbd3386 🎉 init swaggo 2024-10-19 23:14:53 +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 6a70e67ef9 feat: 在面板重启时通知agent更新信息 2024-08-02 19:41:39 +08:00
naiba 1c91fcffac feat: 去除 webTerminal 的 websocket 依赖 2024-07-14 12:47:36 +08:00
卖女孩的小火柴 150612a1d9 Feat: Add some parameters (#294) 2023-11-02 21:06:34 +08:00
naiba 1bb99494e3 🐛 fix service stats 2022-10-12 23:06:25 +08:00
naiba 7bd67b2233 🌐 localization [skip ci] 2022-04-27 23:51:45 +08:00
Akkia c65028188c refactor: 优化代码组织结构 2022-04-12 13:16:33 +08:00
Akkia 3d5e292d26 optimize: 移除两处冗余的代码 (初始化后未使用|重复初始化) 2022-04-12 00:01:38 +08:00
Akkia 707985e5c8 添加代码注释+修正一个typo 2022-04-11 22:51:02 +08:00
naiba 84866384f4 🐛 修复 Windows time.LoadLocation 2022-03-18 23:57:30 +08:00
naiba 1e641d1249 theme-mdui by @MikoyChinese 2022-01-09 11:54:14 +08:00
Lemoe 00c712116e 反向代理 gRPC 端口(支持 Cloudflare CDN) 2021-11-11 12:52:37 +08:00
naiba 5443c72dbe 🐛 流量记录删除条件 typo 2021-11-06 18:40:29 +08:00
naiba a25a1b128d 🐛 修改计划任务并未取消旧任务 2021-09-30 11:59:57 +08:00
naiba 092f40b47f 🔥 移除后台登录类型设置,增加调度失败计划任务提醒 2021-09-30 00:01:04 +08:00
naiba 47dfa4777b ️ pprof 性能调优 / 计划任务支持秒级 2021-09-29 19:58:02 +08:00
naiba 4249fa82d7 🔖 dashboard v0.10.0 2021-09-27 21:18:09 +08:00
naiba 20ea31140b 🐛 dashboard: 修复服务监控任务调度 2021-09-03 08:52:45 +08:00