Estos par¨¢metros y los posibles valores de propiedad para los objetos de campo del widget de tablero respectivos permiten configurar el widget Tarjeta de equipo en los m¨¦todos dashboard.create
y dashboard.update
.
Las propiedades de los campos
del widget no se validan durante la creaci¨®n o actualizaci¨®n de un tablero. Esto permite a los usuarios modificar widgets integrados y crear widgets personalizados, pero tambi¨¦n presenta el riesgo de crear o actualizar widgets de manera incorrecta. Para garantizar la creaci¨®n o actualizaci¨®n exitosa del widget Tarjeta de equipo, consulte el comportamiento de los par¨¢metros que se describe en las tablas a continuaci¨®n.
The following parameters are supported for the Host card widget.
Parameter | type | name | value | |
---|---|---|---|---|
Refresh interval | 0 | rf_rate | 0 - No refresh; 10 - 10 seconds; 30 - 30 seconds; 60 - (default) 1 minute; 120 - 2 minutes; 600 - 10 minutes; 900 - 15 minutes. |
|
Host | 3 | hostid.0 | Host ID. Parameter behavior: - required if Host (Widget/Dashboard) is not set This parameter is not supported if configuring the widget on a template dashboard. |
|
Host (Widget/Dashboard) | 1 | hostid._reference | Instead of Host ID:DASHBOARD.hostid - set the Host selector as the data source for host;ABCDE._hostid - set a compatible widget (with its Reference parameter set to "ABCDE ") as the data source for host.Parameter behavior: - required if Host is not set This parameter is not supported if configuring the widget on a template dashboard. |
|
Show suppressed problems | 0 | show_suppressed | 0 - (default) Disabled; 1 - Enabled. |
|
Show | 0 | sections.0 | 0 - Host groups; 1 - Description; 2 - Monitoring; 3 - Availability; 4 - Monitored by; 5 - Templates; 6 - Inventory; 7 - Tags. Note: The number in the property name references section order in the section list. To configure multiple sections, create a dashboard widget field object for each section with an incremented number in the property name. |
The following parameters are supported if Show is set to "Inventory".
Parameter | type | name | value |
---|---|---|---|
Inventory fields | 0 | inventory.0 | Inventory ID. Note: To configure multiple inventory fields, create a dashboard widget field object for each inventory field with an incremented number in the property name. |
Los siguientes ejemplos tienen como ¨²nico objetivo describir la configuraci¨®n de los objetos de campo del widget de tablero para el widget Tarjeta de equipo. Para obtener m¨¢s informaci¨®n sobre la configuraci¨®n de un tablero, consulte dashboard.create
.
Configure un widget de Tarjeta de equipo que muestre estas secciones: "Monitoreo", "Disponibilidad", "Monitoreado por", "Inventario" y "Etiquetas".
{
"jsonrpc": "2.0",
"method": "dashboard.create",
"params": {
"name": "My dashboard",
"display_period": 30,
"auto_start": 1,
"pages": [
{
"widgets": [
{
"type": "hostcard",
"name": "Host card",
"x": 0,
"y": 0,
"width": 14,
"height": 7,
"view_mode": 0,
"fields": [
{
"type": 3,
"name": "hostid.0",
"value": 10084
},
{
"type": 0,
"name": "show_suppressed",
"value": 1
},
{
"type": 0,
"name": "sections.0",
"value": 2
},
{
"type": 0,
"name": "sections.1",
"value": 3
},
{
"type": 0,
"name": "sections.2",
"value": 4
},
{
"type": 0,
"name": "sections.3",
"value": 6
},
{
"type": 0,
"name": "sections.4",
"value": 7
},
{
"type": 0,
"name": "inventory.0",
"value": 25
},
{
"type": 0,
"name": "inventory.1",
"value": 26
}
]
}
]
}
],
"userGroups": [
{
"usrgrpid": 7,
"permission": 2
}
],
"users": [
{
"userid": 1,
"permission": 3
}
]
},
"id": 1
}
Respuesta: