11 Nido d'ape
Descrizione
Questi parametri e i possibili valori delle proprietà per i rispettivi oggetti campo del widget della dashboard consentono di configurare
il widget Nido d'ape nei metodi dashboard.create e dashboard.update.
Le proprietà fields del widget non vengono convalidate durante la creazione o l'aggiornamento di una dashboard.
Questo consente agli utenti di modificare i widget built-in e creare widget personalizzati, ma comporta anche il rischio di creare o aggiornare i widget in modo errato.
Per garantire la corretta creazione o l'aggiornamento del widget Nido d'ape, fare riferimento al comportamento dei parametri descritto nelle tabelle seguenti.
Parametri
I seguenti parametri sono supportati per il widget Honeycomb.
| Parametro | type | name | value | |
|---|---|---|---|---|
| Intervallo di aggiornamento | 0 | rf_rate | 0 - Nessun aggiornamento; 10 - 10 secondi; 30 - 30 secondi; 60 - (predefinito) 1 minuto; 120 - 2 minuti; 600 - 10 minuti; 900 - 15 minuti. |
|
| Gruppi host | 2 | groupids.0 | ID del gruppo host. Nota: Per configurare più gruppi host, creare un oggetto campo widget dashboard per ciascun gruppo host con un numero incrementale nel nome della proprietà. Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Gruppi host (Widget) | 1 | groupids._reference | Invece dell'ID del gruppo host:ABCDE._hostgroupids - imposta un widget compatibile (con il parametro Reference impostato su "ABCDE") come origine dati per i gruppi host.Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Host | 3 | hostids.0 | ID dell'host. Nota: Per configurare più host, creare un oggetto campo widget dashboard per ciascun host con un numero incrementale nel nome della proprietà. Per più host, il parametro Gruppi host non deve essere configurato oppure deve essere configurato con almeno un gruppo host a cui appartengono gli host configurati. Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Host (Widget/Dashboard) | 1 | hostids._reference | Invece dell'ID dell'host:DASHBOARD.hostids - imposta il selettore host della dashboard come origine dati per gli host;ABCDE._hostids - imposta un widget compatibile (con il parametro Reference impostato su "ABCDE") come origine dati per gli host.Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Tag host | ||||
| Tipo di valutazione | 0 | evaltype_host | 0 - (predefinito) And/Or; 2 - Or. Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Nome tag | 1 | host_tags.0.tag | Qualsiasi valore stringa. Nota: Il numero nel nome della proprietà fa riferimento all'ordine del tag nell'elenco di valutazione dei tag. Comportamento del parametro: - obbligatorio se si configura Tag host Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Operatore | 0 | host_tags.0.operator | 0 - Contiene; 1 - Uguale a; 2 - Non contiene; 3 - Diverso da; 4 - Esiste; 5 - Non esiste. Nota: Il numero nel nome della proprietà fa riferimento all'ordine del tag nell'elenco di valutazione dei tag. Comportamento del parametro: - obbligatorio se si configura Tag host Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Valore tag | 1 | host_tags.0.value | Qualsiasi valore stringa. Nota: Il numero nel nome della proprietà fa riferimento all'ordine del tag nell'elenco di valutazione dei tag. Comportamento del parametro: - obbligatorio se si configura Tag host Questo parametro non è supportato se si configura il widget in una dashboard template. |
|
| Pattern item | 1 | items.0 | Nome o pattern dell'item. Nota: Per configurare più pattern item, creare un oggetto campo widget dashboard per ciascun pattern item con un numero incrementale nel nome della proprietà. Comportamento del parametro: - obbligatorio |
|
| Tag item | ||||
| Tipo di valutazione | 0 | evaltype_item | 0 - (predefinito) And/Or; 2 - Or. |
|
| Nome tag | 1 | item_tags.0.tag | Qualsiasi valore stringa. Nota: Il numero nel nome della proprietà fa riferimento all'ordine del tag nell'elenco di valutazione dei tag. Comportamento del parametro: - obbligatorio se si configura Tag item |
|
| Operatore | 0 | item_tags.0.operator | 0 - Contiene; 1 - Uguale a; 2 - Non contiene; 3 - Diverso da; 4 - Esiste; 5 - Non esiste. Nota: Il numero nel nome della proprietà fa riferimento all'ordine del tag nell'elenco di valutazione dei tag. Comportamento del parametro: - obbligatorio se si configura Tag item |
|
| Valore tag | 1 | item_tags.0.value | Qualsiasi valore stringa. Nota: Il numero nel nome della proprietà fa riferimento all'ordine del tag nell'elenco di valutazione dei tag. Comportamento del parametro: - obbligatorio se si configura Tag item |
|
| Mostra host in manutenzione | 0 | maintenance | 0 - (predefinito) Disabilitato; 1 - Abilitato. |
|
| Mostra | 0 | show.0 | 1 - Etichetta primaria; 2 - Etichetta secondaria. Nota: Per configurare più valori, creare un oggetto campo widget dashboard per ciascun valore con un numero incrementale nel nome della proprietà. Predefinito: 1, 2. |
|
| Reference | 1 | reference | Qualsiasi valore stringa composto da 5 caratteri (ad esempio, ABCDE o JBPNL). Questo valore deve essere univoco all'interno della dashboard a cui appartiene il widget.Comportamento del parametro: - obbligatorio |
|
Configurazione avanzata
I seguenti parametri di configurazione avanzata sono supportati per il widget Honeycomb.
Il numero nel nome della proprietà Thresholds (ad esempio, thresholds.0.color) fa riferimento alla posizione della soglia in un elenco, ordinato in ordine crescente.
Tuttavia, se le soglie sono configurate in un ordine diverso, i valori verranno ordinati in ordine crescente dopo l'aggiornamento della configurazione del widget nel frontend di Zabbix
(ad esempio, "thresholds.0.threshold":"5" → "thresholds.0.threshold":"1"; "thresholds.1.threshold":"1" → "thresholds.1.threshold": "5").
| Parameter | type | name | value |
|---|---|---|---|
| Primary label | |||
| Type | 0 | primary_label_type | 0 - (default) Text; 1 - Value. |
| Text | 1 | primary_label | Any string value, including macros. Supported macros: {HOST.*}, {ITEM.*}, {INVENTORY.*}, user macros.Default: {HOST.NAME}Parameter behavior: - supported if Type is set to "Text" |
| Decimal places | 0 | primary_label_decimal_places | Possible values range from 0-6. Default: 2. Parameter behavior: - supported if Type is set to "Value" |
| Size (type) | 0 | primary_label_size_type | 0 - (default) Auto; 1 - Custom. |
| Size | 0 | primary_label_size | Possible values range from 1-100. Default: 20. Parameter behavior: - supported if Size (type) is set to "Custom" |
| Bold | 0 | primary_label_bold | 0 - (default) Disabled; 1 - Enabled. |
| Color | 1 | primary_label_color | Hexadecimal color code (e.g., FF0000).Default: based on theme of Settings object and User object:1F2C33 for "blue-theme", "blue-classic-theme", or "hc-light";EEEEEE for "dark-theme", "dark-classic-theme", or "hc-dark". |
| Units (checkbox) | 0 | primary_label_units_show | 0 - Disabled; 1 - (default) Enabled. Parameter behavior: - supported if Type is set to "Value" |
| Units (value) | 1 | primary_label_units | Any string value."" (empty)Parameter behavior: - supported if Type is set to "Value" and Units (checkbox) is set to "Enabled" |
| Position | 0 | primary_label_units_pos | 0 - Before value; 1 - (default) After value. Parameter behavior: - supported if Type is set to "Value" and Units (checkbox) is set to "Enabled" This parameter is ignored if set to one of the following time-related units: unixtime, uptime, s. |
| Secondary label | |||
| Type | 0 | secondary_label_type | 0 - Text; 1 - (default) Value. |
| Text | 1 | secondary_label | Any string value, including macros. Supported macros: {HOST.*}, {ITEM.*}, {INVENTORY.*}, user macros.Default: {{ITEM.LASTVALUE}.fmtnum(2)}Parameter behavior: - supported if Type is set to "Text" |
| Decimal places | 0 | secondary_label_decimal_places | Possible values range from 0-6. Default: 2. Parameter behavior: - supported if Type is set to "Value" |
| Size (type) | 0 | secondary_label_size_type | 0 - (default) Auto; 1 - Custom. |
| Size | 0 | secondary_label_size | Possible values range from 1-100. Default: 30. Parameter behavior: - supported if Size (type) is set to "Custom" |
| Bold | 0 | secondary_label_bold | 0 - Disabled; 1 - (default) Enabled. |
| Color | 1 | secondary_label_color | Hexadecimal color code (e.g., FF0000).Default: based on theme of Settings object and User object:1F2C33 for "blue-theme", "blue-classic-theme", or "hc-light";EEEEEE for "dark-theme", "dark-classic-theme", or "hc-dark". |
| Units (checkbox) | 0 | secondary_label_units_show | 0 - Disabled; 1 - (default) Enabled. Parameter behavior: - supported if Type is set to "Value" |
| Units (value) | 1 | secondary_label_units | Any string value."" (empty)Parameter behavior: - supported if Type is set to "Value" and Units (checkbox) is set to "Enabled" |
| Position | 0 | secondary_label_position | 0 - Before value; 1 - (default) After value. Parameter behavior: - supported if Type is set to "Value" and Units (checkbox) is set to "Enabled" This parameter is ignored if set to one of the following time-related units: unixtime, uptime, s. |
| Background color | |||
| Background color | 1 | bg_color | Hexadecimal color code (e.g., FF0000).Default: based on theme of Settings object and User object:D9E7ED for "blue-theme" and "blue-classic-theme";3D5059 for "dark-theme" and "dark-classic-theme";AAD7E9 for "hc-light";335463 for "hc-dark". |
| Thresholds | |||
| Color interpolation | 0 | interpolation | 0 - Disabled; 1 - (default) Enabled. |
| Color | 1 | thresholds.0.color | Hexadecimal color code (e.g., FF0000). |
| Threshold | 1 | thresholds.0.threshold | Any numeric value. Suffixes (e.g., "1d", "2w", "4K", "8G") are supported. |
Esempi
Gli esempi seguenti hanno lo scopo esclusivo di descrivere la configurazione degli oggetti campo del widget della dashboard per il widget Honeycomb.
Per ulteriori informazioni sulla configurazione di una dashboard, vedere dashboard.create.
Configurazione di un widget Honeycomb
Configurare un widget Honeycomb che visualizza l'utilizzo dei processi del server Zabbix. Inoltre, modificare l'etichetta primaria delle celle honeycomb e ottimizzare visivamente il widget con le soglie.
{
"jsonrpc": "2.0",
"method": "dashboard.create",
"params": {
"name": "My dashboard",
"display_period": "30",
"auto_start": "1",
"pages": [
{
"widgets": [
{
"type": "honeycomb",
"name": "Honeycomb",
"x": "0",
"y": "0",
"width": "24",
"height": "5",
"view_mode": "0",
"fields": [
{
"type": 2,
"name": "groupids.0",
"value": 4
},
{
"type": 3,
"name": "hostids.0",
"value": 10084
},
{
"type": 1,
"name": "items.0",
"value": "Zabbix server: Utilization*"
},
{
"type": 1,
"name": "primary_label",
"value": "{ITEM.NAME}"
},
{
"type": 1,
"name": "thresholds.0.color",
"value": "0EC9AC"
},
{
"type": 1,
"name": "thresholds.0.threshold",
"value": "0"
},
{
"type": 1,
"name": "thresholds.1.color",
"value": "FFD54F"
},
{
"type": 1,
"name": "thresholds.1.threshold",
"value": "70"
},
{
"type": 1,
"name": "thresholds.2.color",
"value": "FF465C"
},
{
"type": 1,
"name": "thresholds.2.threshold",
"value": "90"
},
{
"type": 1,
"name": "reference",
"value": "KSTMQ"
}
]
}
]
}
],
"userGroups": [
{
"usrgrpid": 7,
"permission": 2
}
],
"users": [
{
"userid": 1,
"permission": 3
}
]
},
"id": 1
}
Risposta:
{
"jsonrpc": "2.0",
"result": {
"dashboardids": [
"3"
]
},
"id": 1
}