[comment]: # ({093ad1f3-8b285a74})
# 3 数据概览

[comment]: # ({/093ad1f3-8b285a74})

[comment]: # ({77f1ca42-ecbfa4b1})
::: noteimportant
此小部件已弃用，并将在即将发布的主要版本中移除。
建议改用[*Top hosts*](/manual/api/reference/dashboard/widget_fields/top_hosts)小部件作为替代。

:::

[comment]: # ({/77f1ca42-ecbfa4b1})

[comment]: # ({46c56c9f-4a755106})
### 描述

这些参数及对应仪表板小组件字段objects的可选属性值允许通过`dashboard.create`和`dashboard.update`方法配置[*Data overview*](/manual/web_interface/frontend_sections/monitoring/dashboard/widgets/data_overview)小组件。

::: noteimportant
仪表板创建或update过程中不会验证`fields`小组件的属性。这使得用户可以修改[built-in widgets](/manual/web_interface/frontend_sections/monitoring/dashboard/widgets)和create[开发模块](/manual/modules#开发模块)，但也存在错误创建或更新小组件的风险。为确保成功创建或update*数据概览*小组件，请参考下文表格中列出的参数要求。

:::

[comment]: # ({/46c56c9f-4a755106})

[comment]: # ({a0b55785-06bdb405})
### 参数

*数据概览*小部件支持以下参数。

| 参数 | <   | [仪表板小部件字段](/manual/api/reference/dashboard/object#仪表板小部件字段) | 名称 | 值 |
|-|--------|--|--------|-------------------------------|
| *Refresh interval* | <   | 0 | rf_rate | 0 - 不刷新;<br>10 - 10秒;<br>30 - 30秒;<br>60 - *(默认)* 1分钟;<br>120 - 2分钟;<br>600 - 10分钟;<br>900 - 15分钟. |
| *Host groups* | <   | 2 | groupids | [Host group](/manual/api/reference/hostgroup/get) ID.<br><br>注意: 要配置多个主机组，需为每个主机组create一个仪表板小部件字段object. |
| *Hosts* | <   | 3 | hostids | [Host](/manual/api/reference/host/get) ID.<br><br>注意: 要配置多个主机，需为每个主机create一个仪表板小部件字段object. 对于多个主机，参数*主机组*必须完全不配置或至少配置一个包含这些主机的主机组. |
| *Tags* (the number in the property name (e.g. tags.tag.0) references tag order in the tag evaluation list) | <   | < | < | <     |
| < | *评估类型* | 0 | evaltype | 0 - *(默认)* 与/或;<br>2 - 或. |
| ^ | *标签名称* | 1 | tags.tag.0 | 任意string值.<br><br>配置*标签*时必须提供*标签名称*参数. |
| ^ | *运算符* | 0 | tags.operator.0 | 0 - 包含;<br>1 - 等于;<br>2 - 不包含;<br>3 - 不等于;<br>4 - 存在;<br>5 - 不存在.<br><br>配置*标签*时必须提供*运算符*参数. |
| ^ | *标签值* | 1 | tags.value.0 | 任意string值.<br><br>配置*标签*时必须提供*标签值*参数. |
| *Show suppressed problems* | <   | 0 | show_suppressed | 0 - *(默认)* 禁用;<br>1 - 启用. |
| *Hosts location* | <   | 0 | style | 0 - *(默认)* 左;<br>1 - Top. |

[comment]: # ({/a0b55785-06bdb405})

[comment]: # ({7663ef93-ea5f1a97})
### 示例

以下示例仅针对*数据概览*小部件的仪表板小部件字段objects的配置进行说明。
有关配置仪表板的更多信息，请参阅[`dashboard.create`](/manual/api/reference/dashboard/create)。

[comment]: # ({/7663ef93-ea5f1a97})

[comment]: # ({56f59830-2a2d8ed8})
#### 配置 *数据概览* 部件

配置一个*数据概览*小部件，用于显示主机 "10084"的数据，并且仅显示标签名称为"component"且包含值"cpu"的监控项。
此外，显示位于Top上的主机的数据。

请求:

```json
{
    "jsonrpc": "2.0",
    "method": "dashboard.create",
    "params": {
        "name": "My dashboard",
        "display_period": 30,
        "auto_start": 1,
        "pages": [
            {
                "widgets": [
                    {
                        "type": "dataover",
                        "name": "Data overview",
                        "x": 0,
                        "y": 0,
                        "width": 12,
                        "height": 5,
                        "view_mode": 0,
                        "fields": [
                            {
                                "type": 3,
                                "name": "hostids",
                                "value": 10084
                            },
                            {
                                "type": 1,
                                "name": "tags.tag.0",
                                "value": "component"
                            },
                            {
                                "type": 0,
                                "name": "tags.operator.0",
                                "value": 0
                            },
                            {
                                "type": 1,
                                "name": "tags.value.0",
                                "value": "cpu"
                            },
                            {
                                "type": 0,
                                "name": "style",
                                "value": 1
                            }
                        ]
                    }
                ]
            }
        ],
        "userGroups": [
            {
                "usrgrpid": 7,
                "permission": 2
            }
        ],
        "users": [
            {
                "userid": 1,
                "permission": 3
            }
        ]
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```
响应:

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

[comment]: # ({/56f59830-2a2d8ed8})

[comment]: # ({e9d30322-27a42ae9})
### 另请参阅

-   [仪表板小部件字段](/manual/api/reference/dashboard/object#仪表板小部件字段)
-   [`dashboard.create`](/manual/api/reference/dashboard/create)
-   [`dashboard.update`](/manual/api/reference/dashboard/update)

[comment]: # ({/e9d30322-27a42ae9})
