Skip to content

Commit

Permalink
1.update to 2.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
canghai908 committed Feb 25, 2025
1 parent 0eff0cc commit 02ce3fa
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 28 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ MS-Agent: Installed on Zabbix Server, used to receive alarms generated by Zabbix

| Zabbix Version | Compatibility |
|:---------------|:-------------:|
| 7.0.x LTS ||
| 6.4.x ||
| 6.2.x ||
| 6.0.x LTS ||
| 5.4.x ||
| 5.2.x ||
| 5.0.x LTS ||
| 4.4.x ||
| 4.2.x ||
| 4.0.x LTS ||
| 7.4.x ||
| 7.2.x ||
| 7.0.x LTS ||
| 6.4.x ||
| 6.2.x ||
| 6.0.x LTS ||
| 5.4.x ||
| 5.2.x ||
| 5.0.x LTS ||
| 4.4.x ||
| 4.2.x ||
| 4.0.x LTS ||
| 3.4.x | untested |
| 3.2.x | untested |
| 3.0.x LTS | untested |
Expand Down
32 changes: 17 additions & 15 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,23 @@ MS-Agent: 安装在 Zabbix Server 上, 用于接收 Zabbix Server 产生的告

## 兼容性

| zabbix 版本 | 兼容性 |
|:-------------|:-------:|
| 7.0.x LTS ||
| 6.4.x ||
| 6.2.x ||
| 6.0.x LTS ||
| 5.4.x ||
| 5.2.x ||
| 5.0.x LTS ||
| 4.4.x ||
| 4.2.x ||
| 4.0.x LTS ||
| 3.4.x | 未测试 |
| 3.2.x | 未测试 |
| 3.0.x LTS | 未测试 |
| zabbix 版本 | 兼容性 |
|:----------|:-------:|
| 7.4.x ||
| 7.2.x ||
| 7.0.x LTS ||
| 6.4.x ||
| 6.2.x ||
| 6.0.x LTS ||
| 5.4.x ||
| 5.2.x ||
| 5.0.x LTS ||
| 4.4.x ||
| 4.2.x ||
| 4.0.x LTS ||
| 3.4.x | 未测试 |
| 3.2.x | 未测试 |
| 3.0.x LTS | 未测试 |

## 文档

Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# release version
version=2.1.7
version=2.1.8

CWD=$(cd $(dirname $0)/; pwd)
cd $CWD
Expand Down
12 changes: 10 additions & 2 deletions models/system.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package models

import (
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/orm"
"fmt"
"strings"
"time"

"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/orm"
)

// item link to inventory
Expand Down Expand Up @@ -134,6 +136,12 @@ func HostTypeSet(s *System, groupId []string) error {
if err != nil {
return err
}

// 添加检查,如果没有找到主机则返回错误
if len(p) == 0 {
return fmt.Errorf("未在指定的主机组中找到任何主机")
}

//根据id主机类型
var hType string
switch s.ID {
Expand Down

0 comments on commit 02ce3fa

Please sign in to comment.