25 系统信息

描述

这些参数及对应仪表板小组件字段objects的可选属性值,允许通过dashboard.createdashboard.update方法配置System Information小组件。

仪表板创建或update过程中不会验证fields小组件的属性。这使得用户可以修改built-in widgets和createcustom widgets,但也存在错误创建或更新小组件的风险。为确保成功创建或update系统信息小组件,请参考下文表格中列出的参数行为规范。

参数

系统信息 小部件支持以下参数。

参数 仪表板小部件字段 名称
Refresh interval 0 rf_rate 0 - 不刷新;
10 - 10 秒;
30 - 30 秒;
60 - 1 分钟;
120 - 2 分钟;
600 - 10 分钟;
900 - (默认) 15 分钟。
Show 0 info_type 0 - (默认) 系统统计信息;
1 - 高可用性节点。
Show software update check details 0 show_software_update_check_details 0 - (默认) 禁用;
1 - 启用。

参数行为
- 如果在 Zabbix server 配置中启用了 AllowSoftwareUpdateCheck显示 设置为 "系统统计信息",则为 支持

示例

以下示例仅用于描述如何为 系统信息 小组件配置仪表板 widget 字段 objects。 有关配置仪表板的更多信息,请参阅 dashboard.create

配置 系统信息 部件

配置一个 系统信息 小部件,get 该小部件以 10 分钟为刷新间隔显示系统状态,并启用软件 update 检查。

执行请求:

{
    "jsonrpc": "2.0",
    "method": "dashboard.create",
    "params": {
        "name": "My dashboard",
        "display_period": 30,
        "auto_start": 1,
        "pages": [
            {
                "widgets": [
                    {
                        "type": "systeminfo",
                        "name": "System information",
                        "x": 0,
                        "y": 0,
                        "width": 36,
                        "height": 5,
                        "view_mode": 0,
                        "fields": [
                            {
                                "type": 0,
                                "name": "rf_rate",
                                "value": 600
                            },
                            {
                                "type": 0,
                                "name": "show_software_update_check_details",
                                "value": 1
                            }
                        ]
                    }
                ]
            }
        ],
        "userGroups": [
            {
                "usrgrpid": 7,
                "permission": 2
            }
        ],
        "users": [
            {
                "userid": 1,
                "permission": 3
            }
        ]
    },
    "id": 1
}

响应:

{
    "jsonrpc": "2.0",
    "result": {
        "dashboardids": [
            "3"
        ]
    },
    "id": 1
}

另请参阅