Esses parâmetros e os possíveis valores de propriedade para os respectivos objetos de campo do widget de dashboard permitem configurar o widget Graph nos métodos dashboard.create
e dashboard.update
.
As propriedades dos campos Widget fields
properties não são validadas durante a criação ou atualização de um dashboard. Isso permite aos usuários modificar built-in widgets e criar custom widgets, mas também introduz o risco de criar ou atualizar widgets incorretamente. Para garantir a criação ou atualização bem-sucedida do widget Graph, consulte os requisitos de parâmetro descritos nas tabelas abaixo.
The following parameters are supported for the Graph widget.
Parâmetro | type | nome | valor |
---|---|---|---|
Intervalo de atualização | 0 | rf_rate | 0 - Sem atualização; 10 - 10 segundos; 30 - 30 segundos; 60 - (padrão) 1 minuto; 120 - 2 minutos; 600 - 10 minutos; 900 - 15 minutos. |
Os seguintes parâmetros são suportados para configurar um Conjunto de dados.
O primeiro número no nome da propriedade (por exemplo, ds.hosts.0.0, ds.items.0.0) representa o conjunto de dados específico, enquanto o segundo número, se presente, representa o host ou item configurado.
Parâmetro | type | nome | valor |
---|---|---|---|
Padrão de host (obrigatório) |
1 | ds.hosts.0.0 | Nome ou padrão de Host (por exemplo Zabbix* ). |
Padrão e item (obrigatório) |
1 | ds.items.0.0 | Nome ou padão de Item (por exemplo *: Number of processed *values per second ). |
Cor | 1 | ds.color.0 | Código de cor hexadecimal (por exemplo, FF0000 ).Padrão: FF465C . |
Desenhar | 0 | ds.type.0 | 0 - (padrão) Linha; 1 - Pontos; 2 - Escada; 3 - Barra. |
Largura | 0 | ds.width.0 | Valores válidos variam entre 1-10. Padrão: 1. Parâmetro Largura não disponível se o Desenhar estiver configurado como "Pontos" ou "Barra". |
Tamanho do ponto | 0 | ds.pointsize.0 | Valores válidos variam entre 1-10. Padrão: 3. Parâmetro Tamanho do ponto não disponível se Desenhar estiver definido como "Linha", "Escada" or "Barra". |
Transparência | 0 | ds.transparency.0 | Valores válidos variam entre 1-10. Padrão: 5. |
Preenchimento | 0 | ds.fill.0 | Valores válidos variam entre 1-10. Padrão: 3. Parâmetro Preenchimento não disponível se Desenhar estiver configurado como "Pontos" ou "Barra". |
Missing data | 0 | ds.missingdatafunc.0 | 0 - (padrão) Nenhum; 1 - Conectado; 2 - Tratar como 0. Parâmetro Dados ausentes não disponível se Desenhar estiver configurado como "Pontos" ou "Barra". |
Eixo Y | 0 | ds.axisy.0 | 0 - (padrão) Esquerda; 1 - Direita. |
Deslocamento de tempo | 1 | ds.timeshift.0 | String de tempo válida (e.g. 3600 , 1h , etc.).Você pode usar time suffixes. Valores negativos também são permitidos. Padrão: "" (vazio). |
Função de agregação | 0 | ds.aggregate_function.0 | 0 - (padrão) nenhuma; 1 - minuto; 2 - máximo; 3 - média; 4 - contagem; 5 - somar; 6 - primeiro; 7 - último. |
Intervalo da agregação | 1 | ds.aggregate_interval.0 | String de tempo válida (por exemplo 3600 , 1h , etc.).You may use time suffixes. Padrão: 1h . |
Agregado | 0 | ds.aggregate_grouping.0 | 0 - (padrão) Cada item; 1 - Conjunto de dados. Parâmetro Agregado não válido se Função da agregação estiver configurada como "none". |
Os seguintes parâmetros são suportados para configurar Opções de exibição.
Parâmetro | type | nome | valor |
---|---|---|---|
Seleção de dados de histórico | 0 | source | 0 - (padrão) Automático; 1 - Histórico; 2 - Trends. |
Os seguintes parâmetros são suportados para configurar Período de tempo.
Parâmetro | type | nome | valor |
---|---|---|---|
Definir período de tempo personalizado | 0 | graph_time | 0 - (padrão) Desativado; 1 - Ativado. |
De | 1 | time_from | String de tempo válida no formato YYYY-MM-DD hh:mm:ss .Relative time period valores de ( now , now/d , now/w-1w , etc.) também são suportados.Padrão: now-1h . |
Para | 1 | time_to | String de tempo válida no formato YYYY-MM-DD hh:mm:ss .Relative time period Valores de ( now , now/d , now/w-1w , etc.)também são suportados.Padrão: now . |
The following parameters are supported for configuring Axes.
Parameter | type | name | value |
---|---|---|---|
Left Y | 0 | lefty | 0 - Disabled; 1 - (default) Enabled. Parameter available if Y-axis (in Data set configuration) is set to "Left". |
Right Y | 0 | righty | 0 - (default) Disabled; 1 - Enabled. Parameter available if Y-axis (in Data set configuration) is set to "Right". |
Min | 1 | lefty_min | Any numeric value. Default: "" (empty). |
righty_min | |||
Max | 1 | lefty_max | Any numeric value. Default: "" (empty). |
righty_max | |||
Units (type) | 0 | lefty_units | 0 - (default) Auto; 1 - Static. |
righty_units | |||
Units (value) | 1 | lefty_static_units | Any string value. Default: "" (empty). |
righty_static_units | |||
X-Axis | 0 | xaxis | 0 - Disabled; 1 - (default) Enabled. |
The following parameters are supported for configuring Legend.
Parameter | type | name | value |
---|---|---|---|
Show legend | 0 | legend | 0 - Disabled; 1 - (default) Enabled. |
Number of rows | 0 | legend_lines | Valid values range from 1-5. Default: 1. |
The following parameters are supported for configuring Problems.
Parameter | type | name | value | |
---|---|---|---|---|
Show problems | 0 | show_problems | 0 - (default) Disabled; 1 - Enabled. |
|
Selected items only | 0 | graph_item_problems | 0 - Disabled; 1 - (default) Enabled. |
|
Problem hosts | 1 | problemhosts.0 | Host name. Note: The number in the property name references the configured host. To configure multiple hosts, create a dashboard widget field object for each host. |
|
Severity | 0 | severities | 0 - Not classified; 1 - Information; 2 - Warning; 3 - Average; 4 - High; 5 - Disaster. Default: 1, 2, 3, 4, 5 (all enabled). Note: To configure multiple values, create a dashboard widget field object for each value. |
|
Problem | 1 | problem_name | Problem event name (case insensitive, full name or part of it). | |
Tags (the number in the property name (e.g. tags.tag.0) references tag order in the tag evaluation list) | ||||
Evaluation type | 0 | evaltype | 0 - (default) And/Or; 2 - Or. |
|
Tag name | 1 | tags.tag.0 | Any string value. Parameter Tag name required if configuring Tags. |
|
Operator | 0 | tags.operator.0 | 0 - Contains; 1 - Equals; 2 - Does not contain; 3 - Does not equal; 4 - Exists; 5 - Does not exist. Parameter Operator required if configuring Tags. |
|
Tag value | 1 | tags.value.0 | Any string value. Parameter Tag value required if configuring Tags. |
The following parameters are supported for configuring Overrides.
The first number in the property name (e.g. or.hosts.0.0, or.items.0.0) represents the particular data set, while the second number, if present, represents the configured host or item.
Parameter | type | name | value |
---|---|---|---|
Host pattern (required) |
1 | or.hosts.0.0 | Host name or pattern (e.g. Zabbix* ). |
Item pattern (required) |
1 | or.items.0.0 | Item name or pattern (e.g. *: Number of processed *values per second ). |
Base color | 1 | or.color.0 | Hexadecimal color code (e.g. FF0000 ). |
Width | 0 | or.width.0 | Valid values range from 1-10. |
Draw | 0 | or.type.0 | 0 - Line; 1 - Points; 2 - Staircase; 3 - Bar. |
Transparency | 0 | or.transparency.0 | Valid values range from 1-10. |
Fill | 0 | or.fill.0 | Valid values range from 1-10. |
Point size | 0 | or.pointsize.0 | Valid values range from 1-10. |
Missing data | 0 | or.missingdatafunc.0 | 0 - None; 1 - Connected; 2 - Treat as 0. |
Y-axis | 0 | or.axisy.0 | 0 - Left; 1 - Right. |
Time shift | 1 | or.timeshift.0 | Valid time string (e.g. 3600 , 1h , etc.).You may use time suffixes. Negative values are allowed. |
The following examples aim to only describe the configuration of the dashboard widget field objects for the Graph widget. For more information on configuring a dashboard, see dashboard.create
.
Configure a Graph widget in the following way:
Request:
{
"jsonrpc": "2.0",
"method": "dashboard.create",
"params": {
"name": "My dashboard",
"display_period": 30,
"auto_start": 1,
"pages": [
{
"widgets": [
{
"type": "svggraph",
"name": "Graph",
"x": 0,
"y": 0,
"width": 12,
"height": 5,
"view_mode": 0,
"fields": [
{
"type": 1,
"name": "ds.hosts.0.0",
"value": "Zabbix server"
},
{
"type": 1,
"name": "ds.items.0.0",
"value": "Zabbix server: Utilization of poller data collector processes, in %"
},
{
"type": 1,
"name": "ds.color.0",
"value": "FF0000"
},
{
"type": 0,
"name": "ds.width.0",
"value": 3
},
{
"type": 0,
"name": "ds.transparency.0",
"value": 3
},
{
"type": 0,
"name": "ds.fill.0",
"value": 1
},
{
"type": 1,
"name": "ds.hosts.1.0",
"value": "Zabbix server"
},
{
"type": 1,
"name": "ds.items.1.0",
"value": "Zabbix server: Utilization of trapper data collector processes, in %"
},
{
"type": 1,
"name": "ds.color.1",
"value": "BF00FF"
},
{
"type": 0,
"name": "ds.width.1",
"value": 3
},
{
"type": 0,
"name": "ds.transparency.1",
"value": 3
},
{
"type": 0,
"name": "ds.fill.1",
"value": 1
},
{
"type": 1,
"name": "ds.hosts.2.0",
"value": "Zabbix server"
},
{
"type": 1,
"name": "ds.items.2.0",
"value": "Zabbix server: Utilization of history syncer internal processes, in %"
},
{
"type": 1,
"name": "ds.color.2",
"value": "0040FF"
},
{
"type": 0,
"name": "ds.width.2",
"value": 3
},
{
"type": 0,
"name": "ds.transparency.2",
"value": 3
},
{
"type": 0,
"name": "ds.fill.2",
"value": 1
},
{
"type": 1,
"name": "ds.hosts.3.0",
"value": "Zabbix server"
},
{
"type": 1,
"name": "ds.items.3.0",
"value": "*: Number of processed *values per second"
},
{
"type": 1,
"name": "ds.color.3",
"value": "000000"
},
{
"type": 0,
"name": "ds.transparency.3",
"value": 0
},
{
"type": 0,
"name": "ds.fill.3",
"value": 0
},
{
"type": 0,
"name": "ds.axisy.3",
"value": 1
},
{
"type": 0,
"name": "ds.aggregate_function.3",
"value": 3
},
{
"type": 1,
"name": "ds.aggregate_interval.3",
"value": "1m"
},
{
"type": 0,
"name": "ds.aggregate_grouping.3",
"value": 1
},
{
"type": 0,
"name": "graph_time",
"value": 1
},
{
"type": 1,
"name": "time_from",
"value": "now-3h"
},
{
"type": 0,
"name": "legend_lines",
"value": 2
},
{
"type": 0,
"name": "show_problems",
"value": 1
}
]
}
]
}
],
"userGroups": [
{
"usrgrpid": 7,
"permission": 2
}
],
"users": [
{
"userid": 1,
"permission": 3
}
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response: