Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在使用记录规则功能时,选择数据源后无法正确保存,数据库中 datasource_ids 字段始终为空。 #2394

Open
caapap opened this issue Dec 25, 2024 · 0 comments

Comments

@caapap
Copy link

caapap commented Dec 25, 2024

Question and Steps to reproduce

复现步骤

  1. 进入 Recording Rules 页面
  2. 创建/编辑一个记录规则
  3. 在 Datasource 下拉框中选择一个数据源(例如:prometheus-skynet)
  4. 点击保存
  5. 保存后查看数据库,发现 datasource_ids 字段为空

当前行为

  • 选择数据源后保存,数据库中 datasource_ids 字段为空
  • 页面刷新后,数据源显示为默认的 $all

预期行为

  • 选择数据源后保存,数据库应该正确记录所选数据源的 ID
  • 页面刷新后,应该显示之前选择的数据源

Relevant logs and configurations

2024-12-25 14:56:21.564036 INFO memsto/recording_rule_cache.go:136 timer: sync recording rules done, cost: 0ms, number: 6


 2024-12-25 14:56:22.002282 DEBUG eval/eval.go:275 rule_eval:alert-6-424 query:{PromQl:count(skynet_agent_allonline)!=3 Severity:1 VarEnabled:false VarConfig:{ParamVal:[] ChildVarConfigs:<nil>} RecoverConfig:{JudgeType:0 RecoverExp:} Unit:none}, value:

 2024-12-25 14:56:22.900219 DEBUG router/router_heartbeat.go:199 heartbeat field:{Id:0 GroupId:0 GroupObjs:[] Ident: Note: Tags: TagsJSON:[] TagsMap:map[] UpdateAt:0 HostIp: AgentVersion: EngineName: OS: HostTags:[] UnixTime:0 Offset:0 TargetUp:0 MemUtil:0 CpuNum:0 CpuUtil:0 Arch: RemoteAddr: GroupIds:[] GroupNames:[]} target: {5 0 [] devops-skynet2-171   [] map[] 1735109773 172.30.137.171 v0.3.82 default linux [] 1735109772879 8 2 23.388869530062507 8 1.7126148557416594 amd64 192.168.122.1 [2] []}

Version

环境信息

  • Nightingale 版本:v8.0.0-beta1
  • 数据库版本:MySQL 8.0
  • 浏览器:Chrome/Firefox 131.0.6778.205
  • 操作系统:Windows 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant