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

[horus] Change QL naming #376

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/horus/basic/config/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type RecoveryConfiguration struct {
type ModularConfiguration struct {
Enabled bool `yaml:"enabled"`
CordonDailyLimit map[string]int `yaml:"cordonDailyLimit"`
CheckQL map[string]string `yaml:"checkQL"`
AbnormalityQL map[string]string `yaml:"abnormalityQL"`
RecoveryQL map[string]string `yaml:"recoveryQL"`
CheckIntervalSecond int `yaml:"checkIntervalSecond"`
PromQueryTimeSecond int64 `yaml:"promQueryTimeSecond"`
Expand All @@ -71,7 +71,7 @@ type DowntimeConfiguration struct {
CheckIntervalSecond int `yaml:"checkIntervalSecond"`
PromQueryTimeSecond int64 `yaml:"promQueryTimeSecond"`
KubeMultiple map[string]string `yaml:"kubeMultiple"`
CheckQL []string `yaml:"checkQL"`
AbnormalityQL []string `yaml:"abnormalityQL"`
NodeNameToIPs string `yaml:"nodeNameToIPs"`
DingTalk *DingTalkConfiguration `yaml:"dingTalk"`
}
Expand Down
4 changes: 2 additions & 2 deletions app/horus/core/horuser/downtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ func (h *Horuser) DownTimeCheck(ctx context.Context) {
func (h *Horuser) DownTimeNodes(clusterName, addr string) {
klog.Infof("DownTimeNodes Query Start clusterName:%v", clusterName)
nodeDownTimeRes := make(map[string]int)
cq := len(h.cc.NodeDownTime.CheckQL)
for _, ql := range h.cc.NodeDownTime.CheckQL {
cq := len(h.cc.NodeDownTime.AbnormalityQL)
for _, ql := range h.cc.NodeDownTime.AbnormalityQL {
ql := ql
res, err := h.InstantQuery(addr, ql, clusterName, h.cc.NodeDownTime.PromQueryTimeSecond)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion app/horus/core/horuser/modular.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (h *Horuser) CustomizeModular(ctx context.Context) {

func (h *Horuser) CustomizeModularOnCluster(clusterName, addr string) {
klog.Infof("CustomizeModularOnCluster Start clusterName:%v", clusterName)
for moduleName, checkql := range h.cc.CustomModular.CheckQL {
for moduleName, checkql := range h.cc.CustomModular.AbnormalityQL {
ql := checkql
vecs, err := h.InstantQuery(addr, ql, clusterName, h.cc.CustomModular.PromQueryTimeSecond)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions deploy/horus/horus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ customModular:
enabled: false
cordonDailyLimit:
filesystem_readonly: 1
checkQL:
abnormalityQL:
filesystem_readonly: |-
node_filesystem_readonly{mountpoint="/"} != 1
recoveryQL:
Expand All @@ -77,7 +77,7 @@ nodeDownTime:
enabled: true
checkIntervalSecond: 5
promQueryTimeSecond: 60
checkQL:
abnormalityQL:
- node_disk_info
- node_cpu_guest_seconds_total
nodeNameToIPs:
Expand Down
Loading