Commit Graph
1956 Commits
Author SHA1 Message Date
naiba d5172047eb feat(tsdb): increase 1d downsample resolution from 5min to 30s 2026-02-16 02:18:57 +08: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 ab1d9bddc0 chore: upgrade frontend 2026-01-10 20:23:28 +08:00
naiba 8ee8fe9ba7 chore: upgrade frontend 2026-01-10 17:38:15 +08:00
UUBulb c22446b20c feat(notification): add option to convert metric units in request body (#1156)
* feat(notification): add option to convert metric units in request body

* ignore gosec

* rename fields
2026-01-10 17:29:10 +08:00
github-actions[bot] be22c5fbbb update contributors[no ci] 2026-01-02 22:05:02 +08:00
奶爸 25bdb0e2ae chore: 垃圾佬论坛下线 2026-01-02 22:04:47 +08:00
github-actions[bot] 6a5abd0dde update contributors[no ci] 2026-01-01 11:51:51 +08:00
naiba a134f6c0da fix: immutable release 2026-01-01 11:51:25 +08:00
naiba 905930dfdf chore: upgrade frontend 2026-01-01 10:56:52 +08:00
naiba d7b36fe263 chore: disable javascript scan 2026-01-01 10:35:15 +08:00
e4d42a617f Added translation using Weblate (Ukrainian) (#1128)
Added translation using Weblate (Japanese)

Co-authored-by: Zilong Liu <2821624044@qq.com>
Co-authored-by: Руслан Пузич <visp80@gmail.com>
2026-01-01 10:33:59 +08:00
dependabot[bot] a3105d364c chore(deps): bump golang.org/x/crypto from 0.37.0 to 0.45.0 (#1138)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.37.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.37.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-01 10:31:21 +08:00
UUBulb dc59135e5c fix: add a default error message for waf page (#1145) 2025-12-04 21:52:12 +08:00
github-actions[bot] 5c107dd263 update contributors[no ci] 2025-12-04 21:51:57 +08:00
UUBulb e0133a015c fix: use server ids in db query (#1146) 2025-12-04 21:51:33 +08:00
naiba 543d2642f3 improve: not block ip when ip changed 2025-10-10 09:53:15 +08:00
naiba fbfe28a54e chore: back comp 2025-10-09 22:01:35 +08:00
naiba 3b8d2f3736 fix: oauth2 login 2025-10-09 22:00:08 +08:00
naiba 3b2cefdd07 feat: binding ip with session
🛡️staying safe even your frontend was hacked
2025-10-09 21:36:59 +08:00
naiba 09adc1310c chore: upgrade frontend 2025-10-09 18:32:30 +08:00
naiba 48d50f64df chore: upgrade frontend 2025-10-09 09:50:55 +08:00
naiba 603df316d4 chore: upgrade frontend 2025-10-09 09:38:01 +08:00
github-actions[bot] 7927805c0e update contributors[no ci] 2025-10-03 09:33:27 +08:00
honeok 03db2fddb5 fix: embed tzdata to correct container timezone (#1126)
Signed-off-by: honeok <i@honeok.com>
2025-10-03 09:33:12 +08:00
naiba 5cfde9c2f4 💩 f*ck react
react 纯傻逼,js ts 就是纯傻逼,浪费人生
2025-10-02 17:19:26 +08:00
naiba efba3c369d Merge branch 'master' of github.com:nezhahq/nezha 2025-10-02 15:30:25 +08:00
naiba 298e178d3c feat: upgrade frontend 2025-10-02 15:30:21 +08:00
github-actions[bot] 74f9c70e61 update contributors[no ci] 2025-10-02 14:29:27 +08:00
naiba 87770cd91e feat: upgrade frontend 2025-10-02 14:28:57 +08:00
UUBulb 010ae7ef51 fix: member-created services shouldn't be applied to admin resources (#1113) 2025-08-28 22:37:44 +08:00
naiba 7b3c3131cc chore: upgrade frontend 2025-08-23 21:14:02 +08:00
dependabot[bot] 4fdf9f4027 chore(deps): bump github.com/go-viper/mapstructure/v2 (#1111)
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.4.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 22:39:52 +08:00
github-actions[bot] e32083f8b9 update contributors[no ci] 2025-08-02 15:52:27 +08:00
e4144f2d6c Added translation using Weblate (French) (#1093)
Translated using Weblate (Indonesian)

Currently translated at 45.0% (27 of 60 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (60 of 60 strings)





Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/id/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/ta/
Translation: Nezha/Nezha Dashboard

Co-authored-by: Kxroqi :3 <loxocker@gmail.com>
Co-authored-by: TommyLPB <hcrochetcanard@gmail.com>
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-08-02 15:52:14 +08:00
dependabot[bot] ea8697c5ab chore(deps): bump github.com/go-viper/mapstructure/v2 (#1097)
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.3.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-02 15:52:03 +08:00
naiba fae01b3f09 chore: sync timeout 2025-06-22 13:51:27 +08:00
github-actions[bot] 1fb920650d update contributors[no ci] 2025-06-16 23:47:05 +08:00
naiba 233bbc23b6 feat: 批量转移服务器给其他用户 2025-06-16 23:46:36 +08:00
github-actions[bot] 4d285ea0a9 update contributors[no ci] 2025-06-08 00:49:48 +08:00
d0cf04a3d3 Translated using Weblate (Indonesian) (#1049)
Currently translated at 43.3% (26 of 60 strings)

Added translation using Weblate (Indonesian)

Translated using Weblate (Vietnamese)

Currently translated at 16.6% (10 of 60 strings)

Added translation using Weblate (Vietnamese)

Translated using Weblate (Spanish)

Currently translated at 100.0% (60 of 60 strings)





Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/es/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/id/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/vi/
Translation: Nezha/Nezha Dashboard

Co-authored-by: Andres Pava <hola@andrespava.com>
Co-authored-by: Kxroqi :3 <loxocker@gmail.com>
Co-authored-by: hzhoanglee <nganhh.bi12-313@st.usth.edu.vn>
2025-06-08 00:49:31 +08:00
naiba b296eb7a39 chore: upgrade frontend 2025-05-04 11:35:14 +08:00
UUBulb 04d7651f58 update dependencies (#1077)
* update dependencies

ddns: update libdns to 1.0.0

* rename var
2025-05-02 00:25:23 +08:00
UUBulb 5c27259439 chore: cleanup some code (#1069)
* chore

* modernize loop

* ddns: simpify Provider struct
2025-04-26 18:28:21 +08:00
naiba afe483a831 feat: upgrade frontend 2025-04-25 23:03:14 +08:00
github-actions[bot] a83f74f2f5 update contributors[no ci] 2025-04-25 22:57:12 +08:00
dependabot[bot] 9515127991 chore(deps): bump golang.org/x/net from 0.37.0 to 0.38.0 (#1063)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.37.0 to 0.38.0.
- [Commits](https://github.com/golang/net/compare/v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.38.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-25 22:56:56 +08:00
github-actions[bot] 321c41250e update contributors[no ci] 2025-04-13 18:42:50 +08:00
naiba 9110853928 feat: upgrade frontend 2025-04-13 18:42:24 +08:00
github-actions[bot] eda7ade41d update contributors[no ci] 2025-04-13 18:41:43 +08:00